if(type=='register'){
//check the password confirmation field only if we are in selector registration and that the user selected "registration" or "simplified registration", or that the registration is on "all in one page" and that the password confirmation field is there
var registrer = document.getElementById('data_register_registration_method0');
if(!registrer){
registrer = document.getElementById('data[register][registration_method]0');
}
var simplified_pwd = document.getElementById('data_register_registration_method3');
if(!simplified_pwd){
simplified_pwd = document.getElementById('data[register][registration_method]3');
}
if((simplified_pwd && simplified_pwd.checked) || (registrer && registrer.checked) || (!simplified_pwd && !registrer)){
//check password
if(typeof varform.elements[password]'] != 'undefined' && typeof varform.elements[password2]'] != 'undefined'){
passwd = varform.elements[password]'];
passwd2 = varform.elements[password2]'];
if(passwd.value!=passwd2.value){
alert(hikashopFieldsJs);
return false;
}
}
}