
function checkemail(){
	evalue=document.FormName.Email.value;
	if(evalue.length &&(evalue.indexOf("@")==0||evalue.indexOf("@")==-1||evalue.indexOf(".")==-1||evalue.indexOf(".")==0))
	{
	alert("Invalid E-Mail address.\n"+"Format is: abc@domainname.com");
    //document.FormName.Email.value="";
	 document.FormName.Email.focus();
	}
	}

function bclick(){

    if(trim(document.FormName.FullName.value)==''){
    document.FormName.FullName.focus();
    alert("Please make sure Name is not left blank");
   	return false;
    }

    if(trim(document.FormName.Phone.value)==''){
    document.FormName.Phone.focus();
    alert("Please make sure Phone is not left blank");
	return false;
    }
    if(trim(document.FormName.Email.value)==''){
    document.FormName.Email.focus();
    alert("Please make sure Email is not left blank");
    return false;
    }
    if(trim(document.FormName.Suburb.value)==''){
    document.FormName.Suburb.focus();
    alert("Please make sure Suburb is not left blank");
    return false;
    }
	if(trim(document.FormName.hear_aboutus.value)=='0'){
    document.FormName.hear_aboutus.focus();
    alert("Please make sure How did you hear about us? is not left blank");
   	return false;
    }
	
	

    if(trim(document.FormName.Help.value)==''){
    document.FormName.Help.focus();
    alert("Please make sure How can we Help you? is not left blank");
    return false;
	
	
    }
	else{
    document.FormName.action="contactus.php";
    document.FormName.submit();
    }

}

function trim(input_val) {
	while(''+input_val.charAt(input_val.length-1)==' ')
	{
		input_val = input_val.substring(0,input_val.length-1);
	}
	return input_val;
 }

// JavaScript Document