//<!-- MAIN NAVIGATION ROLLOVER SCRIPT -->
//This function will check whether it contains any special characters with given chars
//Special Character Validation for General fields
function isSpecial(strString,strSplChar)
{
  var blnReturn;
  var strFound;
  blnReturn=false;
  var strvalue;
  
  //Commented by Sai to relax the special characters as per Nicole and Steve Niss request - Feb 06 2009  
  //strvalue = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890. " + strSplChar;
  strvalue = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890~`!@#$%^&*()_-+=|\}]{[:;/?.,äöüß " + strSplChar;
  
  
  for (intLoop=0;intLoop<strString.length;intLoop++)
  	{
		
	   if ((strvalue.indexOf(strString.charAt(intLoop)))<0)
	   		{ 
				blnReturn=true;
			}
	}
	return blnReturn;
}
//Special Character validation for username and password
function isSpecialLogin(strString,strSplChar)
{
  var blnReturn;
  var strFound;
  blnReturn=false;
  var strvalue;
  
  //Commented by Sai to relax the special characters as per Nicole and Steve Niss request - Feb 06 2009 
  //strvalue = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890.!@#$%^&*()_+-='\|/?;\ " + strSplChar;
  strvalue = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890~`!@#$%^&*()_-+=|\}]{[:;/?.,äöüß " + strSplChar;
  
  for (intLoop=0;intLoop<strString.length;intLoop++)
  	{
		
	   if ((strvalue.indexOf(strString.charAt(intLoop)))<0)
	   		{ 
				blnReturn=true;
			}
	}
	return blnReturn;
}
//Special Character Validation for Email field
function isSpecialEmail(strStringEmail,strSplCharEmail)
{
  var blnReturnEmail;
  var strFoundEmail;
  blnReturnEmail=false;
  var strvalueEmail;
  
  //Commented by Sai to relax the special characters as per Nicole and Steve Niss request - Feb 06 2009
  //strvalueEmail = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890@.!#$%&*+-/=?^_`{|}~" + strSplCharEmail;
  strvalueEmail = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890~`!@#$%^&*()_-+=|\}]{[:;/?.,äöüß " + strSplCharEmail;
  
  for (intLoopE=0;intLoopE<strStringEmail.length;intLoopE++)
  	{
		
	   if ((strvalueEmail.indexOf(strStringEmail.charAt(intLoopE)))<0)
	   		{ 
				blnReturnEmail=true;
			}
	}
	return blnReturnEmail;
}
//Special Character Validation for Description fields
function isSpecialDesc(strStringDesc,strSplCharDesc)
{
  var blnReturnDesc;
  var strFoundDesc;
  blnReturnDesc=false;
  var strvalueDesc;
  
  //Commented by Sai to relax the special characters as per Nicole and Steve Niss request - Feb 06 2009  
  //strvalueDesc = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890@.!@%&()-,; " + strSplCharDesc;
  strvalueDesc = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890~`!@#$%^&*()_-+=|\}]{[:;/?.,äöüß " + strSplCharDesc;
  
  for (intLoopD=0;intLoopD<strStringDesc.length;intLoopD++)
  	{
		
	   if ((strvalueDesc.indexOf(strStringDesc.charAt(intLoopD)))<0)
	   		{ 
				blnReturnDesc=true;
			}
	}
	return blnReturnDesc;
}
b1on  = "/images/topNav/prod2.gif"
b1off = "/images/topNav/prod_off2.gif"

b2on  = "/images/topNav/apps2.gif"
b2off = "/images/topNav/apps_off2.gif"

b3on  = "/images/topNav/tech2.gif"
b3off = "/images/topNav/tech_off2.gif"

b4on  = "/images/topNav/news2.gif"
b4off = "/images/topNav/news_off2.gif"

b5on  = "/images/topNav/careers2.gif"
b5off = "/images/topNav/careers_off2.gif"

b6on  = "/images/topNav/about2.gif"
b6off = "/images/topNav/about_off2.gif"

b7on  = "/images/topNav/contact2.gif"
b7off = "/images/topNav/contact_off2.gif"

b8on  = "/images/topNav/site2.gif"
b8off = "/images/topNav/site_off2.gif"

b9on  = "/images/topNav/home2.gif"
b9off = "/images/topNav/home_off2.gif"

b10on  = "/images/topNav/cust2.gif"
b10off = "/images/topNav/cust_off2.gif"

//URL completion for Netscape (IE compatible)
function get(url)
{
	window.location = location.pathname + url
}

