JAVASCRIPT 28
Roll_over_functions.js Guest on 10th July 2020 10:36:14 AM
  1. // JavaScript Document
  2. <!--
  3. function MM_preloadImages() { //v3.0
  4.   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  5.     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  6.     if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  7. }
  8.  
  9. function MM_swapImgRestore() { //v3.0
  10.   var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
  11. }
  12.  
  13. function MM_findObj(n, d) { //v4.01
  14.   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  15.     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  16.   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  17.   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  18.   if(!x && d.getElementById) x=d.getElementById(n); return x;
  19. }
  20.  
  21. function MM_swapImage() { //v3.0
  22.   var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  23.    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
  24. }
  25.  
  26.  
  27.      function goLocation( thisFormSelect ){
  28.  
  29.        var thisSelection = thisFormSelect.options[thisFormSelect.selectedIndex].value;
  30.  
  31.        if (thisSelection != "") {
  32.  
  33.          location = thisSelection;
  34.  
  35.        }
  36.  
  37.      }
  38.          
  39.          
  40. function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  41.   if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
  42.     document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  43.   else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
  44. }
  45. MM_reloadPage(true);
  46.  
  47.      //-->

Paste is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.