	function trim1(inputString)
	{
	if (typeof inputString != "string")
	{
	return inputString;
	}
	var retValue = inputString;
	var ch = retValue.substring(0, 1);
	while (ch == " ")
	{ // Check for spaces at the beginning of the string
	retValue = retValue.substring(1, retValue.length);
	ch = retValue.substring(0, 1);
	}
	ch = retValue.substring(retValue.length-1, retValue.length);
	while (ch == " ")
	{ // Check for spaces at the end of the string
	retValue = retValue.substring(0, retValue.length-1);
	ch = retValue.substring(retValue.length-1, retValue.length);
	}
	
	return retValue;
	}
    var vld_Email =  
/^(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,5}|[0-9]{1,3})(\]?))?$/;
 
function temp(){
}
 

    function validate()
    {
        if(trim1(document.mailform3.name.value)=="")
        {
            alert("Please enter the Name")
            document.mailform3.name.focus();
            return false;
        }
		 else if(trim1(document.mailform3.last_name.value)=="")
        {
            alert("Please enter the Last Name")
            document.mailform3.last_name.focus();
            return false;
        }
		else if(trim1(document.mailform3.company_name.value)=="")
        {
            alert("Please enter the Company Name")
            document.mailform3.company_name.focus();
            return false;
        }
		
		else if(trim1(document.mailform3.telephone.value)=="")
        {
            alert("Please enter the Telephone")
            document.mailform3.telephone.focus();
            return false;
        }
		else if(isNaN(parseInt(document.mailform3.telephone.value)))
        {
            alert("Please enter the Valid Telephone")
			document.mailform3.telephone.value="";			
            document.mailform3.telephone.focus();
            return false;
        }
		
		else
  if(trim1(document.mailform3.email.value)=="")
        {
            alert("Please enter the Email")
            document.mailform3.email.focus();
  }
  else if(eval(vld_Email).test(document.mailform3.email.value)==false)
    {
              alert("Please enter a valid Email Address");
        document.mailform3.email.focus();
              return (false);
    }
	 
 	
	else
        {
   document.mailform3.submit();
  }
    }