// BROWSER SNIFFER FOR DHTML SCRIPTS 
DOM = (document.getElementById) ? true : false;
NS4 = (document.layers) ? true : false;
IE = (document.all) ? true : false;
IE4 = IE && !DOM;
Mac = (navigator.appVersion.indexOf("Mac") != -1);
IE4M = IE4 && Mac;
IsMenu = (DOM || NS4 || (IE4 && !IE4M));
BrowserString = NS4 ? "NS4" : DOM ? "DOM" : "IE4";
if(window.event + "" == "undefined") event = null;
function f_PopUp(){return false};
function f_PopDown(){return false};
popUp = f_PopUp;
popDown = f_PopDown;


if(IsMenu) {
	document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='/js/Arrays.js' TYPE='text/javascript'><\/SCR" + "IPT>");
	document.write("<SCR" + "IPT LANGUAGE='JavaScript1.2' SRC='/js/"+ BrowserString +".js' TYPE='text/javascript'><\/SCR" + "IPT>");
}


// UNIVERSAL POP UP WINDOW FOR PDFs
var newwin;
function openWindow(pageURL)
{
	newwin = window.open(pageURL,"DPE","width=638,height=381,resizable=yes,toolbar=no,menubar=yes,location=no,status=yes,scrollbars=yes")
	setTimeout('newwin.focus();',250);
}

//pop up windows for quality network pages to display the certification images
var newqwin;
function openQualityWindow(pageURL)
{
	var theHeight = 550;
	var theWidth = 530;
	var theTop=(screen.height/2)-(theHeight/2);
  	var theLeft=(screen.width/2)-(theWidth/2);
  	var features='height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+",scrollbars=yes";
	newqwin = window.open(pageURL,'',features);
}

function openWindow2(pageURL)
{
	newwin = window.open(pageURL,"DPE2","width=638,height=381,resizable=yes,toolbar=no,menubar=yes,location=no,status=yes,scrollbars=yes")
	setTimeout('newwin.focus();',250);
}

function openWindowPDF(pageURL)
{
	if (browser.indexOf("Explorer") >= 0){
		newwin = window.open(pageURL,"DPE","width=638,height=381,resizable=yes,toolbar=no,menubar=yes,location=no,status=yes,scrollbars=yes")
		setTimeout('newwin.focus();',250);
	}else{
		newwin = window.open(pageURL,"DPE","width=638,height=381,resizable=yes,toolbar=no,menubar=yes,location=no,status=yes,scrollbars=yes")
		setTimeout('newwin.focus();',250);
		//window.location=pageURL;
	}
}
	
function openWindowSWF(pageURL)
{
	if (browser.indexOf("Explorer") >= 0){
		newwin = window.open(pageURL,"DPE","width=575,height=390,resizable=yes,toolbar=no,menubar=yes,location=no,status=yes,scrollbars=yes")
		setTimeout('newwin.focus();',250);
	}else{
	window.location=pageURL;
	}
}	

function openWindowSWF2(pageURL)
{
	if (browser.indexOf("Explorer") >= 0){
		newwin = window.open(pageURL,"DPE","width=575,height=550,resizable=yes,toolbar=no,menubar=yes,location=no,status=yes")
		setTimeout('newwin.focus();',250);
	}else{
	window.location=pageURL;
	}
}	
	
function openWindowCRG(url,name,width,height,features) 
{
	var winLeft = (screen.width - width) / 2;
	if (winLeft < 0) winLeft = 0;
	var winTop = (screen.height - height) / 2;
	if (winTop < 0 || winTop <= 55) winTop = 0;
	newwin = window.open(url,name,"width=" + width + ",height=" + height + ",top=" + winTop + ",left=" + winLeft + "," + features);
	setTimeout('newwin.focus()',250);
}

// NETSCAPE CSS RESIZE BUG FIX
function WM_netscapeCssFix() {
  if (document.WM.WM_netscapeCssFix.initWindowWidth != window.innerWidth || document.WM.WM_netscapeCssFix.initWindowHeight != window.innerHeight) {
    document.location = document.location;
  }
}

function WM_netscapeCssFixCheckIn() {
  if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
    if (typeof document.WM == 'undefined'){
      document.WM = new Object;
    }
    if (typeof document.WM.WM_scaleFont == 'undefined') {
      document.WM.WM_netscapeCssFix = new Object;
      document.WM.WM_netscapeCssFix.initWindowWidth = window.innerWidth;
      document.WM.WM_netscapeCssFix.initWindowHeight = window.innerHeight;
    }
    window.onresize = WM_netscapeCssFix;
  }
}

WM_netscapeCssFixCheckIn()


// CONTACT US FORM VALIDATION 
function ValidateLogin() {
	if (ValidateUsername() == false) {
		return (false);
	}
	if (ValidatePassword() == false) {
		return (false);
	}
	//document.frmLogin.submit();
	return (true);
}

