function valreg() {
	// first name
	if (document.all.regfname.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your first name."); 
		document.all.regfname.focus(); return false; 
	}
	// last name
	if (document.all.reglname.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your last name."); 
		document.all.reglname.focus(); return false; 
	}	
	// email
	if (document.all.regemail.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your email address."); 
		document.all.regemail.focus(); return false; 
	}	
	else { 
		dmn = document.all.regemail.value.substr(document.all.regemail.value.indexOf("@")+1,document.all.regemail.value.length);
		if((document.all.regemail.value.indexOf("@")<1) ||(dmn.indexOf("@")>-1) || (dmn.indexOf(".")<1) || (dmn.indexOf(".")>dmn.length-2)) {
			alert("Please type a valid email address.\nEx : (yourname@balinter.net)."); document.all.regemail.focus(); return false; 
		}
	}
	// street addr
	if (document.all.regaddr.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your street address."); 
		document.all.regaddr.focus(); return false; 
	}
	// city
	if (document.all.regcity.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your city."); 
		document.all.regcity.focus(); return false; 
	}
	// country
	if (document.all.regcountry.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your country."); 
		document.all.regcountry.focus(); return false; 
	}
	// secure code
	if (document.all.security_code.value.length <1) { 
		alert("Sorry, but you haven\'t filled out a captcha security.\nPlease enter security code."); 
		document.all.security_code.focus(); return false; 
	}		
	document.all.submit();
}

function valreg_member() {
	// user name
	if (document.all.reg_username.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your user name."); 
		document.all.reg_username.focus(); return false; 
	}
	// password
	if (document.all.reg_userpass.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your password."); 
		document.all.reg_userpass.focus(); return false; 
	}else{
		if (document.all.reg_userpass.value.length >1 && document.all.reg_userpass.value.length <8) { 
			alert("Sorry, but you haven\'t filled digit required.\nPlease enter minimum 8 digit."); 
			document.all.reg_userpass.focus(); return false; 
		}
	}
	// re passsword
	if (document.all.reg_userepass.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your confirm password."); 
		document.all.reg_userepass.focus(); return false; 
	}else{
		if(document.all.reg_userpass.value != document.all.reg_userepass.value)	{
			alert("Sorry, but you haven\'t same password.\nPlease enter same password and confirm password."); 
			document.all.reg_userepass.focus(); return false; 
		}
	}
	// first name
	if (document.all.regfname.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your first name."); 
		document.all.regfname.focus(); return false; 
	}
	// last name
	if (document.all.reglname.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your last name."); 
		document.all.reglname.focus(); return false; 
	}	
	// email
	if (document.all.regemail.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your email address."); 
		document.all.regemail.focus(); return false; 
	}	
	else { 
		dmn = document.all.regemail.value.substr(document.all.regemail.value.indexOf("@")+1,document.all.regemail.value.length);
		if((document.all.regemail.value.indexOf("@")<1) ||(dmn.indexOf("@")>-1) || (dmn.indexOf(".")<1) || (dmn.indexOf(".")>dmn.length-2)) {
			alert("Please type a valid email address.\nEx : (yourname@balinter.net)."); document.all.regemail.focus(); return false; 
		}
	}
	// street addr
	if (document.all.regaddr.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your street address."); 
		document.all.regaddr.focus(); return false; 
	}
	// city
	if (document.all.regcity.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your city."); 
		document.all.regcity.focus(); return false; 
	}
	// country
	if (document.all.regcountry.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your country."); 
		document.all.regcountry.focus(); return false; 
	}
	// secure code
	if (document.all.security_code.value.length <1) { 
		alert("Sorry, but you haven\'t filled out a captcha security.\nPlease enter security code."); 
		document.all.security_code.focus(); return false; 
	}		
	document.all.submit();
}

function val_profile() {
	// first name
	if (document.all.regfname.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your first name."); 
		document.all.regfname.focus(); return false; 
	}
	// last name
	if (document.all.reglname.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your last name."); 
		document.all.reglname.focus(); return false; 
	}	
	// email
	if (document.all.regemail.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your email address."); 
		document.all.regemail.focus(); return false; 
	}	
	else { 
		dmn = document.all.regemail.value.substr(document.all.regemail.value.indexOf("@")+1,document.all.regemail.value.length);
		if((document.all.regemail.value.indexOf("@")<1) ||(dmn.indexOf("@")>-1) || (dmn.indexOf(".")<1) || (dmn.indexOf(".")>dmn.length-2)) {
			alert("Please type a valid email address.\nEx : (yourname@balinter.net)."); document.all.regemail.focus(); return false; 
		}
	}
	// street addr
	if (document.all.regaddr.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your street address."); 
		document.all.regaddr.focus(); return false; 
	}
	// city
	if (document.all.regcity.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your city."); 
		document.all.regcity.focus(); return false; 
	}
	// country
	if (document.all.regcountry.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your country."); 
		document.all.regcountry.focus(); return false; 
	}
	// secure code
	if (document.all.security_code.value.length <1) { 
		alert("Sorry, but you haven\'t filled out a captcha security.\nPlease enter security code."); 
		document.all.security_code.focus(); return false; 
	}		
	document.all.submit();
}

function val_account() {
	// password
	if (document.all.reg_userpass.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your password."); 
		document.all.reg_userpass.focus(); return false; 
	}else{
		if (document.all.reg_userpass.value.length >1 && document.all.reg_userpass.value.length <8) { 
			alert("Sorry, but you haven\'t filled digit required.\nPlease enter minimum 8 digit."); 
			document.all.reg_userpass.focus(); return false; 
		}
	}
	// re passsword
	if (document.all.reg_userepass.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your confirm password."); 
		document.all.reg_userepass.focus(); return false; 
	}else{
		if(document.all.reg_userpass.value != document.all.reg_userepass.value)	{
			alert("Sorry, but you haven\'t same password.\nPlease enter same password and confirm password."); 
			document.all.reg_userepass.focus(); return false; 
		}
	}
	// secure code
	if (document.all.security_code.value.length <1) { 
		alert("Sorry, but you haven\'t filled out a captcha security.\nPlease enter security code."); 
		document.all.security_code.focus(); return false; 
	}		
	document.all.submit();
}

function val_recover() {
	// email
	if (document.all.regemail.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your email address."); 
		document.all.regemail.focus(); return false; 
	}	
	else { 
		dmn = document.all.regemail.value.substr(document.all.regemail.value.indexOf("@")+1,document.all.regemail.value.length);
		if((document.all.regemail.value.indexOf("@")<1) ||(dmn.indexOf("@")>-1) || (dmn.indexOf(".")<1) || (dmn.indexOf(".")>dmn.length-2)) {
			alert("Please type a valid email address.\nEx : (yourname@balinter.net)."); document.all.regemail.focus(); return false; 
		}
	}
	// secure code
	if (document.all.security_code.value.length <1) { 
		alert("Sorry, but you haven\'t filled out a captcha security.\nPlease enter security code."); 
		document.all.security_code.focus(); return false; 
	}		
	document.all.submit();
}
