function validatecontactusform(anywareform)
{
	if (anywareform.company.value=="") {
		window.alert("Please enter Company Name.");
		anywareform.company.focus();
		return false;
	}
	if (anywareform.title.value=="") {
		window.alert("Please enter your Title.");
		anywareform.title.focus();
		return false;
	}
	if (anywareform.firstname.value=="") {
		window.alert("Please enter your Name.");
		anywareform.firstname.focus();
		return false;
	}
	if (anywareform.phone.value=="") {
		window.alert("Please enter your Telephone.");
		anywareform.phone.focus();
		return false;
	}
	if (anywareform.fax.value=="") {
		window.alert("Please enter your Fax.");
		anywareform.fax.focus();
		return false;
	}
	if (anywareform.email.value=="") {
		window.alert("Please enter your Email.");
		anywareform.email.focus();
		return false;
	}
	var sCont = document.anywareform.email;
	var sContVal = document.anywareform.email.value;

	var str=new String();
	str=sContVal;
	var span=new RegExp("[ ]","g");
	var rep=str.replace(span,"9");          

	if (sContVal.length != 0)
    {
    	if(sContVal == ''  || isNaN(rep) == false)
        {
		alert("Please enter email with correct format");
        sCont.focus();
        sCont.select();
        return false;
        }                         
                         
        var sAtSym    = sContVal.indexOf('@')
        var sAtSym2       = sContVal.lastIndexOf('@')
        var sPeriod   = sContVal.lastIndexOf('.')
        var sSpace    = sContVal.indexOf(' ')
        var sLength   = sContVal.length - 1   
          
        if ( (sAtSym < 2) || (sAtSym != sAtSym2) || (sPeriod <= sAtSym+2) || (sPeriod == sLength ) || (sSpace  != -1) )                  
    	{
        alert("Please enter email with correct format");
        sCont.focus();
        sCont.select();
        return false;
        }
    }
	
	if (anywareform.enquiries.value=="") {
		window.alert("Please enter your Enquires.");
		anywareform.enquiries.focus();
		return false;
	}
}
