/* register.js */
function show_captcha() {
$(".captcha2").css({visibility:'visible'});
};

function new_captcha() {
$("#captcha").find().value="";

capt=$('#imgCaptcha').find();
with(capt) {
	src = ""; 
	src = 'users/captcha.php?' + Math.random();
}
};


function valreg(form) {
title="&nbsp;&nbsp;Registration Message&nbsp;&nbsp;";

$.vTitle(title); //setup title

with(form) {
if($.isEmpty(firstname,"Please Enter Your <b>First Name</b> to continue.")) {
}else if($.isEmpty(lastname,"Please Enter Your <b>Last Name</b> to continue.")) {
}else if($.isEmpty(email,"Please Enter Your <b>email address</b> to continue.")) {
}else if($.isNotMail(email,"Your email address is in-correct.")) {
}else if($.isEmpty(pwd,"Please Enter Your <b>password</b> to continue.")) {
}else if(pwd.value!=pwd2.value) {
pwd2.focus();
$.alert("Your two passwords do not match.",{title:dhtmlExt.valTitle,modal:true},function() {$.msgbox.close();pwd2.focus();return true});
offset=$(pwd2).offset();
$.msgbox.moveTo(offset.left+"px",offset.top+offset.height+"px");
}else if(!genderM.checked&&!genderF.checked) {
try {genderM.focus();} catch(err) {void(0);};
$.alert("Please select your gender to continue.",{title:dhtmlExt.valTitle,modal:true},function() {$.msgbox.close();genderM.focus();return true});
offset=$(genderM).offset();
$.msgbox.moveTo(offset.left+"px",offset.top+offset.height+"px");
}else if($.isEmpty(bDay,"Please select your birth day.")) {
}else if($.isEmpty(bMonth,"Please select your birth month.")) {
}else if($.isEmpty(bYear,"Please select the year you were born.")) {
}else if($.isEmpty(captcha,"Please enter the verification code.")) {
} else {
return true; //the form is valid
};
};
return false;//form is not valid

};
/*****************************/ 

 
 
 