	//Chrome Drop Down Menu- Author: Dynamic Drive (http://www.dynamicdrive.com)
//Last updated: Jan 1st, 06'

var cssdropdown={
disappeardelay: 250, //set delay in miliseconds before menu disappears onmouseout

//No need to edit beyond here////////////////////////
dropmenuobj: null, ie: document.all, firefox: document.getElementById&&!document.all,

getposOffset:function(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
},

showhide:function(obj, e, visible, hidden){
if (this.ie || this.firefox)
this.dropmenuobj.style.left=this.dropmenuobj.style.top="-500px"
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
},

iecompattest:function(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
},

clearbrowseredge:function(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=this.ie && !window.opera? this.iecompattest().scrollLeft+this.iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetWidth
if (windowedge-this.dropmenuobj.x < this.dropmenuobj.contentmeasure)  //move menu to the left?
edgeoffset=this.dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=this.ie && !window.opera? this.iecompattest().scrollTop : window.pageYOffset
var windowedge=this.ie && !window.opera? this.iecompattest().scrollTop+this.iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetHeight
if (windowedge-this.dropmenuobj.y < this.dropmenuobj.contentmeasure){ //move up?
edgeoffset=this.dropmenuobj.contentmeasure+obj.offsetHeight
if ((this.dropmenuobj.y-topedge)<this.dropmenuobj.contentmeasure) //up no good either?
edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
},

dropit:function(obj, e, dropmenuID){
if (this.dropmenuobj!=null) //hide previous menu
this.dropmenuobj.style.visibility="hidden"
this.clearhidemenu()
if (this.ie){
obj.onmouseout=function(){cssdropdown.delayhidemenu()}
this.dropmenuobj=document.getElementById(dropmenuID)
this.dropmenuobj.onmouseover=function(){cssdropdown.clearhidemenu()}
this.dropmenuobj.onmouseout=function(){cssdropdown.dynamichide(e)}
this.dropmenuobj.onclick=function(){cssdropdown.delayhidemenu()}
this.showhide(this.dropmenuobj.style, e, "visible", "hidden")
this.dropmenuobj.x=this.getposOffset(obj, "left")
this.dropmenuobj.y=this.getposOffset(obj, "top")
this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+10+"px"
this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+-0+"px"
} else {
obj.onmouseout=function(){cssdropdown.delayhidemenu()}
this.dropmenuobj=document.getElementById(dropmenuID)
this.dropmenuobj.onmouseover=function(){cssdropdown.clearhidemenu()}
this.dropmenuobj.onmouseout=function(){cssdropdown.dynamichide(e)}
this.dropmenuobj.onclick=function(){cssdropdown.delayhidemenu()}
this.showhide(this.dropmenuobj.style, e, "visible", "hidden")
this.dropmenuobj.x=this.getposOffset(obj, "left")
this.dropmenuobj.y=this.getposOffset(obj, "top")
this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+10+"px"
this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+26+"px"

} 
},

contains_firefox:function(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
},

dynamichide:function(e){
var evtobj=window.event? window.event : e
if (this.ie&&!this.dropmenuobj.contains(evtobj.toElement))
this.delayhidemenu()
else if (this.firefox&&e.currentTarget!= evtobj.relatedTarget&& !this.contains_firefox(evtobj.currentTarget, evtobj.relatedTarget))
this.delayhidemenu()
changePicOff('nav-schedule')
},

delayhidemenu:function(){
this.delayhide=setTimeout("cssdropdown.dropmenuobj.style.visibility='hidden'",this.disappeardelay)
},

clearhidemenu:function(){
if (this.delayhide!="undefined")
clearTimeout(this.delayhide)
}
}


// JavaScript Document

function open_window(url,width,height) 
{
	window.open(url,"wind",'toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,width='+ width +',height='+ height +',scrollbars=yes');
}

function changePicOn(file)
    {
		document.images[file].src = '/images/'+file+'-on.gif';
	}

function changePicOff(pic)
	{
		document.images[pic].src = '/images/'+pic+'-off.gif';
	}


// PST Time Function	
function tS(){ x=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN().getUTCDate(),tN().getUTCHours(),tN().getUTCMinutes(),tN().getUTCSeconds()); x.setTime(x.getTime()+dS()-25200000); return x; } // change 288 to 252 for daylight savings clock change or vice versa to go back
function tN(){ return new Date(); } 
function dS(){ return ((tN().getTime()>fD(0,9,1,-1).getTime())&&(tN().getTime()<fD(0,3,3,1).getTime()))?3600000:0; } 
function fD(d,m,h,p){ var week=(p<0)?7*(p+1):7*(p-1),nm=(p<0)?m+1:m,x=new Date(tN().getUTCFullYear(),nm,1,h,0,0),dOff=0; if(p<0){ x.setTime(x.getTime()-86400000); } if(x.getDay()!=d){ dOff=(x.getDay()<d)?(d-x.getDay()):0-(x.getDay()-d); if(p<0&&dOff>0){ week-=7; } if(p>0&&dOff<0){ week+=7; } x.setTime(x.getTime()+((dOff+week)*86400000)); } return x; } 
function lZ(x){ return (x>9)?x:'0'+x; } 
function tH(x){ if(x==0){ x=12; } return (x>12)?x-=12:x; } 
function dT(){ if(fr==0){ fr=1; document.write('<span id="tP">'+eval(oT)+'</span>'); } tP.innerText=eval(oT); setTimeout('dT()',1000); } 
function aP(x){ return (x>11)?'pm':'am'; } 
var fr=0,oT="tH(tS().getHours())+':'+lZ(tS().getMinutes())+aP(tS().getHours())";

