//Javascript for All Pages Except Main.htm by Geoff Gelay "Aces Are Wild"
//ggelay@monmouth.com

//#####################Button Tooltips Java Start###############################

function regenerate()
  {
	window.location.reload()
  }

function regenerate2()
  {
	if (document.layers)
	  {
		appear()
		setTimeout("window.onresize=regenerate",450)
	  }
  }

function changetext(whichcontent)
  {
	if (document.all||document.getElementById)
	  {
	    cross_el=document.getElementById? document.getElementById("descriptions"):document.all.descriptions
	    cross_el.innerHTML='<font face="Verdana">'+whichcontent+'<font>'
      }
  else if (document.layers)
    {
		document.d1.document.d2.document.write('<font face="Verdana">'+whichcontent+'</font>')
		document.d1.document.d2.document.close()
	}
  }

function appear()
  {
	document.d1.visibility='show'
  }

window.onload=regenerate2

//#####################Button Tooltips Java END###############################

    var is_NS = navigator.appName=="Netscape";
	var is_Ver = parseInt(navigator.appVersion);
	var is_NS4 = is_NS&&is_Ver>=4&&is_Ver<5;
	var is_NS5up = is_NS&&is_Ver>=5;        

/* The following code detects if the browser is too old to work correctly
     with the pages.  If it is, it send the user to a warning page, if not
	 the user see's the page normally */

if (is_NS4)
  {
	window.location = "warning.htm";
  }

function pop_up(URL) 
  {
    pWin = window.open(URL,'pop','toolbar=0,directories=0,status=0,location=0,resizable=0,scrollbars=0,menubar=0,width=340,height=175,screenY=0,screenX=0,top=200,left=200');  
    window.top.name='Ocean Soundtrack';
    //parent.window.focus(); //puts soundtrack window in backround
  }

//!pop_up('sndtrk.htm')

function RestartSoundtrack()
  {
    !pop_up('sndtrk.htm')
	
	if (is_NS5up)
      {
        !regenerate()
      }
    else
	  {
	    !loadImages()
	  }
  }
  
function JumpToList()
  {
	var URL = document.JumpToForm.JumpTo.options[document.JumpToForm.JumpTo.selectedIndex].value;
	top.location.href = URL;
  }

function nothing()
{}

//Begin OS Check
function checkOS() 
  {
  if(navigator.userAgent.indexOf('IRIX') != -1)
    { 
      var OpSys = "Irix"; 
    }  else 
  
  if((navigator.userAgent.indexOf('Win') != -1) &&  (navigator.userAgent.indexOf('95') != -1))
		{ 
		  var OpSys = "Windows95"; }  else 
		  
		  if(navigator.userAgent.indexOf('Win') != -1)
		    {
		      var OpSys = "Windows3.1,98,ME, or NT"; 
		    }  
		    else 
		      if(navigator.userAgent.indexOf('Mac') != -1)    
		        { 
			  var OpSys = "Macintosh"; 
		        }  
		        else 
			  { 
			    var OpSys = "other"; 
			  }  return OpSys;
		}
//End OS Check
  
//Begin Preloader
function loadImages() 
  {
	if (document.getElementById) 
	  {  // DOM3 = IE5, NS6
		document.getElementById('hidepage').style.visibility = 'hidden';
		document.getElementById('menushow').style.visibility = 'visible';
		document.JumpToForm.JumpTo.selectedIndex=0;

	  }
	  else 
		{
		  if (document.layers)
		    {  // Netscape 4
		  	  document.hidepage.visibility = 'hidden';
		  	  document.menushow.visibility = 'visible';
		  	  document.JumpToForm.JumpTo.selectedIndex=0;
		    }
			else 
		  	  {  // IE 4
		  	    document.all.hidepage.style.visibility = 'hidden';
				document.all.menushow.style.visibility = 'visible';
		  	    document.all.JumpToForm.JumpTo.selectedIndex=0;
		  	  }
		}
  }
  
  function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//  End Preloader