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);
    }
    //while (retValue.indexOf(" ") != -1) { // Note that there are two 
 //spaces in the string - look for multiple spaces within the string
    //retValue = retVal
//}
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 validate1()
    {
        if(trim1(document.getElementById('FrmTst').name.value)=="")
        {
            alert("Please Enter Your Name")
            document.getElementById('FrmTst').name.focus();
            return false;
        }
				
	else	if(trim1(document.getElementById('FrmTst').company.value)=="")
        {
            alert("Please Enter Your Company")
            document.getElementById('FrmTst').company.focus();
            return false;
        }
				
	else	if(trim1(document.getElementById('FrmTst').phone.value)=="")
        {
            alert("Please Enter Your Telephone")
            document.getElementById('FrmTst').phone.focus();
            return false;
        }			
				
	else if(trim1(document.getElementById('FrmTst').email.value)=="")
        {
            alert("Please Enter Your Email")
            document.getElementById('FrmTst').email.focus();
  }
  

  else if(eval(vld_Email).test(document.getElementById('FrmTst').email.value)==false)
    {
              alert("Please Enter a valid Email");
        document.getElementById('FrmTst').email.focus();
              return (false);
    }
    		
			
	else
        {
   document.getElementById('FrmTst').submit();
  }
    }