function ValidateUsername() {
   if (isBlank(document.frmLogin.username.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Username\" field.");
      document.frmLogin.username.focus();
      return(false);
   }
   
   if (isSpecialLogin(document.frmLogin.username.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Username\" field");
				document.frmLogin.username.focus();
				return false;
			}
   return (true);
} // *** end ValidateUsername

function ValidatePassword() {
   if (isBlank(document.frmLogin.password.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Password\" field.");
      document.frmLogin.password.focus();
      return(false);
   }
    if (isSpecialLogin(document.frmLogin.password.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Password\" field");
				document.frmLogin.password.focus();
				return false;
			}
   return (true);
} // *** end ValidatePassword

//Validation For Customer Connection Contact Us
function ValidateCustContactUs() {
	if (document.frmContactUs.firstname.value == "") {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"First Name\" field.");
      	document.frmContactUs.firstname.focus();
      	return;
	}
	if (document.frmContactUs.lastname.value == "") {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Last Name\" field.");
      	document.frmContactUs.lastname.focus();
      	return;
	}
	if (document.frmContactUs.email.value == "") {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Email\" field.");
      	document.frmContactUs.email.focus();
      	return;
	}
	if (document.frmContactUs.company.value == "") {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Company\" field.");
      	document.frmContactUs.company.focus();
      	return;
	}
	if (document.frmContactUs.region.options[0].selected == true) {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Region\" field.");
      	document.frmContactUs.region.focus();
      	return;
	}
	   return (true);
}
	
//  ***  VALIDATION FOR CONTACT US
function ValidateForm() {
	if (document.frmContactUs.firstname.value == "") {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"First Name\" field.");
      	document.frmContactUs.firstname.focus();
      	return;
	}
	if (document.frmContactUs.lastname.value == "") {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Last Name\" field.");
      	document.frmContactUs.lastname.focus();
      	return;
	}
	if (document.frmContactUs.email.value == "") {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Email\" field.");
      	document.frmContactUs.email.focus();
      	return;
	}
	if (document.frmContactUs.company.value == "") {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Company\" field.");
      	document.frmContactUs.company.focus();
      	return;
	}
	if (document.frmContactUs.address1.value == "") {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Address\" field.");
      	document.frmContactUs.address1.focus();
      	return;
	}
	if (document.frmContactUs.city.value == "") {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"City\" field.");
      	document.frmContactUs.city.focus();
      	return;
	}
	if (document.frmContactUs.state.value == "") {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"State\" field.");
      	document.frmContactUs.state.focus();
      	return;
	}
	if (document.frmContactUs.country.value == "") {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Country\" field.");
      	document.frmContactUs.country.focus();
      	return;
	}
	if (document.frmContactUs.phone.value == "") {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Phone\" field.");
      	document.frmContactUs.phone.focus();
      	return;
	}
	if (document.frmContactUs.func.options[0].selected == true) {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Function\" field.");
      	document.frmContactUs.func.focus();
      	return;
	}
	if (document.frmContactUs.business.options[0].selected == true) {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Type of Business\" field.");
      	document.frmContactUs.business.focus();
      	return;
	}
	if (document.frmContactUs.application.options[0].selected == true) {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Application\" field.");
      	document.frmContactUs.application.focus();
      	return;
	}
	if (document.frmContactUs.materials.value == "") {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Materials\" field.");
      	document.frmContactUs.materials.focus();
      	return;
	}
	if (document.frmContactUs.product.options[0].selected == true) {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Products\" field.");
      	document.frmContactUs.product.focus();
      	return;
	}
	document.frmContactUs.submit();
	
}

function SetUser() {
   document.frmContactUs.old_user.value = "Y";
   return (true);
}  // *** end SetUser

// Validation for Registration Form
function ValidateRegForm() {
   if (ValidateRegFname() 		== false) {      return (false);   }
   if (ValidateRegLname() 		== false) {      return (false);   }
   if (ValidateRegEmail() 		== false) {      return (false);   }
   if (ValidateRegCompany() 	== false) {      return (false);   }
   if (ValidateRegAddress1()	== false) {      return (false);   }
   if (ValidateRegAddress2()	== false) {      return (false);   }
   if (ValidateRegCity() 		== false) {      return (false);   }
   if (ValidateRegState() 		== false) {      return (false);   }
   if (ValidateRegZip() 		== false) {      return (false);   }
   if (ValidateRegCountry() 	== false) { 	 return (false);   } 
   if (ValidateRegPhone() 		== false) {      return (false);   }
   if (ValidateRegFax() 		== false) {      return (false);   }
   if (ValidateFunction() 		== false) {      return (false);   }
   if (ValidateApplication()	== false) {      return (false);   }
   if (ValidateBusiness() 		== false) {      return (false);   }
   if (ValidateRegUserName()	== false) {      return (false);   }
   if (ValidateRegPassword()	== false) {      return (false);   }
   if (ValidateRegPassword2() 	== false) {      return (false);   }
   if (MatchRegPasswords() 		== false) {      return (false);   }
   document.frmRegister.submit();
   return (false);//This is so the form will not be submitted twice
   //return (true);
}   // *** end ValidateRegForm

