function tohis(valu)
	{
		if(valu==1)
			{
				document.all.mot.style.display = 'none';
				document.all.hai.style.display = '';
			}
		else
			{
				document.all.mot.style.display = '';
				document.all.hai.style.display = 'none';
			}
	}
function showATM(what){
		if(what.value == 3)  document.all.showatm.style.display = ''
				else document.all.showatm.style.display = 'none'
		if(what.value == 5)  document.all.showdkthuphi.style.display = ''
				else document.all.showdkthuphi.style.display = 'none'
}
function checkform()
{
   if (regform.name.value=="")
   {
   		alert("Vui long dien vao Ho va ten");
   		regform.name.focus();
   		return false;
   	}
   	if(regform.code.value == "")	{
				alert('vui long nhap CMND hoac MST cua ban !')
				regform.code.focus()
				return false
			}
			else
			{
				if(isNaN(regform.code.value) || (regform.code.value.length<9 || regform.code.value.length>10))	{
						alert('Ma so phai la kieu so va co 9-10 ky tu!')
						regform.code.focus()
						return false
					}
			}
	if (regform.address.value=="")
   {
   		alert("Vui long dien vao dia chi");
   		regform.address.focus();
   		return false;
   	}
   	if(regform.tel.value == "")	{
				alert('vui long nhap vao so dien thoai cua ban')
				regform.tel.focus()
				return false
			}
			else if(isNaN(regform.tel.value))	{
						alert('Dien thoai phai la kieu so !')
						regform.tel.focus()
						return false
					}
	if(regform.fax.value != "")
				if (isNaN(regform.fax.value))
				{
					alert('Fax phai la kieu so !')
					regform.fax.focus()
					return false
				}
   if (regform.email.value=="")
   {
   		alert("Vui long nhap vao Email");
   		regform.email.focus();
   		return false;
   }
   else
		{
		if(regform.email.value.indexOf("@")<0||regform.email.value.indexOf(".")<regform.email.value.indexOf("@")+1)
		{
				alert("Vui long nhap dung dia chi Email!");
				regform.email.focus();
				return false;
		}
	}
	if(regform.email2.value != "")	{
				if(regform.email2.value.indexOf('@') < 0 || regform.email2.value.indexOf('.') <= regform.email2.value.indexOf('@')+1)	{
					alert('Email thu 2 khong dung. Vui long nhap lai. Vi du: name@company.com');
					regform.email2.focus();
					return false;
				}
			}
	/*
	if (regform.username.value=="")
	{
		alert("Vui long nhap vao ten dang ky");
		regform.username.focus();
		return false;
	}
	if (regform.password.value=="")
	{
		alert("Vui long nhap vao password");
		regform.password.focus();
		return false;
	}
	if (regform.password1.value!=regform.password.value)
	{
		alert("Password nhap lai khong dung. Vui long kiem tra lai");
		regform.password1.focus();
		return false;
	}
	*/
	if (isNaN(regform.moneyadd.value) )
	{
		alert("Vui long nhap vao so tai khoan can nap!");
		regform.moneyadd.focus();
		return false;
	}
	if (regform.dailyadd.value==1 && regform.moneyadd.value < 5000000)
	{
		alert("Vui long nhap lai so tien it nhat la 5.000.000 VND ");
		regform.moneyadd.focus();
		return false;
	}
	if (regform.dailyadd.value==2 && regform.moneyadd.value<1500000)
	{
		alert("So tien nap them it nhat la 1.500.000 VND ");
		regform.moneyadd.focus();
		return false;
	}
	if (regform.cachthanhtoan.value=="")
	{
		alert("Vui long chon cach thanh toan!");
		regform.cachthanhtoan.focus();
		return false;
	}else{
			if (regform.cachthanhtoan.value==3)
			{
				if (regform.sotaikhoanatm.value.length!=13)
			 	{
					  alert("Vui long nhap 13 so tai khoan ATM!");
					  regform.sotaikhoanatm.focus();
					  return false;
				}
			}
		}
		if (regform.security.value=="")
		{
			alert("Vui long nhap ma so bao ve");
			regform.security.focus();
			return false;
		 }else{
			if (regform.security.value!=regform.security2.value)
			{
				  alert("Da nhap ma so bao ve sai! Vui long nhap lai!");
				  regform.security.focus();
				  return false;
			}
		 }

   return true;
}
