// Copyright (c) 2008 astutech ltd

function checkfields(){

//if (document.contact_form.Firstname.value.length==0){
//	document.contact_form.Firstname.focus();
//	alert("Error : First name must contain a value.")
//	return false;
//}

//var str=document.contact_form.Email.value
//var filter=/^(\w+(?:\.\w+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
//var testresults
//if (filter.test(str))
//	testresults=true
//else{
//	document.contact_form.Email.focus()
//	alert("Error - Please input a valid email address")
//	return false;
//}

//if (document.contact_form.Email.value!=document.contact_form.ConfirmEmail.value){
//	document.contact_form.ConfirmEmail.focus();
//	alert("Error : Confirm Email field does not match Email field.")
//	return false;
//}

strPassword=document.contact_form.exclude_blankd.value
strPassword=strPassword+document.contact_form.exclude_blanka.value
strPassword=strPassword+document.contact_form.exclude_blanke.value
strPassword=strPassword+document.contact_form.exclude_blankc.value
strPassword=strPassword+document.contact_form.exclude_blankb.value

if (document.contact_form.exclude_captcha.value!=strPassword){
	document.contact_form.exclude_captcha.focus();
	alert("Incorrect entry of character verification. All characters are lowercase format. Please try again.")
	return false;
}


document.contact_form.submit();
}


function formHandler(url){
window.location.href = url;
}

//	Popup
function popup(argURL,width,height) {
	var screenw = screen.availWidth;
	var screenh = screen.availHeight;
	var leftPos = (screenw-width)/2;
	var topPos = (screenh-height)/2;
	var agt=navigator.userAgent.toLowerCase();
	var is_major = parseInt(navigator.appVersion);
	var is_minor = parseFloat(navigator.appVersion);
	var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
		&& (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
		&& (agt.indexOf('webtv')==-1));
	var is_ie   = (agt.indexOf("msie") != -1);
	var is_ie3  = (is_ie && (is_major < 4));
	var is_ie4  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5")==-1) );
	var is_ie5up  = (is_ie  && !is_ie3 && !is_ie4);
	var is_mac    = (agt.indexOf("mac")!=-1);
	if (is_mac)
	{
	displaypopup = window.open(argURL,'Display','resizable,scrollbars,width='+width+',height='+height+',left='+leftPos+',top='+topPos+'');
	}
	else if (!is_nav && !is_ie5up)
	{
	displaypopup = window.open(argURL,'Display','resizable,scrollbars,width='+width+',height='+height+',left='+leftPos+',top='+topPos+'');
	}
	else
	{
	displaypopup = window.open("",'Display','resizable,width='+width+',height='+height+',left='+leftPos+',top='+topPos+'');
	displaypopup.close();
	displaypopup = window.open(argURL,'Display','resizable,scrollbars,width='+width+',height='+height+',left='+leftPos+',top='+topPos+'');
	displaypopup.focus();
	}
}
//	End Popup



// Onlick event to fix a certain Table Cell to prevent editing

function fixcode(){
}

function displaywarning(){
}

function hidewarning(){
}
// End Fix Code


// function for the fireservice site
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}