// JavaScript Document
function check_register()
{	
	if(document.frm_register.uname.value=="")
	{
		alert("Vui long nhap vao username");
		document.frm_register.uname.focus();
		return false;
	}
	
	if(document.frm_register.upass.value=="")
	{
		alert("Vui long nhap vao password");
		document.frm_register.upass.focus();
		return false;		
	}
	if(document.frm_register.upass.value!=document.frm_register.veri_upass.value)
	{
		alert("Vui long nhap lai password");
		document.frm_register.veri_upass.focus();
		return false;		
	}
	if(document.frm_register.fullname.value=="")
	{
		alert("Vui long nhap vao ho ten");
		document.frm_register.fullname.focus();
		return false;
	}
	if(document.frm_register.year.value=="")
	{
		alert("Vui long nhap vao nam sinh");
		document.frm_register.year.focus();
		return false;
	}
	if(document.frm_register.email.value=="")
	{
		alert("Vui long nhap vao email");
		document.frm_register.email.focus();
		return false;
	}
	if(document.frm_register.phone.value=="")
	{
		alert("Vui long nhap vao dien thoai");
		document.frm_register.phone.focus();
		return false;
	}
	if(document.frm_register.address.value=="")
	{
		alert("Vui long nhap vao dia chi lien he");
		document.frm_register.address.focus();
		return false;
	}
	if(document.frm_register.countries.value=="")
	{
		alert("Vui long nhap vao Quoc gia");
		document.frm_register.countries.focus();
		return false;
	}
	if(document.frm_register.sec_code.value!=document.frm_register.veri_code.value)
	{
		alert("Vui long nhap vao ma bao ve");
		document.frm_register.sec_code.focus();
		return false;
	}
	
	return true;
}
function check_changepass()
{
	if(document.frm_changepass.oldpass.value=="")
	{
		alert("Vui long nhap vao mat khau hien tai");
		document.frm_changepass.oldpass.focus();
		return false;
	}
	if(document.frm_changepass.upass.value=="")
	{
		alert("Vui long nhap vao mat khau moi");
		document.frm_changepass.upass.focus();
		return false;
	}
	if(document.frm_changepass.confirmupass.value=="")
	{
		alert("Vui long nhap lai mat khau moi");
		document.frm_changepass.confirmupass.focus();
		return false;
	}
	if(document.frm_changepass.confirmupass.value!=document.frm_changepass.upass.value)
	{
		alert("Vui long nhap lai mat khau moi");
		document.frm_changepass.confirmupass.focus();
		return false;
	}
	
	return true;
}
