function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);



function initalt()
{
altback="#8B0000" 
altborder="#BDA873"
altfont="tahoma"  // Alt-Message Font
altfontcolor="#FFFFFF"// Alt-Message Font color
altfontsize="2" // Alt-Message Font Size
altoffx=-50 // Alt-Message horizontal offset from mouse-position
altoffy=15 // Alt-Message vertical offset from mouse-position
altwidth=100 // Alt-Message width, will be expanded by your message
altheight=0 // Alt-Message height, will be expanded by your message
// end of Variables
             
                document.onmousedown = sniff
                document.onmousemove = sniff
                document.onmouseup = sniff
  if (document.layers) 
  {  //NS
  document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP)
  document.layers['altmessage'] = new Layer(altwidth)
  document.layers['altmessage'].left = 0
  document.layers['altmessage'].top = 0
  document.layers['altmessage'].height = altheight
  document.layers['altmessage'].bgColor = altback
  document.layers['altmessage'].visibility = "hidden"
  document.layers['altmessage'].borderStyle = "solid"
  document.layers['altmessage'].borderColor = altborder
  document.layers['altmessage'].borderWidth = 1
  }
  else if (document.all)
  { //IE
  document.body.insertAdjacentHTML("BeforeEnd",'<DIV ID="altmessage" STYLE="z-index:200;position:absolute;width:'+altwidth+';height:'+altheight+';left:0;top:0;visibility:hidden;background:'+altback+';border-style:solid;border-width:1;border-color:'+altborder+'"></DIV>')
  }
  }

        function sniff(e) 
        {
        // GETS Mouseposition
        if (document.layers)
        {
        var mousex=e.pageX; var mousey=e.pageY;document.layers['altmessage'].left = mousex+altoffx;document.layers['altmessage'].top = mousey+altoffy
        }
        else if (document.all)
        {
        var mousex=event.x; var mousey=event.y+document.body.scrollTop;altmessage.style.top=mousey+altoffy;altmessage.style.left=mousex+altoffx
        }
        }

	function mouseOut()
	{
		el = document.getElementById('mouseOverText');
		el.style.display='none';
		el.innerHTML = '';

	}
	function mouseOver(text)
	{
		if (text != '')
		{
			el = document.getElementById('mouseOverText');
			el.innerHTML = text;
			el.style.display = 'block';
		}
	}

       function doalt(message)
       {
	       //The main routine
	       content='<font face="'+altfont+'" size="'+altfontsize+'" color="'+altfontcolor+'">'+message+'</FONT>'				
	       if (document.layers) 
	       {
		       with (document.layers['altmessage'].document)
	       {
			open()
		       write(content)
		       close()
	       }
		       document.layers['altmessage'].visibility = "show"
	       }
	       else if (document.all) 
	       { 
		    document.all['altmessage'].innerHTML = content
		    document.all['altmessage'].style.visibility = "visible"
	       }
       }
       function realt()
       {
       if (document.layers)document.layers['altmessage'].visibility = "hidden";
       else if (document.all) document.all['altmessage'].style.visibility = "hidden";
       }
	   

function HideRolloverImage() {
   if (document.originalImages != null)
      for(var i=0;i < (document.originalImages.length-1);i+=2)
         document.originalImages[i].src = document.originalImages[i+1];
}
function ShowRolloverImage() {
   var i,j=0,objStr,obj,imgList=new Array,oldList=document.originalImages;
   for (i=0;i < (ShowRolloverImage.arguments.length-2);i+=3) {
      objStr = ShowRolloverImage.arguments[(navigator.appName=='Netscape')?i:i+1];
      if ((objStr.indexOf('document.layers[')==0 && document.layers==null) ||
          (objStr.indexOf('document.all[')==0 && document.all==null))
         objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);
      obj = eval(objStr);
      if (obj != null) {
         imgList[j++] = obj;
         imgList[j++] = (oldList==null || oldList[j-1]!=obj)?obj.src:oldList[j];
         obj.src = ShowRolloverImage.arguments[i+2];
      }
   }
   document.originalImages = imgList;
}

function DocumentOnLoad() {
   PreloadImages('image/Who_R.gif','image/FAQs_R.jpg','image/Store_Red.gif','image/WHS_Red.gif','image/Ital_Gold.gif','image/Class_Gold.gif','image/Floral_Gold.gif','image/Grand_Gold.gif','image/Mus_Gold.gif','image/TimeP_Gold.gif','image/Pet_Gold.gif','image/Pow_Gold.gif','image/Vict_Gold.gif','image/Reg_Gold.gif','image/Merch_Gold.gif','image/Gall_Gold.gif','image/Stat_Gold.gif','image/HG_Gold.gif','image/Naut_Gold.gif','image/EH_Gold.gif','image/Coke_Gold.gif','image/SC_Gold.gif');
}

function PreloadImages() {
   if (document.images){
      var imgFiles = PreloadImages.arguments;
      if (document.preloadArray==null) document.preloadArray = new Array();
      var i = document.preloadArray.length;
      with (document) for (var j=0;j < imgFiles.length;j++)
         if (imgFiles[j].charAt(0) != "#"){
            preloadArray[i] = new Image;
            preloadArray[i++].src = imgFiles[j];
         }
   }
}

function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
