<!--
//Setting the postion of the submenus
function setSubNavs(){
varOffset = ((document.getElementById('centered').offsetWidth - 1000))/2;
document.getElementById('nav1Sub').style.left = 53 + varOffset + "px";
document.getElementById('nav2Sub').style.left = 206 + varOffset + "px";
document.getElementById('nav3Sub').style.left = 386 + varOffset + "px";
document.getElementById('nav4Sub').style.left = 493 + varOffset + "px";
document.getElementById('nav5Sub').style.left = 635 + varOffset + "px";
document.getElementById('nav6Sub').style.left = 793 + varOffset + "px";
}

//top Navigation dropdown functions
// Show sub Navigation
function subNavShow(x){
	document.getElementById(x).style.visibility = "visible"
}
// Hide sub Navigation
function subNavHide(x){
	document.getElementById(x).style.visibility = "hidden"
}
// Hide all sub Navigation
function subNavHideAll(x,subNum){
	document.getElementById("nav"+ x +"Sub").style.visibility = "hidden"
	for (var i=1; i <= subNum; i++){
	document.getElementById("nav"+ x +"Sub" + i).style.visibility = "hidden"
	}
}

function validateEmail(formName){
var doNotSubmit = false
//alert (document.getElementById(formName).strEmail.value);
var isEmail = document.getElementById(formName).strEmail.value
var validateEmail = isEmail.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
if (document.getElementById(formName).strFirst.value == "" || document.getElementById(formName).strFirst.value == "First Name" ){	
	alert ("Please enter your first name. Thank you.");
	doNotSubmit = true;
	document.getElementById(formName).strFirst.focus();
} else if (document.getElementById(formName).strLast.value == "" || document.getElementById(formName).strLast.value == "Last Name" ){	
	alert ("Please enter your last name. Thank you.");
	doNotSubmit = true;
	document.getElementById(formName).strLast.focus();
} else if (!validateEmail) {
	alert ("Please enter a valid email address. Thank you.");
	doNotSubmit = true;
}

if (doNotSubmit == false) {
	//alert ("Form is valid!");
	document.getElementById(formName).submit();
}	
}

//play all flash files
function playFlash (strSrc,w,h,strLoad){
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + w + '" height="' + h + '" align="middle">')
document.write('<param name="allowScriptAccess" value="sameDomain" />')
document.write('<param name="movie" value="' + strLoad + '" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />')
document.write('<param name="wmode" value="transparent" />')
document.write('<param name="autoplay" value="true" />')
document.write('<param name="menu" value="false" />')
document.write('<param name="FlashVars" value="videoSrc=' + strSrc + '" />')
document.write('<embed src="' + strLoad + '" width="' + w + '" height="' + h + '" align="middle" quality="high" bgcolor="#ffffff" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" autoplay="true" menu="false" FlashVars="videoSrc=' + strSrc + '" />')
document.write('</object>')
}

//open ExternalWindow 
function openPopupWindow(varURL,varWidth,varHeight){
	var placeLeft = ((screen.availWidth) / 2) - 250
	var placeTop = ((screen.availHeight) / 2) - 200
	window.open(varURL,'','width='+varWidth+',height='+varHeight+',screenX='+placeLeft+',left='+placeLeft+',screenY='+placeTop+',top='+placeTop+',resizable=yes,scrollbars=yes,location=no,menubar=no,status=no,titlebar=no,toolbar=no')
}

//Change styles for MAC Firefox and Safari
//Is it MAC?
if(navigator.userAgent.indexOf('Mac') != -1){ // Mac
	//Is it Firefox?
	if(navigator.userAgent.indexOf('Firefox') != -1){ // Firefox
	//alert("asdf");
	document.write ("<style type='text/css' media='screen'>.nav { font-family:Verdana; font-size:8.5pt; line-height:20px; width:936px; height:18px; padding-left:40px; background-color:#000000; }");
	document.write (".subItem { font-size:8pt; width:160px; height:15px; padding: 2px 6px 2px 16px; color:#FFFFFF; font-weight:bold; cursor:pointer; background: #7B8589 url('img/bulletNav.gif') no-repeat left center; filter: alpha(opacity=100); opacity: 1; -moz-opacity:1; }");
	document.write (".subItemOn { font-size:8pt; width:160px; height:15px; padding: 2px 6px 2px 16px; color:#000000; font-weight:bold; cursor:pointer; background: #FFC423 url('img/bulletNav.gif') no-repeat left center; filter: alpha(opacity=100); opacity: 1; -moz-opacity:1; }");
	document.write (".navItemSpacer { float:left; width:40px; }</style>");
	}
	if(navigator.userAgent.indexOf('Safari') != -1){ // Safari
	//alert("asdf");
	document.write ("<style type='text/css' media='screen'>.navItemSpacer { float:left; width:40px; }</style>");
	}
}
//-->