home *** CD-ROM | disk | FTP | other *** search
/ PC Active 2001 March / PCA1303.BIN / intface / software / DEMOS / DEMOS.JS < prev    next >
Encoding:
JavaScript  |  2000-12-20  |  5.5 KB  |  140 lines

  1. /*
  2. versie 1 script voor softwareschermen
  3. */
  4.  
  5. var KnoppenGeladen = false;
  6.  
  7. if (document.images)
  8. {    img1on  = new Image(); img1on.src  = "../../media/images/sw_inst1.gif";
  9.     img2on  = new Image(); img2on.src  = "../../media/images/sw_info1.gif";
  10.     img3on  = new Image(); img3on.src  = "../../media/images/sw_web1.gif";
  11.     img1off = new Image(); img1off.src = "../../media/images/sw_inst.gif";
  12.     img2off = new Image(); img2off.src = "../../media/images/sw_info.gif";
  13.     img3off = new Image(); img3off.src = "../../media/images/sw_web.gif";
  14.     KnoppenGeladen = true;
  15. }
  16.  
  17. // bepaal het demonummer van de pagina en of de pagina vanuit een ander scherm wordt aangeroepen
  18. var DemoNummer = parent.menu.HuidigePagina;
  19. var aanvrager  = parent.menu.location.href.toLowerCase();
  20. if (aanvrager.indexOf('pca') > -1)
  21.     DemoNummer = parent.menu.DemoNummer;
  22.  
  23. var ExtraBestand      = "demo" + DemoNummer + "e.htm";
  24. var InformatieBestand = "demo" + DemoNummer + "i.htm";
  25. var SysteemBestand    = "demo" + DemoNummer + "s.htm";
  26.  
  27. function rollIn(imgName)
  28. { if (KnoppenGeladen) document[imgName].src = eval(imgName + "on.src"); }
  29.  
  30. function rollOut(imgName)
  31. { document[imgName].src = eval(imgName + "off.src"); }
  32.  
  33. Installer = new Array();
  34. Webadres  = new Array();
  35. function maakWebsiteDiv()
  36. {    dw('<div class=popup id=popupWebsite>');
  37.     dw('<table border=0 cellspacing=0 cellpadding=8>');
  38.     dw('<tr><td valign=top bgcolor=336699><a href="javascript:sluitPopup(\'Website\')"><img src="../images/close.gif" width=15 height=15 border=0 alt=""></a></td>');
  39.     dw('<td><b>Website</b>');
  40.     dw('<p>');
  41.     for (i = 0; i< Webadres.length; i++)
  42.     {    dw('<a class=weblink href="javascript:window.open(\'' + Webadres[i] + '\'); sluitPopup(\'Website\');">' + Webadres[i] + '</a><br>');
  43.     }
  44.     dw('</td></tr>');
  45.     dw('</table>');
  46.     dw('</div>');
  47. }
  48.  
  49. // standaardwaarden; deze kunnen per aanroep/pagina worden overruled
  50.  
  51. var InstallBreedte     = 355;
  52. var InformatieLengte   = 250;
  53. var InformatieBreedte  = 450;
  54. var ExtraLengte        = 250;
  55. var ExtraBreedte       = 450;
  56. var WebsiteLengte      = 100; // deze mag v.d. browser niet minder dan 100 zijn!
  57. var InformatieWeergave = "resizable=no,status=no,scrollbars=yes";
  58. var ExtraWeergave      = "resizable=no,status=no,scrollbars=yes";
  59. var WebsiteWeergave    = "resizable=no,status=no,scrollbars=no";
  60. var InstallWeergave    = "resizable=no,status=no,scrollbars=no";
  61. var Melding30          = "Geen informatie bekend";
  62.  
  63.  
  64. function PopupVenster(soort)
  65. {    if (soort == "Website")
  66.     {    niets();
  67.         toonPopup(soort);
  68.     }
  69.     else
  70.     {    sluitPopup('Website');
  71.         if (soort == "Install") {    Bestand = ""; }
  72.         else { Bestand = eval(soort + "Bestand"); }
  73.         InstallLengte  = 42 + (Installer.length * 21) + 21 + (Math.round(InstallInfo.length * 10 / InstallBreedte)) * 21;
  74.  
  75.         if (InstallLengte <= 126) InstallLengte = 160;
  76.  
  77.         // InstallLengte:
  78.         // 42 is de lengte van de titel; twee regels; regelhoogte is 21
  79.         // (Installer.length * 21) zijn het aantal te installeren programma's vermenigvuldigd met de regelhoogte
  80.         // InstallInfo.length * 10 geeft aantal pixels van de Info tekst (ruim genomen ivm regelafbrekingen)
  81.         // Delen door InstallBreedte geeft aantal regels, welke met de regelhoogte wordt vermenigvuldigd
  82.  
  83.         PopupBreedte   = eval(soort + "Breedte");
  84.         PopupLengte    = eval(soort + "Lengte");
  85.         PopupWeergave  = eval(soort + "Weergave");
  86.         lokaalVenster  = window.open(Bestand, "lokaalvenster", "width=" + PopupBreedte + ",height=" + PopupLengte + "," + PositieY + "=" + PCAinterfaceY + "," + PositieX + "=" + PCAinterfaceX + PopupWeergave);
  87.         if (soort == "Install") { SchrijfInstallGegevens() }
  88.     }
  89. }
  90.  
  91. function SchrijfInstallGegevens()
  92. {    ldw('<html><head><title>Installeren</title>');
  93.     ldw('<link rel="STYLESHEET" type="text/css" href="../../cdrom.css">');
  94.     ldw('<link rel="STYLESHEET" type="text/css" href="demos.css">');
  95.     ldw('</head>');
  96.     ldw('<body background="../../media/images/swinfobk.gif">');
  97.     ldw('<table cellspacing=0 cellpadding=0>');
  98.     ldw('<tr><td><img src="../../media/images/pixel.gif" width=30 height=1 border=0 alt=""></td>');
  99.     ldw('<td valign=top>');
  100.     ldw('<b>Installeren</b>');
  101.     ldw('<p>');
  102.     for (var i = 0; i <= Installer.length - 1; i++)
  103.         ldw('<li><a href="' + Installer[i][0] + '">' + Installer[i][1] + ' ' + Installer[i][2] + '</a><br>');
  104.     if (InstallInfo != "")
  105.     {    ldw('<p>');
  106.         ldw(InstallInfo);
  107. //        ldw('<hr>');
  108.     }
  109.     ldw('</td></tr></table>');
  110.     ldw('</body></html>');
  111. }
  112.  
  113. // pictogrammen voor besturingssysteem, worden per pagina overruled
  114. win95   = true;
  115. win98   = true;
  116. winME   = false;
  117. winNT   = false;
  118. win2000 = false;
  119. linux   = false;
  120.  
  121. function toonPictogrammen()
  122. {dw('<table border=0 cellspacing=0 cellpadding=0>');
  123. dw('<tr><td width=20> </td><td>');
  124. if (win95)
  125.     dw('<img src="../../media/images/sw_95.gif" width=32 height=22 border=0 alt="Dit programma draait onder Windows 95">');
  126. if (win98)
  127.     dw('<img src="../../media/images/sw_98.gif" width=32 height=22 border=0 alt="Dit programma draait onder Windows 98">');
  128. if (winME)
  129.     dw('<img src="../../media/images/sw_me.gif" width=32 height=22 border=0 alt="Dit programma draait onder Windows ME">');
  130. if (winNT)
  131.     dw('<img src="../../media/images/sw_nt.gif" width=32 height=22 border=0 alt="Dit programma draait onder Windows NT">');
  132. if (win2000)
  133.     dw('<img src="../../media/images/sw_2000.gif" width=32 height=22 border=0 alt="Dit programma draait onder Windows 2000">');
  134. if (linux)
  135.     dw('<img src="../../media/images/sw_linux.gif" width=32 height=22 border=0 alt="Dit programma draait onder Linux">');
  136. dw('</td></tr>');
  137. dw('</table>');
  138. }
  139.  
  140.