function validate_required()
{
	if(document.form1.cmp.value == "" )
    {
		alert ( "Please fill in the 'Company Name'" );
        return false;
    } 
	
	if(document.form1.name.value == "" )
    {
        alert ( "Please fill in the 'Name'" );
        return false;
    } 

	//if ( document.form1.add.value == "" )
//        {
//                alert ( "Please fill in the 'Address' box." );
//                valid = false;
//        } 
	if(document.form1.txt_phone.value == "" )
    {
        alert ( "Please fill in the 'Phone Number' box." );
        return false;
    } 
//	else
//	{
//		var mobnum=document.form1.txt_phone.value;
//		if(isNaN(mobnum))
//		{
//		    alert("Please Enter Numeric value as Phone number");
//			return false;
//		}
//	}
		
//	if(document.form1.txt_fax.value != "" )
//    {
//		var domtext=document.form1.txt_fax.value;
//		if(isNaN(domtext))
//		{
//		    alert("Please Enter Numeric values as Fax ");
//			return false;
//		}
//	 }

       if ( document.form1.txt_emailid.value == "" )
        {
            alert ( "Please fill in the 'Your email'" );
            return false;
        }
		else
		{
			var email=document.getElementById("txt_emailid").value;
			 if(((email.indexOf('@',1))==-1)||(email.indexOf('.',1))==-1 ) /* this portion 	is checking wheather the email                                                                            contains @ and . */ 
			 {
		          alert("Invalid Email ID");
		          return false;
			 }
		}
	 
		/*if ( document.form1.security_code.value == "" )
        {
                alert ( "Please fill in the 'Security Code' box." );
                return false;
        }*/ 	
		//alert(document.getElementById('id_submit').style.display);
		if(document.getElementById('id_submit').style.display == "block")
		{
			document.getElementById('id_submit').style.display = "none";
			document.getElementById('id_wait').style.display = "block";
		}
		
        return true;
}


