function lastModified() {
   //-- Returns date this page was last modified.
   var strDateMod = document.lastModified
   var modiDate=new Date(strDateMod)
   var showAs=modiDate.getMonth()+1+"/"+modiDate.getDate()
   if (modiDate.getFullYear() <= 1999) {
	showAs+="/"+(modiDate.getFullYear() + 100)
   } else {
	showAs+="/"+modiDate.getFullYear()
   }
   return showAs
}

function getCookie(Name) {   
	var search = "PlayIntro="
	if (document.cookie.length > 0) { // if there are any cookies
	      offset = document.cookie.indexOf(search)
	      if (offset != -1) { // if cookie exists
	          // set index of beginning of value
	          offset += search.length

	          // set index of end of cookie value
	          end = document.cookie.indexOf(";", offset)
	          if (end == -1) end = document.cookie.length
	          return unescape(document.cookie.substring(offset, end))
	      }
	}
}

function PlayIntro () {
	// Read flag from cookie (if exists)
	play = getCookie("PlayIntro")
	if (play == null) {
		//-- JavaScript code written by Alan Simpson - www.coolnerds.com
		if (navigator.appName.indexOf("Microsoft")>=0) {
		  // Bgsound tag for MS Internet Explorer...
		  document.writeln ('<bgsound src= "sound/Intro.wav">')
		}else{
		  // ...Embed tag for everyone else.
		  document.writeln ('<embed src="sound/Intro.wav" hidden=true autostart=true>')
		}
		document.cookie = "PlayIntro=NO;"
	}
}

function ClearInput (chkField, InputField) {
	// If Field is not Checked, then clear the Input Field
	if (!chkField.checked) {
		InputField.value = ""
	}
}

function BlockInput (chkField, InputField, NextField) {
	// Only allow input to InputField if chkField is checked
	if (!chkField.checked) {
		InputField.blur();
		NextField.focus()
	}
}

function FP_swapImg() {//v1.0
 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
 n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
 elm.$src=elm.src; elm.src=args[n+1]; } }
}

function FP_preloadImgs() {//v1.0
 var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
 for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}

function FP_getObjectByID(id,o) {//v1.0
 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
 else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
 if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
 for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
 f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
 for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
 return null;
}