// Validation for Registration Update Form
function ValidateUpdateForm() {
   if (ValidateRegFname() 	== false) {	return (false);	}
   if (ValidateRegLname() 	== false) { return (false); }
   if (ValidateRegEmail() 	== false) { return (false); }
   if (ValidateRegCompany() == false) { return (false); }
   if (ValidateRegAddress1()== false) { return (false); }
   if (ValidateRegCity() 	== false) { return (false); }
   if (ValidateRegState() 	== false) { return (false); }
   if (ValidateRegZip() 	== false) { return (false); }
   if (ValidateRegCountry() == false) { return (false); } 
   if (ValidateRegPhone() 	== false) { return (false); }
   //document.frmRegister.submit();
   return (true);
}   // *** end ValidateUpdateForm

// Validation for Customer Connection Registration Form
function ValidateCustomerRegForm() {
  // if (ValidateRegApp() 		== false) {      return (false);   }
   if (ValidateRegFname() 		== false) {      return (false);   }
   if (ValidateRegLname() 		== false) {      return (false);   }
   if (ValidateRegCompany() 	== false) {      return (false);   }
   if (ValidateRegAddress1()	== false) {      return (false);   }
   if (ValidateRegCity() 		== false) {      return (false);   }
   if (ValidateRegCountry() 	== false) { 	 return (false);   } 
   if (ValidateRegRegion() 		== false) {      return (false);   }
   if (ValidateRegPhone() 		== false) {      return (false);   }
   if (ValidateRegFax() 		== false) {      return (false);   }
   if (ValidateRegEmail() 		== false) {      return (false);   }
   if (ValidateRegDDEContact() 	== false) {      return (false);   }
   if (ValidateRegDDEBusiness() == false) {      return (false);   }
   if (ValidateRegMob() 		== false) {      return (false);   }
   if (ValidateRegDob() 		== false) {      return (false);   }
   if (ValidateApplication()	== false) {      return (false);   }
   if (ValidateBusiness() 		== false) {      return (false);   }
   if (ValidateFunction() 		== false) {      return (false);   }
   if (document.frmRegister.firstname.value.length > 17) {
	  return (false);
   }
   if (ValidateRegUserName()	== false) {      return (false);   }
   //document.frmRegister.submit();
   //return (false);//This is so the form will not be submitted twice
   return (true);
}   // *** end ValidateRegForm

function ValidateRegApp() {
   if ((document.frmRegister.OrderCenter.checked == false) && (document.frmRegister.TechnicalCenter.checked == false)) {
      alert("\nYou must complete all of the required fields to register.\nPlease select a service to register for.");
      document.frmRegister.OrderCenter.focus();
      return(false);
   }
   return (true);
} // *** end ValidateRegTitle

function ValidateRegTitle() {
   if (isBlank(document.frmRegister.title.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Title/Department\" field.");
      document.frmRegister.title.focus();
      return(false);
   }
   return (true);
} // *** end ValidateRegTitle

function ValidateRegFax() {
   if (isBlank(document.frmRegister.fax.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Fax\" field.");
      document.frmRegister.fax.focus();
      return(false);
   }
   return (true);
} // *** end ValidateRegFax

function ValidateRegRegion() {
   if (document.frmRegister.region.options[0].selected == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Region\" field.");
      document.frmRegister.region.focus();
      return(false);
   }
   return (true);
} // *** end ValidateRegRegion

function ValidateRegDDEContact() {
   if (isBlank(document.frmRegister.ddeContact.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"DDE Contact\" field.");
      document.frmRegister.ddeContact.focus();
      return(false);
   }
   return (true);
} // *** end ValidateRegDDEContact

function ValidateRegDDEBusiness() {
   if (document.frmRegister.ddeBusiness.options[0].selected == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"DDE Business\" field.");
      document.frmRegister.ddeBusiness.focus();
      return(false);
   }
   return (true);
} // *** end ValidateRegDDEBusiness

function ValidateRegMob() {
   if (document.frmRegister.mob.options[0].selected == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Month\" field.");
      document.frmRegister.mob.focus();
      return(false);
   }
   return (true);
} // *** end ValidateRegMob