// MST Time Function
function tS2(){ x=new Date(tN2().getUTCFullYear(),tN2().getUTCMonth(),tN2().getUTCDate(),tN2().getUTCHours(),tN2().getUTCMinutes(),tN2().getUTCSeconds()); x.setTime(x.getTime()+dS2()-21600000); return x; } //216 or 252 for daylight savings clock change or vice versa to go back
function tN2(){ return new Date(); } 
function dS2(){ return ((tN2().getTime()>fD2(0,9,1,-1).getTime())&&(tN2().getTime()<fD2(0,3,3,1).getTime()))?3600000:0; } 
function fD2(d,m,h,p){ var week=(p<0)?7*(p+1):7*(p-1),nm=(p<0)?m+1:m,x=new Date(tN2().getUTCFullYear(),nm,1,h,0,0),dOff=0; if(p<0){ x.setTime(x.getTime()-86400000); } if(x.getDay()!=d){ dOff=(x.getDay()<d)?(d-x.getDay()):0-(x.getDay()-d); if(p<0&&dOff>0){ week-=7; } if(p>0&&dOff<0){ week+=7; } x.setTime(x.getTime()+((dOff+week)*86400000)); } return x; } 
function lZ2(x){ return (x>9)?x:'0'+x; } 
function tH2(x){ if(x==0){ x=12; } return (x>12)?x-=12:x; } 
function dT2(){ if(fr2==0){ fr2=1; document.write('<span id="tP2">'+eval(oT2)+'</span>'); } tP2.innerText=eval(oT2); setTimeout('dT2()',1000); } 
function aP2(x){ return (x>11)?'pm':'am'; } 
var fr2=0,oT2="tH2(tS2().getHours())+':'+lZ2(tS2().getMinutes())+aP2(tS2().getHours())";

