<!-- 
function stateChange(formobject){
document.ContactForm.State.value = document.ContactForm.lclState.value;
}

function provinceChange(formobject){
document.ContactForm.State.value = document.ContactForm.lclProvince.value;
}

if(!ErrorColor)var ErrorColor="#45657F";
if(!OkColor)var OkColor="#EEEEEE";
if(!ErrorFontColor)var ErrorFontColor="#FFFFFF";
if(!OkFontColor)var OkFontColor="#606060";

function setCountryParams(formobject){	
	
var selCountry = formobject.value;

	$("#stateLine1:visible").hide("fast");
	$("#stateLine2:visible").hide("fast");
	$("#provinceLine1:visible").hide("fast");
	$("#provinceLine2:visible").hide("fast");
	
	document.ContactForm.lclState.style.backgroundColor = OkColor;
	document.ContactForm.lclProvince.style.backgroundColor = OkColor;
	document.ContactForm.lclState.style.color = ErrorColor;
	document.ContactForm.lclProvince.style.color = ErrorColor;
	
	if(selCountry == "United States"){
		$("#stateLine1:hidden").fadeIn("fast");
		$("#stateLine2:hidden").fadeIn("fast");
		document.ContactForm.State.value = document.ContactForm.lclState.value;
	}
	
	if(selCountry == "Canada"){
		$("#provinceLine1:hidden").fadeIn("fast");
		$("#provinceLine2:hidden").fadeIn("fast");
		document.ContactForm.State.value = document.ContactForm.lclProvince.value;
	}
	
	if(selCountry != "Canada" ){
		document.ContactForm.lclProvince.value = "";
	}
	if(selCountry != "United States"){
		document.ContactForm.lclState.value = "";
	}	
}

function checkRequiredDataFields(lang, formobject) {

	var pass=true;
	var i = 0;	

	if(document.getElementById('Required'))
	{
		var anz = formobject.elements.length;
		
		for(i=0;i<anz;i++){
			var f = formobject.elements[i];			
			var idname = f.id;
			var idvalue = f.value;
			var fieldname = f.name;
 	
			if((idname == "Required") && (idvalue == "") && (fieldname != "lclState")&& (fieldname != "lclProvince")){
				f.style.backgroundColor = ErrorColor;
				f.style.color = ErrorFontColor;
				pass = false;
			}else{
				
				if((document.ContactForm.Country.value == "United States") && (fieldname == "lclState") && (idvalue == "")){
					f.style.backgroundColor = ErrorColor;
					f.style.color = ErrorFontColor;
					pass = false;
				}
				if((document.ContactForm.Country.value == "Canada") && (fieldname == "lclProvince") && (idvalue == "")){
					f.style.backgroundColor = ErrorColor;
					f.style.color = ErrorFontColor;
					pass = false;
				}	
			}
			
			if((fieldname=="Email") && (idvalue != "") && (!isEmailAddr(idvalue))){
				f.style.backgroundColor = ErrorColor;
				f.style.color = ErrorFontColor;
				pass = false;				
			}
		}
	}		

	if (!pass) {	
		if (lang=="en")var alertText = "One or more required fields have been left blank or are not correct. Please fill in the information and press submit again."
		if (lang=="de")var alertText = unescape("Eine oder mehrere Angaben sind nicht korrekt oder fehlen. Bitte %FCberpr%FCfen Sie die markierten Felder.")
		if (lang=="fr")var alertText = unescape("Un ou plusieurs champs n%27ont pas %E9t%E9 remplis correctement. Merci de bien vouloir v%E9rifier vos donn%E9es.");
		if (lang=="es")var alertText = "Por favor rellene todos los campos marcados con *"
		if (lang=="it")var alertText = "Per favore compili tutti i campi segnalati con *"
		if (lang=="nl")var alertText = "Een of meerdere verplichte velden zijn niet ingevuld of fout.  Gelieve de informatie in te geven en nogmaals te verzenden."
		if (lang=="pl")var alertText = unescape("Jedna albo wi%u0119cej podanych s%u0105 niew%u0142a%u015Bciwe lub brakuje danych. Prosz%u0119 sprawdzi%u0107 zaznaczone pola");
		if (lang=="pt")var alertText = unescape("Um ou mais campos foram deixados em branco ou preenchidos incorretamente. Por favor%2C inclua a informa%E7%E3o e clique em enviar novamente.");	
		
		alert(alertText);
		return false;
	}else{				
	    if(document.ContactForm["Country"] != undefined) var region = document.ContactForm["Region"].value = getRegion();
		if(document.ContactForm["Distribution"] != undefined)document.ContactForm["Distribution"].value = getDistribution();
		if(document.ContactForm["Ranking"] != undefined)document.ContactForm["Ranking"].value = getRanking();
		if(document.ContactForm["Scoring"] != undefined)document.ContactForm["Scoring"].value = 1;
		if(document.ContactForm["MailHeader"] != undefined)document.ContactForm["MailHeader"].value = getMailHeader();
		if(document.ContactForm["Greeting"] != undefined)document.ContactForm["Greeting"].value = doGreeting();
		
		//if(testalert)alert (" Ranking: "+ document.ContactForm["Ranking"].value + "\n Scoring: " + document.ContactForm["Scoring"].value + "\n MailHeader: " + document.ContactForm["MailHeader"].value + "\n Greeting: " + document.ContactForm["Greeting"].value);
		//if(testalert)alert ("Greeting: " + document.ContactForm["Greeting"].value);
	}
}

