﻿function getpro(b) { fld2 = myl_findObj(b); if (fld2.value != "") if (inValidCharSet(fld2.value, "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_.")) { if ($("#country").val() == "") { alert("Please select your country"); return false } if ($("#state").val() == "") { alert("Please select your state"); return false } if ($("#year").val() == "") { alert("Please enter your birth year"); return false } password = myl_findObj("password"); password2 = myl_findObj("password1"); if (password.value == "" || password2.value == "") { alert("Please Enter Your Password "); return false } else if (password.value != password2.value) { alert("Both Passwords should match"); return false } question = myl_findObj("question"); if (question.value == "") { alert("Please Enter Your Secret Question "); return false } answer = myl_findObj("answer"); if (answer.value == "") { alert("Please Enter Your Secret Answer "); return false } firstname = myl_findObj("first-name"); lastname = myl_findObj("last-name"); if (firstname.value == "") { alert("Please Enter Your First Name "); return false } if (lastname.value == "") { alert("Please Enter Your Last Name "); return false } if (fld2.value == firstname.value) { alert("Sorry your first name can not be equivalent to your username, try entering a nickname. "); return false } if (lastname.value == firstname.value) { alert("Sorry your first name and last name can not be equivalent. "); return false } rp = myl_findObj("rp"); if (rp.value == "") { alert("Please Enter Your Verification Code "); return false } } else { alert("Username Should Only Contain Numbers and charcters ( only ' _ ' and ' . ' is allowed )"); return false } else { alert("Please Enter Username"); return false } } function inValidCharSet(b, a) { for (var c = true, d = 0; d < b.length; d++) if (a.indexOf(b.substr(d, 1)) < 0) { c = false; break } return c } function myl_findObj(b, a) { var c, d; a || (a = document); if ((c = b.indexOf("?")) > 0 && parent.frames.length) { a = parent.frames[b.substring(c + 1)].document; b = b.substring(0, c) } if (!(d = a[b]) && a.all) d = a.all[b]; for (c = 0; !d && c < a.forms.length; c++) d = a.forms[c][b]; for (c = 0; !d && a.layers && c < a.layers.length; c++) d = myl_findObj(b, a.layers[c].document); if (!d && a.getElementById) d = a.getElementById(b); return d };
