function ValidateDoc()
{
    var cr        = unescape("%0D");
    var ErrorMsg  = "Please check the following error(r):"+cr+cr;
    var InitLen   = ErrorMsg.length;
    var TheForm   = document.form1;

    if (TheForm.name.value.length < 1)
        ErrorMsg =  ErrorMsg + "Name" + cr;
    if (TheForm.phone.value.length < 1)
        ErrorMsg =  ErrorMsg + "Phone" + cr;
	
	if (TheForm.email.value.length < 1)
       ErrorMsg =  ErrorMsg + "Email" + cr;
    else if (TheForm.email.value.length < 4 || TheForm.email.value.indexOf ('@', 0) == -1 || TheForm.email.value.indexOf ('.', 0) == -1 || (TheForm.email.value.substring(1,0)=='@'))
        ErrorMsg =  ErrorMsg + "Your email is not invalid."+cr;
		
    if (TheForm.fax.value.length < 1)
        ErrorMsg =  ErrorMsg + "Fax" + cr;
     
   if ( ErrorMsg.length > InitLen )
   {
        alert( ErrorMsg );
        return (false);
   }
    return(true);
}

function ValidateDocF()
{
    var cr        = unescape("%0D");
    var ErrorMsg  = "Please check the following error(r):"+cr+cr;
    var InitLen   = ErrorMsg.length;
    var TheForm   = document.form2;

    if (TheForm.name.value.length < 1)
        ErrorMsg =  ErrorMsg + "Name" + cr;
    if (TheForm.phone.value.length < 1)
        ErrorMsg =  ErrorMsg + "Phone" + cr;
	
	if (TheForm.email.value.length < 1)
       ErrorMsg =  ErrorMsg + "Email" + cr;
    else if (TheForm.email.value.length < 4 || TheForm.email.value.indexOf ('@', 0) == -1 || TheForm.email.value.indexOf ('.', 0) == -1 || (TheForm.email.value.substring(1,0)=='@'))
        ErrorMsg =  ErrorMsg + "Your email is not invalid."+cr;
		
    if (TheForm.fax.value.length < 1)
        ErrorMsg =  ErrorMsg + "Fax" + cr;
     
   if ( ErrorMsg.length > InitLen )
   {
        alert( ErrorMsg );
        return (false);
   }
    return(true);
}

function ValidateContact() {
	var cr        = unescape("%0D");
    var ErrorMsg  = "Please check the following error(r):"+cr+cr;
    var InitLen   = ErrorMsg.length;
    var TheForm   = document.contactEn;
	
	
   
	
	if (TheForm.emailfrom.value.length < 1)
       ErrorMsg =  ErrorMsg + "Email" + cr;
    else if (TheForm.emailfrom.value.length < 4 || TheForm.emailfrom.value.indexOf ('@', 0) == -1 || TheForm.emailfrom.value.indexOf ('.', 0) == -1 || (TheForm.emailfrom.value.substring(1,0)=='@'))
        ErrorMsg =  ErrorMsg + "Your email is not invalid."+cr;
		
	 if (TheForm.subject.value.length < 1)
        ErrorMsg =  ErrorMsg + "Subject" + cr;	
	
	if ( ErrorMsg.length > InitLen )
   {
        alert( ErrorMsg );
        return (false);
   }
    return(true);
}

function ValidateContactF() {
	var cr        = unescape("%0D");
    var ErrorMsg  = "Please check the following error(r):"+cr+cr;
    var InitLen   = ErrorMsg.length;
    var TheForm   = document.contactF;
	
	
   
	
	if (TheForm.emailfrom.value.length < 1)
       ErrorMsg =  ErrorMsg + "Email" + cr;
    else if (TheForm.emailfrom.value.length < 4 || TheForm.emailfrom.value.indexOf ('@', 0) == -1 || TheForm.emailfrom.value.indexOf ('.', 0) == -1 || (TheForm.emailfrom.value.substring(1,0)=='@'))
        ErrorMsg =  ErrorMsg + "Your email is not invalid."+cr;
		
	 if (TheForm.subject.value.length < 1)
        ErrorMsg =  ErrorMsg + "Subject" + cr;	
	
	if ( ErrorMsg.length > InitLen )
   {
        alert( ErrorMsg );
        return (false);
   }
    return(true);
}
