// JavaScript Document
function validate_register()
{
	var form = document.getElementById("frm_register");
	if(GenValidation(form.txt_username,'username.','','')==0)
		return false;
	if(EmailValidation(form.txt_username)==0)
		return false;
	if(GenValidation(form.txt_passwd,'password.','','')==0)
		return false;
	if(GenValidation(form.txt_conPass,'confirm password.','','')==0)
		return false;
	if(form.txt_passwd.value != form.txt_conPass.value)
	{
		alert("Confirm password doesn't match. Please try again.");
		form.txt_conPass.value="";
		form.txt_conPass.focus();
		return false;
	}
	if(GenValidation(form.txt_name,'name.','','space')==0)
		return false;
	if(document.getElementById("radio_male").checked==false && document.getElementById("radio_female").checked==false)
	{
		alert("Please select gender.");
		document.getElementById("radio_male").focus();
		return false;
	}
	if(GenValidation(form.txt_secCode,'security code.','','')==0)
		return false;
}
function setFocus()
{
	document.getElementById('txt_username').focus();	
	return false;
}





