<!-- 
function stateChange(formobject){
document.ContactForm.State.value = document.ContactForm.lclState.value;
}

function provinceChange(formobject){
document.ContactForm.State.value = document.ContactForm.lclProvince.value;
}

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 = "#FFFFFF";
	document.ContactForm.lclProvince.style.backgroundColor = "#FFFFFF";
	document.ContactForm.lclState.style.color = "#606060";
	document.ContactForm.lclProvince.style.color = "#606060";
	
	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(alertText, 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 = "#FF9900";
				f.style.color = "#000000";
				pass = false;
				
				if((document.ContactForm.Country =="United States") && (fieldname == "lclState") && (idvalue == "")){
					f.style.backgroundColor = "#FF9900";
					f.style.color = "#000000";
					pass = false;
				}
				if((document.ContactForm.Country =="Canada") && (fieldname == "lclProvince") && (idvalue == "")){
					f.style.backgroundColor = "#FF9900";
					f.style.color = "#000000";
					pass = false;
				}
			
            }
			if((fieldname=="Email") && (idvalue != "") && (!isEmailAddr(idvalue))){
				f.style.backgroundColor = "#FF9900";
				f.style.color = "#000000";
				pass = false;				
			}
		}
	}	
	

	if (!pass) {	
		alert(alertText);
		return false;
	}else {
		
		var anzBundles = document.ContactForm.Bundles.length;
		var BundleName = "\n\n Choosen Bundles: \n";	
		var RequestVar = "";
		var RequestVar = document.ContactForm.Message.value;
		document.ContactForm.Request.value = "";
		
		
		if (document.ContactForm.Subject.value !="") {
			RequestVar += "\n\n Requested Service: "+ document.ContactForm.Subject.value + "\n\n Selected Bundles: \n";
		}
		
		for(k=0;k<anzBundles;k++){		
			if ((document.ContactForm.Bundles[k].checked) == true) {				
				BundleName = document.ContactForm.Bundles[k].value;
				RequestVar += "\n "+ BundleName + ", ";
			}	    	
		}
		document.ContactForm.Request.value = RequestVar
		//alert (" Request ist nun: "+ document.ContactForm.Request.value);
		
	}
}


function clearBox(lclObj,message){
	if(lclObj.value==message){
		lclObj.value = "";
	}
}

function selectBundle(Bundle){	
		document.ContactForm.Bundles[Bundle].checked = true;
		//alert ("Bundle wird gesetzt: "+ document.ContactForm.Bundles[Bundle].value);	
}

function bgWhite(object){
	object.style.backgroundColor = "#FFFFFF";	
	object.style.color = "#606060";
}


function checkform(of)
{
	var reqfields,em,i,f,ty;
	if(document.getElementById('Required'))
	{
		reqfields=document.getElementById('Required').value.split(',');
		if(document.getElementById('errormsg')){
			em=document.getElementById('errormsg');
			em.parentNode.removeChild(em);
		}
		for(i=0;i<reqfields.length;i++)
		{
			f=document.getElementById(reqfields[i]);
			if(f.previousSibling && /img/i.test(f.previousSibling.nodeName)){
				f.parentNode.removeChild(f.previousSibling);
			}
			f.style.background='transparent';
			if(f){
				ty=f.type.toLowerCase();
				switch(ty)
				{
					case 'text':
						if(f.value==''){adderr(f.id,of)}							
						if(f.id=='email' && !isEmailAddr(f.value)){adderr(f.id,f.id,of)}							
					break;
					case 'textarea':
						if(f.value==''){adderr(f.id,of)}							
					break;
					case 'checkbox':
						if(!f.checked){adderr(f.id,of)}							
					break;
					/* extend as needed */
				}
			}
			
		}
		
	}
	if(document.getElementById('errormsg'))
	{
		return false;
	}
}


function isEmailAddr(str) 
{
	return str.match(/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/);
}
		
		

-->
