home *** CD-ROM | disk | FTP | other *** search
/ PC Extra 07 & 08 / pca1507.iso / intface / pca / special3 / taalselect.js < prev   
Encoding:
Text File  |  2003-04-29  |  2.6 KB  |  80 lines

  1. talen = new Array();
  2. talen[0] = "en";
  3. talen[1] = "Engels";
  4. talen[2] = "nl";
  5. talen[3] = "Nederlands";
  6.  
  7. var frm = parent.frames[1].document.forms.verborgen;
  8. var taal = frm.taal.value;
  9. var init = true;
  10.  
  11. function selecteerTaal() {
  12.     var taalRef = document.selTaal.taal;
  13.     if (init) {
  14.         init = false;
  15.         for (i = 0; i < taalRef.options.length; i++) {
  16.             if (taalRef.options[i].value == taal) {
  17.                 taalRef.selectedIndex = i;
  18.             }
  19.         }
  20.     } else {
  21.         taal = taalRef.options[taalRef.selectedIndex].value;
  22.         var frm = parent.frames[1].document.forms.verborgen;
  23.         frm.taal.value = taal;
  24.         
  25.     }
  26.  
  27.     var imgs = document.getElementsByTagName("IMG");
  28.     for (i = 0; i < imgs.length; i++) {
  29.         imgs[i].src = "shots/" + taal + "/" + imgs[i].name + ".gif";
  30.     }
  31. //    var path = "shots/" + taal + "/vroeger_nu.gif";
  32. //    eval("document." + afb + ".src= path");
  33. }
  34.  
  35. if (document.getElementById)
  36. {
  37.     document.write ('<div class=popup id=popup100>Kies de taal van de screenshots.</div>');
  38.     document.write ('<DIV style="position: absolute; top: 30px; left: 455px;">');
  39.     document.write ('<FORM name="selTaal">');
  40.     document.write ('<a class=popuplink href="javascript:niets()" onMouseOver="openPopup(100)" onMouseOut="sluitPopup(100)">Taal:</a>   ');
  41.     document.write ('<SELECT name="taal" onChange="selecteerTaal();">');
  42.     for (i = 0; i < talen.length; i += 2) {
  43.         document.write ('<OPTION VALUE="' + talen[i] + '">' + talen[i+1] + '</OPTION>');
  44.     }
  45.     document. write ('</SELECT>');
  46.     document. write ('</FORM>');
  47.     document. write ('</DIV>');
  48.  
  49.     selecteerTaal();
  50. }
  51. else
  52. {
  53.     for (i = 0; i < document.images.length; i++)
  54.         document.images[i].src = "shots/en/" + document.images[i].name + ".gif";
  55. }
  56.  
  57. function toonAfbeelding(afb, w, h)
  58. {
  59.  
  60.     w = w + 30;
  61.     var taalRef = document.selTaal.taal;
  62.     taal = taalRef.options[taalRef.selectedIndex].value;
  63.     PCAinterfaceX = (screen.availWidth - w) / 2 - 5;
  64.     PCAinterfaceY = ((screen.availHeight - h) / 2) - 19;
  65.  
  66.     var PopupWeergave = "resizable=no,status=no,scrollbars=no";
  67.     lokaalVenster = window.open("popup1.htm?" + afb + "," + taal, "Informatie", "width="+w+",height="+h+","+PositieY+"=" + PCAinterfaceY + ","+PositieX+"=" + PCAinterfaceX + PopupWeergave)
  68.  
  69. /*    var taalRef = document.selTaal.taal;
  70.     taal = taalRef.options[taalRef.selectedIndex].value;
  71.     path = "shots/" + taal + "/" + afb + ".gif";
  72.     if (w && h) {
  73.         wnd = window.open(path, "handson_afbeelding", "toolbar=0, location=0, status=0, menubar=0, copyhistory=0, scrollbars=0, resizable=0, width=" + w + ", height=" + h);
  74.     }
  75.     else
  76.     {
  77.         wnd = window.open(path, "handson_afbeelding", "toolbar=0, location=0, status=0, menubar=0, copyhistory=0");
  78.     }
  79. */
  80. }