function ValidateRegDob() {
   if (document.frmRegister.dob.options[0].selected == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Day\" field.");
      document.frmRegister.dob.focus();
      return(false);
   }
   return (true);
} // *** end ValidateRegDob

function ValidateRegFname() {
   if (isBlank(document.frmRegister.firstname.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"First Name\" field.");
      document.frmRegister.firstname.focus();
      return(false);
   }
   
   if (isSpecial(document.frmRegister.firstname.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"First Name\" field");
				document.frmRegister.firstname.focus();
				return false;
			}
   return (true);
} // *** end ValidateFname

function ValidateRegUserName() {
   if (document.frmRegister.firstname.value.length > 20) {
      alert("\nYour username must not be longer than 20 characters.\nPlease enter another value for the \"Username\" field.");
      document.frmRegister.username.focus();
	  return (false);
   }
   if (isBlank(document.frmRegister.username.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Username\" field.");
      document.frmRegister.username.focus();
      return(false);
   }
   
   if (isSpecial(document.frmRegister.username.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Username\" field");
				document.frmRegister.username.focus();
				return false;
			}
   return (true);
} // *** end ValidateUserName

function ValidateRegPassword() {
   if (isBlank(document.frmRegister.password.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Password\" field.");
      document.frmRegister.password.focus();
      return(false);
   }
   if (isSpecial(document.frmRegister.password.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Password\" field");
				document.frmRegister.password.focus();
				return false;
			}
   return (true);
} // *** end ValidatePassowrd

function ValidateRegPassword2() {
	if (isBlank(document.frmRegister.password2.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Re-Type Password\" field.");
      document.frmRegister.password2.focus();
	      return(false);
	}
		return (true);
} // *** end ValidatePassword2

function MatchRegPasswords() {

	if (document.frmRegister.password2.value != document.frmRegister.password.value) {
		alert("You must complete all of the required fields to register.The Passwords entered do not match.  Please re-enter values for the \"Password\" and \"Re-Type Password\" fields.");		
		document.frmRegister.password.value = "" ;
		document.frmRegister.password2.value = "" ;
		document.frmRegister.password.focus();
				
	    return(false);
}	else{
		return(true);
	}	  
}  // *** end MatchPasswords

function ValidateRegLname() {
   if (isBlank(document.frmRegister.lastname.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Last Name\" field.");
      document.frmRegister.lastname.focus();
      return(false);
   }
   if (isSpecial(document.frmRegister.lastname.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Last Name\" field");
				document.frmRegister.lastname.focus();
				return false;
			}
   return (true);
} // *** end ValidateLname

function ValidateRegCompany() {
   if (isBlank(document.frmRegister.company.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Company\" field.");
      document.frmRegister.company.focus();
      return(false);
   }
   if (isSpecial(document.frmRegister.company.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Company\" field");
				document.frmRegister.company.focus();
				return false;
			}
   return (true);
} // *** end ValidateCompany

function ValidateRegAddress1() {
   if (isBlank(document.frmRegister.address1.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Address\" field.");
      document.frmRegister.address1.focus();
      return(false);
   }
   
   
   if (isSpecialDesc(document.frmRegister.address1.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Address\" field");
				document.frmRegister.address1.focus();
				return false;
			}
   return (true);
} // *** end ValidateAddress1
function ValidateRegAddress2(){
if (isSpecial(document.frmRegister.address2.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Address2\" field");
				document.frmRegister.address2.focus();
				return false;
			}
   return (true);
} // *** end ValidateAddress2
function ValidateRegCity() {
   if (isBlank(document.frmRegister.city.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"City\" field.");
      document.frmRegister.city.focus();
      return(false);
   }
    if (isSpecial(document.frmRegister.city.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"City\" field");
				document.frmRegister.city.focus();
				return false;
			}
   return (true);
} // *** end ValidateCity

function ValidateRegState() {
   if (isBlank(document.frmRegister.state.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"State\" field.");
      document.frmRegister.state.focus();
      return(false);
   }
   if (isSpecial(document.frmRegister.state.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"State\" field");
				document.frmRegister.state.focus();
				return false;
			}
   return (true);
} // *** end ValidateState

function ValidateRegZip() {
   if (isBlank(document.frmRegister.zip.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Zip Code\" field.");
      document.frmRegister.zip.focus();
      return(false);
   }
    if (isSpecial(document.frmRegister.zip.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Zip Code\" field");
				document.frmRegister.zip.focus();
				return false;
			}
   return (true);
} // *** end ValidateZip

