function check()
{
	var name=document.form1.name.value;
	var area=document.form1.area.value;
	var contno=document.form1.mobile.value;
	var product=document.form1.product.value;
	var message= document.form1.message.value;	
	var stripped = contno.replace(/[\(\)\.\-\ ]/g,'');	
	
	if (name.length<=0)
	{
			document.form1.name.focus();
			alert ("The required field has not been filled in.");
			return false;
	} 
	else if (area.length<= 0)
	 {
			document.form1.area.focus();
			alert ("The required field has not been filled in.");
			return false;
	 } 	
	 else if (contno.length<= 0)
	{
			document.form1.mobile.focus();
			alert ("The required field has not been filled in.");
			return false;
	} 		
	else if (isNaN(parseInt(stripped))) 
	{
        document.form1.mobile.focus();
		alert("The phone number contains illegal characters.");
        return false;
    }
	 else if (!(stripped.length == 10)) 
	{
        document.form1.mobile.focus();
		alert("The phone number is the wrong length. Make sure you included an area code.");
        return false;
    } 
	else if (product.length<= 0)
	 {
			document.form1.product.focus();
			alert ("The required field has not been filled in.");
			return false;
	 } 	
	else if (message.length<= 0)
	 {
			document.form1.message.focus();
			alert ("The required field has not been filled in.");
			return false;
	 } 	
	
else 
	{	
	return true;	
	}	
}

