// JavaScript Document
function registerCheck()
	{
		var theform = document.contactform;
		
		if(theform.fullname.value == "")
		{
			alert("Full name can not empty!");
			theform.fullname.focus();
			return false;
		}
		if(theform.username.value == "")
		{
			alert("Username can not empty!");
			theform.username.focus();
			return false;
		}		
		if(theform.email.value == "")
		{
			alert("Email can not empty!");
			theform.email.focus();
			return false;
		}
		if(theform.email.value != "")
		{
			var str = theform.email.value;
			if((str.indexOf('@',0) == -1)||(str.indexOf('.') == -1)||(str.length <5))
			{
				alert("Wrong Email Format!");
				theform.email.focus();
				return false;
			}
		}
		if(theform.matkhau.value == "")
		{
			alert("Password can not empty!");
			theform.matkhau.focus();
			return false;
		}
		if(theform.repassword.value == "")
		{
			alert("Repassword can not empty!");
			theform.repassword.focus();
			return false;
		}
		if(theform.repassword.value != theform.matkhau.value)
		{
			alert("Password and Repassword don't match!");
			theform.matkhau.focus();
			return false;
		}
		if(theform.verificationcode.value == "")
		{
			alert("Verify can not empty!");
			theform.verificationcode.focus();
			return false;
		}
		if(theform.wm_checkbox_accept_in_register.checked == false)
		{
			alert("You have to accept Freebizznet terms if you login.");
			theform.wm_checkbox_accept_in_register.focus();
			return false;
		}			
	}

function isCheck()
	{
		var theform = document.contactform;
		
		if(theform.fullname.value == "") {
			alert("Please enter your name!");
			theform.fullname.focus();			
			return false;
		}
		if(theform.company.value == "")
		{
			alert("Please enter your company name!");
			theform.company.focus();
			return false;
		}		
		if(theform.diachi.value == "") {
			alert("Please enter your address");
			theform.diachi.focus();
			return false;
		}
		if(theform.dienthoai.value == "") {
			alert("Please enter your telephone");
			 
			theform.dienthoai.focus();
			return false;
		}
		if(theform.email.value == "")
		{
			alert("Please enter your email!");
			theform.email.focus();
			return false;
		}
		if(theform.email.value != "")
		{
			var str = theform.email.value;
			if((str.indexOf('@',0) == -1)||(str.indexOf('.') == -1)||(str.length <5))
			{
				alert("Wrong email format!");
				theform.email.focus();
				return false;
			}
		}	
	}
	function check_contact_us(){
		var theform = document.contact_us;

		if(theform.name.value == "")
		{
			alert("Please enter your fullname!");
			theform.name.focus();
			return false;
		}
		if(theform.email.value == "")
		{
			alert("Please enter your email!");
			theform.email.focus();
			return false;
		}
		if(theform.email.value != "")
		{
			var str = theform.email.value;
			if((str.indexOf('@',0) == -1)||(str.indexOf('.') == -1)||(str.length <5))
			{
				alert("Wrong email format!");
				theform.email.focus();
				return false;
			}
		}
		if(theform.subject.value == "")
		{
			alert("Please enter your subject!");
			theform.subject.focus();
			return false;
		}
		if(theform.content.value == "")
		{
			alert("Please enter your content!");
			theform.content.focus();
			return false;
		}		
		if(theform.verificationcode.value == "")
		{
			alert("Please enter the verification code!");
			theform.verificationcode.focus();
			return false;
		}		
	}