function ValidateRegPhone() {
   if (isBlank(document.frmRegister.phone.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Phone\" field.");
      document.frmRegister.phone.focus();
      return(false);
   }
   if (isSpecial(document.frmRegister.phone.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Phone\" field");
				document.frmRegister.phone.focus();
				return false;
			}
   return (true);
} // *** end ValidatePhone
function ValidateRegFax(){
if (isSpecial(document.frmRegister.fax.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Fax\" field");
				document.frmRegister.fax.focus();
				return false;
			}
   return (true);
} // *** end ValidateFax
function ValidateRegEmail() {
   if (isBlank(document.frmRegister.email.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Email Address\" field.");
      document.frmRegister.email.focus();
      return(false);
   }
   
   
   if (isSpecialEmail(document.frmRegister.email.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Email Address\" field");
				document.frmRegister.email.focus();
				return false;
			}
   return (true);
} // *** end ValidateEmail

function ValidateRegCountry() {
   if (document.frmRegister.country.options[0].selected == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Country\" field.");
      document.frmRegister.country.focus();
      return(false);
   }
   return (true);
} // *** end ValidateCountry

function ValidateFunction() {
   if (document.frmRegister.func.options[0].selected == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Function\" field.");
      document.frmRegister.func.focus();
      return(false);
   }
   return (true);
} // *** end ValidateCountry
function ValidateApplication() {
   if (document.frmRegister.application.options[0].selected == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Application\" field.");
      document.frmRegister.application.focus();
      return(false);
   }
   return (true);
} // *** end ValidateCountry
function ValidateBusiness() {
   if (document.frmRegister.business.options[0].selected == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Business\" field.");
      document.frmRegister.business.focus();
      return(false);
   }
   return (true);
} // *** end ValidateCountry

function isBlank(sInput) {
   var iIdx;
   var iLth = 0;
   if (sInput == "") {
      return true;
   }
   for (iIdx = 0; iIdx < sInput.length; iIdx++) {
      var sChar = sInput.charAt(iIdx);
      if (sChar == " ") {
         iLth = iLth + 1;
      }
   }
   if (iLth == sInput.length) {
      return(true);
   }
   return false;
}   // *** end isBlank

// ========================= CRG DOWNLOAD REGISTRATION VALIDATION =====================
function ValidateCRGDownloadLogin() {
	if (ValidateCRGDownloadLoginUsername() == false) {
		return (false);
	}
	if (ValidateCRGDownloadLoginPassword() == false) {
		return (false);
	}
	return (true);
}

function ValidateCRGDownloadLoginUsername() {
   if (isBlank(document.frmCRGDownloadLogin.username.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Username\" field.");
      document.frmCRGDownloadLogin.username.focus();
      return(false);
   }
   return (true);
} // *** end ValidateUsername

function ValidateCRGDownloadLoginPassword() {
   if (isBlank(document.frmCRGDownloadLogin.password.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Password\" field.");
      document.frmCRGDownloadLogin.password.focus();
      return(false);
   }
   return (true);
} // *** end ValidatePassword

function ValidateGVForm() {

	if (ValidateCRGDownloadEmail() 		== false) {	   return (false);	}
	if (ValidateCRGDownloadFname() 		== false) {	   return (false);	}
	if (ValidateCRGDownloadLname() 		== false) {	   return (false);	}
	if (ValidateCRGDownloadCompany() 	== false) {	   return (false);	}
	if (ValidateCRGDownloadPhone() 		== false) {	   return (false);	}
	if (ValidateCRGDownloadCountry() 	== false) {	   return (false);	} 

	if (ValidateCRGDownloadRegisteredUser() == false) {
		if (ValidateCRGDownloadUserName() 	== false) {	   	return (false);	}
		if (ValidateCRGDownloadPassword() 	== false) {	   	return (false);	}
		if (ValidateCRGDownloadPassword2() 	== false) {	  	return (false);	}
		if (MatchCRGPasswords() 			== false) {		return (false);	}
	}
	//document.frmCRGRegister.submit();
	return (true);
}   // *** end ValidateForm



