function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}
function validatedentist(str1)
{
	//alert("check");	return false;
	
 	if(trim(str1.name.value) == ""  || trim(str1.name.value) == "Name")
	{
		alert("please enter name.");
		str1.name.focus();
		return false;
	} 
	
	
	if(trim(str1.company.value) == ""  || trim(str1.company.value) == "Company")
	{
		alert("please enter company.");
		str1.company.focus();
		return false;
	}
	
	if(trim(str1.phone.value) == ""  || trim(str1.phone.value) == "Phone")
	{
		alert("please enter Phone.");
		str1.phone.focus();
		return false;
	}
	
	
	if(trim(str1.email.value) == "" || trim(str1.email.value) == "Email Address" )
	{
		alert("please enter Email Address.");
		str1.email.focus();
		return false;
	}
	else
	{
		emailExp= /^\w+(\-\w+)*(\.\w+(\-\w+)*)*@\w+(\-\w+)*(\.\w+(\-\w+)*)+$/;
	 	 if (!(emailExp.test(str1.email.value)))
		{ 
			   alert("invalid Email address.");
			   str1.email.focus();
			   return false;  
		} 
	}
	
	if(trim(str1.comments.value) == ""  || trim(str1.comments.value) == "Comments")
	{
		alert("please enter Comments.");
		str1.comments.focus();
		return false;
	}

}


