function check() {
var name=document.mwform.name.value;
var suburb=document.mwform.suburb.value;
var contact=document.mwform.contact.value;
var emailx=document.mwform.emailx.value;
var hcontact=document.mwform.hcontact.value;
var rooms=document.mwform.rooms.value;
var msg=document.mwform.msg.value;

if (name==""){
        alert("Please type in your name.");
				document.mwform.name.focus();
				return false;   
								
}

if (emailx==""){
	 			alert("Please enter your email address");
				document.mwform.emailx.focus();
				return false;
}

if ((document.mwform.emailx.value.indexOf ('@',0) == -1 || document.mwform.emailx.value.indexOf ('.',0) == -1) && document.mwform.emailx.value != "")
{
	alert("Please enter a valid email address");
	document.mwform.emailx.focus();
	return false;
}

if (contact==""){
	 			alert("Please enter your phone number");
				document.mwform.contact.focus();
				return false;
}

if (isNaN(contact)) {
        alert("Invalid contact information. Please enter numbers only.");
        document.mwform.contact.focus();
        return false;
}


if (isNaN(rooms)) {
        alert("Invalid contact information. Please enter numbers only.");
        document.mwform.rooms.focus();
        return false;
}

if (isNaN(hcontact)) {
        alert("Invalid contact information. Please enter numbers only.");
        document.mwform.hcontact.focus();
        return false;
}


else return true;
}