function ValidateCRGDownloadForm() {

	if (ValidateCRGDownloadEmail() 		== false) {	   return (false);	}
	if (ValidateCRGDownloadFname() 		== false) {	   return (false);	}
	if (ValidateCRGDownloadLname() 		== false) {	   return (false);	}
	if (ValidateCRGDownloadCompany() 	== false) {	   return (false);	}
	if (ValidateCRGDownloadAddress1() 	== false) {	   return (false);	}
	
	if (ValidateCRGDownloadCity() 		== false) {	   return (false);	}
	if (ValidateCRGDownloadState() 		== false) {	   return (false);	}
	if (ValidateCRGDownloadZip() 		== false) {	   return (false);	}
	if (ValidateCRGDownloadAddress2() 	== false) {	   return (false);	}
	if (ValidateCRGDownloadPhone() 		== false) {	   return (false);	}
	if (ValidateCRGDownloadFax() 		== false) {	   return (false);	}
	if (ValidateCRGDownloadCountry() 	== false) {	   return (false);	} 
	if (document.frmCRGRegister.func.options[0].selected == true) {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Function\" field.");
      	document.frmCRGRegister.func.focus();
      	return;
	}
	//if (ValidateCRGDescription() 		== false) {	   return (false);	}
	if (document.frmCRGRegister.business.options[0].selected == true) {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Type of Business\" field.");
      	document.frmCRGRegister.business.focus();
      	return;
	}
	if (document.frmCRGRegister.application.options[0].selected == true) {
		alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Application\" field.");
      	document.frmCRGRegister.application.focus();
      	return;
	}
	if (ValidateCRGDownloadRegisteredUser() == false) {
		if (ValidateCRGDownloadUserName() 	== false) {	   	return (false);	}
		if (ValidateCRGDownloadPassword() 	== false) {	   	return (false);	}
		if (ValidateCRGDownloadPassword2() 	== false) {	  	return (false);	}
		if (MatchCRGPasswords() 			== false) {		return (false);	}
	}
	//document.frmCRGRegister.submit();
	return (true);
}   // *** end ValidateForm




function ValidateCRGDownloadFname() {
   if (isBlank(document.frmCRGRegister.firstname.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"First Name\" field.");
      document.frmCRGRegister.firstname.focus();
      return(false);
   }
   
   if (isSpecial(document.frmCRGRegister.firstname.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"First Name\" field");
				document.frmCRGRegister.firstname.focus();
				return false;
			}
   return (true);
} // *** end ValidateFname

function ValidateCRGDownloadUserName() {
   if (isBlank(document.frmCRGRegister.crgusername.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"User Name\" field.");
      document.frmCRGRegister.crgusername.focus();
      return(false);
   }
   if (isSpecial(document.frmCRGRegister.crgusername.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"User Name\" field");
				document.frmCRGRegister.crgusername.focus();
				return false;
			}
   return (true);
} // *** end ValidateUserName

function ValidateCRGDownloadRegisteredUser() {
   if (isBlank(document.frmCRGRegister.registered.value) == true) {
      return(false);
   }
   return (true);
} // *** end ValidateUserName

function ValidateCRGDownloadPassword() {
   if (isBlank(document.frmCRGRegister.crgpassword.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Password\" field.");
      document.frmCRGRegister.crgpassword.focus();
      return(false);
   }
    if (isSpecial(document.frmCRGRegister.crgpassword.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Password\" field");
				document.frmCRGRegister.crgpassword.focus();
				//ss
				return(false);
			}
   return (true);
} // *** end ValidatePassowrd

function ValidateCRGDownloadPassword2() {
	if (isBlank(document.frmCRGRegister.crgpassword2.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease re-enter a value for the \"Password\" field.");
      document.frmCRGRegister.crgpassword2.focus();
	      return(false);
	}
	
		return (true);
} // *** end ValidatePassword2

function MatchCRGPasswords() {

	if (document.frmCRGRegister.crgpassword2.value != document.frmCRGRegister.crgpassword.value) {
		alert("You must complete all of the required fields to register.Passwords do not match, please re-enter a values for the \"Password\" fields.");		
		document.frmCRGRegister.crgpassword.value = "" ;
		document.frmCRGRegister.crgpassword2.value = "" ;
		document.frmCRGRegister.crgpassword.focus();
				
	    return(false);
}	else{
		return(true);
	}	  
}  // *** end MatchPasswords

function ValidateCRGDownloadLname() {
   if (isBlank(document.frmCRGRegister.lastname.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Last Name\" field.");
      document.frmCRGRegister.lastname.focus();
      return(false);
   }
   if (isSpecial(document.frmCRGRegister.lastname.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Last Name\" field");
				document.frmCRGRegister.lastname.focus();
				return false;
			}
   return (true);
} // *** end ValidateLname

function ValidateCRGDownloadCompany() {
   if (isBlank(document.frmCRGRegister.company.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Company\" field.");
      document.frmCRGRegister.company.focus();
      return(false);
   }
   if (isSpecial(document.frmCRGRegister.company.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Company\" field");
				document.frmCRGRegister.company.focus();
				return false;
			}
   return (true);
} // *** end ValidateCompany