function getRanking(){
	var ranked = document.ContactForm["Ranking"].value;
	var RequestedService = getRequestedService();
	
	if (RequestedService=="Customer Service")ranked = unescape("4 General Request");
	if (RequestedService=="Callback - Customer Service")ranked = unescape("1 Quote Request or Callback");
	if (RequestedService=="Product Info")ranked = unescape("4 General Request");
	if (RequestedService=="Demo Request")ranked = unescape("2 Demo Request");
	if (RequestedService=="Callback")ranked = unescape("1 Quote Request or Callback");
	if (RequestedService=="Callback - Sales")ranked = unescape("1 Quote Request or Callback");
	if (RequestedService=="Quote Request")ranked = unescape("1 Quote Request or Callback");
	
	return ranked;
}

function getScoring(){	
	var returnScore=0;
	var defaultScore = parseInt(0);
	var RequestedService = getRequestedService();
	
	defaultScore = document.ContactForm["Scoring"].value;

	var scored = parseInt(defaultScore);
	var NewsletterScore = parseInt(0);
	var RequestedServiceScore = parseInt(0);	
	
	if (RequestedService=="Customer Service")RequestedServiceScore = 10;
	if (RequestedService=="Callback - Customer Service")RequestedServiceScore = 10;
	if (RequestedService=="Product Info")RequestedServiceScore = 10;
	if (RequestedService=="Demo Request")RequestedServiceScore = 40;
	if (RequestedService=="Callback")RequestedServiceScore = 30;
	if (RequestedService=="Callback - Sales")RequestedServiceScore = 30;
	if (RequestedService=="Quote Request")RequestedServiceScore = 40;

	if(document.ContactForm["Greeting"] != undefined){
		if (document.ContactForm["Newsletter"].checked )NewsletterScore = 20;
	}
	
	ReturnScore = parseInt(scored+RequestedServiceScore+NewsletterScore)*1;
	return ReturnScore;
}

function getMailHeader(){
	var RequestedService = getRequestedService();
	var defaultMailHeader = document.ContactForm["MailHeader"].value;
	var Header = defaultMailHeader;
	
	if (RequestedService=="Customer Service")Header = unescape(defaultMailHeader + "- Please forward to Customer Service");
	if (RequestedService=="Callback - Customer Service")Header = unescape(defaultMailHeader + "- Callback CS: Please forward to Customer Service");
	if (RequestedService=="Callback")Header = unescape(defaultMailHeader + "- Callback Request!");
	if (RequestedService=="Callback - Sales")Header = unescape(defaultMailHeader + "- Callback Request!");
	if (RequestedService=="Product Info")Header = unescape(defaultMailHeader + "- Requested Service: Product Info");
	if (RequestedService=="Demo Request")Header = unescape(defaultMailHeader + "- Demo Request!");
	if (RequestedService=="Quote Request")Header = unescape(defaultMailHeader + "- Quote Request!");

	return Header;
}

function getRegion(){
	var country = document.ContactForm["Country"].value;
	var region = "EUROPE";
	
	if(country == "Australia" || country == "Brunei" || country == "China" || country == "Hong Kong" || country == "India" || country == "Indonesia" || country == "Japan" || country == "Korea" || country == "Malaysia" || country == "Myanmar" || country == "New Zealand" || country == "Philippines" || country == "Singapore" || country == "South Korea" || country == "Sri Lanka" || country == "Taiwan" || country == "Thailand" || country == "Vietnam"){ 
		region = "ASIA";
	}
	if(country == "USA" || country == "United States" || country == "Canada" || country == "Mexico" || country == "Brazil" || country == "Costa Rica" || country == "Guatemala" || country == "Honduras" || country == "Puerto Rico" || country == "Chile" || country == "Argentina" || country == "Panama" || country == "Peru" || country == "Bolivia" || country == "Ecuador" || country == "Colombia" || country == "Venezuela"){ 
		region = "AMERICAS";
	}
	
return region;

//switch (country){
//case "Australia": return "ASIA"; break;
//default : return "EUROPE"
}		

