function chsub(theForm) {
	
		if ( myForm.companyname.value.length < 1 ) {
                alert("Please input your company name.")
        }
        else if ( myForm.maddr1.value.length < 1 ) {
                alert("Please input your address.")
        }
        else if ( myForm.city.value.length < 1 ) {
                alert("Please input your city.")
        }
        else if ( myForm.country.value.length < 1 ) {
                alert("Please input your country.")
        }
        else if ( myForm.postcode.value.length < 1 ) {
                alert("Please input your postcode.")
        }
        else if ( myForm.phone.value.length < 1 ) {
                alert("Please input a phone number.")
        }
        else if ( myForm.contactor.value.length < 1 ) {
                alert("Please input a contact name.")
        }
        else if ( myForm.position.value.length < 1 ) {
                alert("Please input the position.")
        }
        else if ( myForm.useremail.value.indexOf('@', 0) == -1 ) {
                alert("Please input a valid email address.")
        }
        else {
				document.myForm.submit();
				return true;
        }
        return false;
	}
	
function winopen(name) 
{msg1=open(name,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=550,height=650");}

function checkit(theForm) {
	if(theForm.name.value==""){
		alert("Please fill in your name!");
		theForm.name.focus();
		return(false);
	}
	if(theForm.email.value==""){
		alert("Please fill in email address!");
		theForm.email.focus();
		return(false);
	}else{
		if(theForm.email.value.indexOf("@")==-1 || theForm.email.value.indexOf(".")==-1){
			alert("Email address is not correct!");
			theForm.email.focus();
			return(false);
		}
	}
	return (true);
}