function ValidateCRGDownloadAddress1() {
   if (isBlank(document.frmCRGRegister.address1.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Address 1\" field.");
      document.frmCRGRegister.address1.focus();
      return(false);
   }
    
    
    
    if (isSpecialDesc(document.frmCRGRegister.address1.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Address 1\" field");
				document.frmCRGRegister.address1.focus();
				return false;
			}
   return (true);
} // *** end ValidateAddress1

function ValidateCRGDownloadCity() {
   if (isBlank(document.frmCRGRegister.city.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"City\" field.");
      document.frmCRGRegister.city.focus();
      return(false);
   }
   if (isSpecial(document.frmCRGRegister.city.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"City\" field");
				document.frmCRGRegister.city.focus();
				return false;
			}
   return (true);
} // *** end ValidateCity

function ValidateCRGDownloadState() {
   if (isBlank(document.frmCRGRegister.state.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"State\" field.");
      document.frmCRGRegister.state.focus();
      return(false);
   }
    if (isSpecial(document.frmCRGRegister.state.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"State\" field");
				document.frmCRGRegister.state.focus();
				return false;
			}
   return (true);
} // *** end ValidateState

function ValidateCRGDownloadZip() {
   if (isBlank(document.frmCRGRegister.zip.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Zip Code\" field.");
      document.frmCRGRegister.zip.focus();
      return(false);
   }
    if (isSpecial(document.frmCRGRegister.zip.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Zip Code\" field");
				document.frmCRGRegister.zip.focus();
				return false;
			}
   return (true);
} // *** end ValidateZip

function ValidateCRGDownloadAddress2(){
if (isSpecial(document.frmCRGRegister.address2.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Address 2\" field");
				document.frmCRGRegister.address2.focus();
				return false;
			}
   return (true);
}// *** end ValidateAddress2
function ValidateCRGDownloadPhone() {
   if (isBlank(document.frmCRGRegister.phone.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Phone\" field.");
      document.frmCRGRegister.phone.focus();
      return(false);
   }
   if (isSpecial(document.frmCRGRegister.phone.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Phone\" field");
				document.frmCRGRegister.phone.focus();
				return false;
			}
   return (true);
} // *** end ValidatePhone
function ValidateCRGDownloadFax(){
if (isSpecial(document.frmCRGRegister.fax.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Fax\" field");
				document.frmCRGRegister.fax.focus();
				return false;
			}
   return (true);
} // *** end ValidateFax

function ValidateCRGDescription(){
if (isSpecial(document.frmCRGRegister.description.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Description\" field");
				document.frmCRGRegister.description.focus();
				return false;
			}
   return (true);
} // *** end ValidateDescription
function ValidateCRGDownloadEmail() {
   if (isBlank(document.frmCRGRegister.email.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Email Address\" field.");
      document.frmCRGRegister.email.focus();
      return(false);
   }
   
    if (isSpecialEmail(document.frmCRGRegister.email.value," ")==true)
			{
				
				alert("Special Characters are not allowed in \"Email Address\" field");
				document.frmCRGRegister.email.focus();
				return false;
			}
   return (true);
} // *** end ValidateEmail

function ValidateCRGDownloadCountry() {
   if (isBlank(document.frmCRGRegister.country.value) == true) {
      alert("\nYou must complete all of the required fields to register.\nPlease enter a value for the \"Country\" field.");
      document.frmCRGRegister.country.focus();
      return(false);
   }
   return (true);
} // *** end ValidateCountry
//==================================End CRG Registration Check=======================

//==================================Begin expand and collapse function for site map===============
function menuDriver(subl, e) //subl is the div name of the sub menu items, do not pass the top level div name
{
	var targetID, srcElement, targetElement;
	//srcElement = window.event.target;

	if(e.target) //FF
		srcElement = e.target;
	if(e.srcElement) //IE
		srcElement = e.srcElement;


	targetElement = document.getElementById(subl);
	if (targetElement.style.display == "none") 
		{
	 	targetElement.style.display = "";
		srcElement.src = "menuminus.gif";
		} 
	else 
		{
        targetElement.style.display = "none";
        srcElement.src = "menuplus.gif";
     }
}
//=================================End of site map function======================================

//==================================Begin expand and collapse function for arrow toggle images===============
function menuDriverArrow(subl, imgName) //subl is the div name of the sub menu items, do not pass the top level div name
{
	var targetID, srcElement, targetElement;
	srcElement = document.getElementById(imgName);
	targetElement = document.getElementById(subl);
	if (targetElement.style.display == "none") 
		{
	 	targetElement.style.display = "";
		srcElement.src = "/images/toggle_on.jpg";
		} 
	else 
		{
        targetElement.style.display = "none";
        srcElement.src = "/images/toggle_off.jpg";
     }
}
//=================================End of site map function======================================



