home *** CD-ROM | disk | FTP | other *** search
/ Beweegwijzer / beweegwijzer.iso / setup / _SETUP.1 / menu.js < prev    next >
Encoding:
Text File  |  2000-03-06  |  1.4 KB  |  41 lines

  1. var theBlendPict = "";
  2. var blendTimer;
  3. var timerSet = false;
  4.  
  5. var moduleData = new ActiveXObject("Microsoft.XMLDOM");
  6. moduleData.load("data/menu.xml");
  7. var moduleRoot = moduleData.documentElement;
  8.  
  9. function showPage() {
  10.   buildPage();
  11.   parent.goPage = 'menu.html';
  12.   AppScreen.style.visibility = "visible";
  13.   }
  14.  
  15. function buildPage() {
  16.   optieWriteString = '';
  17.   for (var i=0; i<moduleRoot.selectNodes("optie").length; i++) {
  18.     optieWriteString += '<div id="MmBtn" url="' + moduleRoot.selectNodes("optie")[i].getAttribute("url") + '" num="' + i + '" style="top:'+ (i*56) +'px" pict="images/' + moduleRoot.selectNodes("optie")[i].getAttribute("pict") + '">';
  19.     optieWriteString += '<img id="MmImg" src="images/' + moduleRoot.selectNodes("optie")[i].getAttribute("img") + '">';
  20. //    optieWriteString += '<div id="MmTitel">' + moduleRoot.selectNodes("optie")[i].selectSingleNode("titel").text + '</div>';
  21.     optieWriteString += '<div id="MmText">' + moduleRoot.selectNodes("optie")[i].selectSingleNode("text").text + '</div>';    
  22.     optieWriteString += '</div>';
  23.     }
  24.   OptieArea.innerHTML = optieWriteString;
  25.   }
  26.   
  27. function doBlend(type) {
  28.   if ((blendTimer) && (timerSet)) {
  29.     clearTimeout(blendTimer);
  30.     timerSet = false;
  31.     }
  32.   if (type == 1) {
  33.     ImgArea.filters.blendTrans.Apply();
  34.     ImgArea.src = theBlendPict;
  35.     ImgArea.filters.blendTrans.Play();
  36.     }
  37.   else ImgArea.src = theBlendPict;
  38.   }
  39.   
  40.  
  41.