function signupValidation()
{
var errorstr = "";
errorstr += checkitem(document.signupform.firstname,"First Name");
errorstr += checkitem(document.signupform.lastname,"Last Name");
//errorstr += checkitem(document.signupform.middlename,"Middle Name");
errorstr += checkitem(document.signupform.email,"Email");
errorstr += checkemail(document.signupform.email);
errorstr += checkitem(document.signupform.user_id,"User_id");
if (document.signupform.user_id.value.length < 7)
{1
errorstr += "'Username' can't be less than 7 characters.\n";
}
if(document.signupform.username.value=="NO") 
{
errorstr += "'Username' is not yet validated.\n";	
}
errorstr += checkitem(document.signupform.password,"Password");
if (document.signupform.password.value.length < 7)
{
errorstr += "'Password' can't be less than 7 characters.\n";
}
errorstr += checkitem(document.signupform.password_confirm,"Password Confirmation Field");
if (document.signupform.password_confirm.value.length < 7)
{
errorstr += "'Password confirmation field' can't be less than 7 characters.\n";
}
if(document.signupform.chkonline.checked==true) {
		errorstr += checkitem(document.signupform.password,"E-Signature Password");
		if (document.signupform.txtesign.value.length < 7)
		{
		errorstr += "'E-Signature Password' can't be less than 7 characters.\n";
		}
		errorstr += checkitem(document.signupform.txtesign_confirm,"E-Signature Password Confirmation Field");
		if (document.signupform.txtesign_confirm.value.length < 7)
		{
		errorstr += "'E-Signature Password confirmation field' can't be less than 7 characters.\n";
		}
		if(document.signupform.txtesign.value!=document.signupform.txtesign_confirm.value) {
			errorstr += "'E-Signature field doesnt match with the E-Signature confirm field";
		}
}
errorstr+=checkitem(document.signupform.sanswer,"Security Answer");
errorstr+=checkitem(document.signupform.telno,"telno");
//errorstr+=checkitem(document.signupform.fax,"fax");

if (document.signupform.password.value != document.signupform.password_confirm.value)
{
errorstr += "Password and confirmed password must be the same.\n";
}
if (document.signupform.txtesign.value != document.signupform.txtesign_confirm.value)
{
errorstr += "Password and confirmed password must be the same.\n";
}

//check affiliation
if(document.signupform.selAffiliation.value=="Myself")
{
	//errorstr+=checkitem(document.signupform.billing_country,"billing_country");
	//errorstr+=checkitem(document.signupform.billing_state,"billing_state");
	errorstr+=checkitem(document.signupform.billing_zip,"billing_zip");
	errorstr+=checkitem(document.signupform.billing_city,"billing_city");
	errorstr+=checkitem(document.signupform.billing_address1,"billing_address1");
}
if(document.signupform.seltranscript.value=="O"){
	errorstr+=checkitem(document.signupform.txttranscript,"other transcription file format\n");
}
//new promo and survey questoin  updated 05-07-2008
if(document.signupform.survey.value=="Referred" || document.signupform.survey.value=="Others") {
	errorstr+=checkitem(document.signupform.survey_answer,"Please specify how did you find our website?\n");
}
//---also, checked if TERMS has been understood...
if (!document.signupform.checkbox_agree.checked){
	errorstr += "Please check if you've understood the TERMS and CONDITIONS contained in this website.\n";
}
errorstr+=checkitem(document.signupform.valid_code,"Security Code");

if (errorstr == ""){
	image("check_code~"+document.signupform.valid_code.value+"~"+document.signupform.d.value+"~"+document.signupform.b.value+"~"+document.signupform.s.value);	

}
else
{
alert(errorstr);
}
}
//--checkValidation
function checkValidation()
{
var errorstr="";
errorstr+=checkitem(document.checkform.firstname,"First Name");
errorstr+=checkitem(document.checkform.middlename,"Middle Name");
errorstr+=checkitem(document.checkform.lastname,"Last Name");
errorstr+=checkitem(document.checkform.email,"Email Address");
errorstr+=checkemail(document.checkform.email);
if (errorstr=="")
{
}
else
{
alert(errorstr);
}
}
//--checkSecurity
function checkSecurity()
{
var errorstr="";
errorstr=checkitem(document.securityform.securityanswer, "Security Answer");
if(errorstr==""){	
document.securityform.action="check_sendmail.php";
document.securityform.submit();
}
else{
alert(errorstr);
}
}