// CST Time Function
function tS3(){ x=new Date(tN3().getUTCFullYear(),tN3().getUTCMonth(),tN3().getUTCDate(),tN3().getUTCHours(),tN3().getUTCMinutes(),tN3().getUTCSeconds()); x.setTime(x.getTime()+dS3()-18000000); return x; } //180 or 216 for daylight savings clock change or vice versa to go back
function tN3(){ return new Date(); } 
function dS3(){ return ((tN3().getTime()>fD3(0,9,1,-1).getTime())&&(tN3().getTime()<fD3(0,3,3,1).getTime()))?3600000:0; } 
function fD3(d,m,h,p){ var week=(p<0)?7*(p+1):7*(p-1),nm=(p<0)?m+1:m,x=new Date(tN3().getUTCFullYear(),nm,1,h,0,0),dOff=0; if(p<0){ x.setTime(x.getTime()-86400000); } if(x.getDay()!=d){ dOff=(x.getDay()<d)?(d-x.getDay()):0-(x.getDay()-d); if(p<0&&dOff>0){ week-=7; } if(p>0&&dOff<0){ week+=7; } x.setTime(x.getTime()+((dOff+week)*86400000)); } return x; } 
function lZ3(x){ return (x>9)?x:'0'+x; } 
function tH3(x){ if(x==0){ x=12; } return (x>12)?x-=12:x; } 
function dT3(){ if(fr3==0){ fr3=1; document.write('<span id="tP3">'+eval(oT3)+'</span>'); } tP3.innerText=eval(oT3); setTimeout('dT3()',1000); } 
function aP3(x){ return (x>11)?'pm':'am'; } 
var fr3=0,oT3="tH3(tS3().getHours())+':'+lZ3(tS3().getMinutes())+aP3(tS3().getHours())";

// EST Time Function
function tS4(){ x=new Date(tN4().getUTCFullYear(),tN4().getUTCMonth(),tN4().getUTCDate(),tN4().getUTCHours(),tN4().getUTCMinutes(),tN4().getUTCSeconds()); x.setTime(x.getTime()+dS4()-14400000); return x; } //144 or 180 for daylight savings clock change or vice versa to go back
function tN4(){ return new Date(); } 
function dS4(){ return ((tN4().getTime()>fD4(0,9,1,-1).getTime())&&(tN4().getTime()<fD4(0,3,3,1).getTime()))?3600000:0; } 
function fD4(d,m,h,p){ var week=(p<0)?7*(p+1):7*(p-1),nm=(p<0)?m+1:m,x=new Date(tN4().getUTCFullYear(),nm,1,h,0,0),dOff=0; if(p<0){ x.setTime(x.getTime()-86400000); } if(x.getDay()!=d){ dOff=(x.getDay()<d)?(d-x.getDay()):0-(x.getDay()-d); if(p<0&&dOff>0){ week-=7; } if(p>0&&dOff<0){ week+=7; } x.setTime(x.getTime()+((dOff+week)*86400000)); } return x; } 
function lZ4(x){ return (x>9)?x:'0'+x; } 
function tH4(x){ if(x==0){ x=12; } return (x>12)?x-=12:x; } 
function dT4(){ if(fr4==0){ fr4=1; document.write('<span id="tP4">'+eval(oT4)+'</span>'); } tP4.innerText=eval(oT4); setTimeout('dT4()',1000); } 
function aP4(x){ return (x>11)?'pm':'am'; } 
var fr4=0,oT4="tH4(tS4().getHours())+':'+lZ4(tS4().getMinutes())+aP4(tS4().getHours())";

// Newsletter e-mail validation

function evalidate()
{
	var form = document.ccoptin;
	var emailed = form.ea.value;
	var exclude = /[^@\-\.\w]|^[_@\.\-]|[\._\-]{2}|[@\.]{2}|(@)[^@]*\1/;
	var check = /@[\w\-]+\./;
	var checkend = /\.[a-zA-Z]{0,4}$/;
	
	if (((emailed.search(exclude) != -1) || (emailed.search(check)) == -1) || (emailed.search(checkend) == -1))
	{
		alert ("Please enter a valid email address.");
		// document.form.email.focus();
		return false;
	} else
	return true;
	
}