
function validate_quickcontact(thisform)
{
	with (thisform)
	{
	//	if(fname.value=="Name")fname.value="";	
	if (emptyvalidation(offname,"Woops! You Forgot to Fill in Your Name")==false) 
		{
		offname.focus();
		return false;	
		}
		
	//	if(fname.value=="Address")fname.value="";	
	if (emptyvalidation(address,"Woops! You Forgot to Fill in Your Address")==false) 
		{
		address.focus();
		return false;	
		}
		
		if (emptyvalidation(email,"Woops! You Forgot to Fill in Your Email Address")==false) 
		{
		email.focus();
		return false;	
		}	
		
	//	if(fname.value=="Phone")fname.value="";	
	if (emptyvalidation(phone,"Woops! You Forgot to Fill in Your Phone")==false) 
		{
		phone.focus();
		return false;	
		}
		

  var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   var eaddress = thisform.email.value;
  
	if(reg.test(eaddress) == false) 
	{ 
      alert('Woops! You have Entered an Invalid Email Address');
	  email.focus();
	  return false;
   }
		
	/*if(email.value=="Email")email.value=""; */	

	
	}
	thisform.submit();
}
function validate_login(thisform)
{
	
	thisform.submit();
}



function emptyvalidation(entered, alertbox)
{
	with (entered)
	{
		while (value.charAt(0) == ' ')
			value = value.substring(1);
		while (value.charAt(value.length - 1) == ' ')
			value = value.substring(0, value.length - 1);
		if (value==null || value=="")
		{
			if (alertbox!="") alert(alertbox);
			return false;
		}
		else return true;
	}
}