function getDistribution(){
	var country = document.ContactForm["Country"].value;
	var distribution = "yes";
	
	if(country == "Australia" || country == "Brunei" || country == "China" || country == "Hong Kong" || country == "India" || country == "Indonesia" || country == "Japan" || country == "Korea" || country == "Malaysia" || country == "Myanmar" || country == "New Zealand" || country == "Philippines" || country == "Singapore" || country == "South Korea" || country == "Sri Lanka" || country == "Taiwan" || country == "Thailand" || country == "Vietnam"){ 
		distribution = "no";
	}
	if(country == "USA" || country == "United States" || country == "Canada" || country == "Mexico" || country == "Brazil" || country == "Costa Rica" || country == "Guatemala" || country == "Honduras" || country == "Puerto Rico" || country == "Chile" || country == "Argentinia" || country == "Panama" || country == "Peru" || country == "Bolivia" || country == "Ecuador" || country == "Colombia" || country == "Venezuela"){ 
		distribution = "no";
	}
	if(country == "UK" || country == "United Kingdom" || country == "Germany" || country == "Spain" || country == "Italy" || country == "France" || country == "Austria" || country == "Belgium" || country == "Netherlands" || country == "Luxembourg" || country == "Ireland" || country == "Switzerland" || country == "Poland" || country == "Portugal"){ 
		distribution = "no";
	}
	return distribution;

//switch (country){
//case "Australia": return "no"; break;
//case "Russia": return "yes"; break;
//default : return "yes"
}

function getRequestedService(){
	var RequestedService ="";
	if (document.ContactForm["Subject"])var SubjectObject = document.ContactForm["Subject"];
	if (document.ContactForm["RequestedService"])var SubjectObject = document.ContactForm["RequestedService"];	
	if(SubjectObject){
	if (SubjectObject.type=="hidden") {
		RequestedService = SubjectObject.value;
	}else{		
		var anz2 = SubjectObject.length;
		for(var j=0;j<anz2;j++){
			var f2 = SubjectObject[j];
			if (f2.checked || f2.selected)	RequestedService = SubjectObject[j].value;			
		}
	}	
	}
	return RequestedService;
}

function doGreeting(){
	var Greeting ="";
	var Salut = "";
	if (document.ContactForm["Salutation"]){
		var SubjectObject = document.ContactForm["Salutation"];
		for(var s=0;s<2;s++){
			var s2 = SubjectObject[s];
			if (s2.checked || s2.selected)	Salut = SubjectObject[s].value;			
		}
	}
	
	var SiteSource = document.ContactForm["Language"].value;
	var FirstN = document.ContactForm["FirstName"].value;
	var LastN = document.ContactForm["LastName"].value;
	
	if (SiteSource == "DE" || SiteSource == "CH_DE"){
		if (Salut == "Mr.") Greeting = "Guten Tag Herr";
		if (Salut == "Mrs.") Greeting = "Guten Tag Frau";
		if (LastN == "") Greeting = "Guten Tag";
	}if (SiteSource == "UK" || SiteSource == "DISTRI"){
		if (Salut == "Mr.") Greeting = "Dear Mr.";
		if (Salut == "Mrs.") Greeting = "Dear Ms.";
		if (LastN == "") Greeting = "Dear Sir or Madam";
	}if (SiteSource == "FR"){
		if (Salut == "Mr.") Greeting = "Bonjour Monsieur";
		if (Salut == "Mrs.") Greeting = "Bonjour Madame";
		if (LastN == "") Greeting = "Madame, Monsieur";
	}if (SiteSource == "NL" || SiteSource == "BEN"){
		if (Salut == "Mr.") Greeting = "Geachte heer";
		if (Salut == "Mrs.") Greeting = "Geachte mevrouw";
		if (LastN == "") Greeting = "Geachte";
	}if (SiteSource == "IT"){
		if (Salut == "Mr.") Greeting = "Gentile Signor";
		if (Salut == "Mrs.") Greeting = "Gentile Signora";
		if (LastN == "") Greeting = "Gentili Signore e Signori";
	}if (SiteSource == "ES"){
		if (Salut == "Mr.") Greeting = unescape("Estimado Se%F1or");
		if (Salut == "Mrs.") Greeting = unescape("Estimado Se%F1ora");
		if (LastN == "") Greeting = unescape("Estimado Se%F1orres nuestros");
	}if (SiteSource == "PL"){
		Greeting = "Szanowni Panstwo";
	}
	
	return Greeting;
}

function clearBox(lclObj,message){
	if(lclObj.value==message){
		lclObj.value = "";
	}
}

function bgWhite(object){
	object.style.backgroundColor = OkColor;
	object.style.color = OkFontColor;
}

function bgGrey(object){
	object.style.backgroundColor = OkColor;	
	object.style.color = OkFontColor;
}


function isEmailAddr(str) 
{
	return str.match(/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/);
}	
	
	
function openPr(popName,popUrl,w,h){
	var windowPrefs="width="+w+",height="+h+",left=100,top=100,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no";
	popWindow=window.open(popUrl,popName, windowPrefs);
	popWindow.focus();
}

-->
