function select_role(fnc) { if(fnc=="Top Management") { document.getElementById('RoleTM').style.display = ''; document.getElementById('RoleIT').style.display = 'none'; document.getElementById('RoleOther').style.display = 'none'; document.user.RoleTMselect.focus(); } else if (fnc=="IT") { document.getElementById('RoleTM').style.display = 'none'; document.getElementById('RoleIT').style.display = ''; document.getElementById('RoleOther').style.display = 'none' document.user.RoleITselect.focus(); } else if ((fnc=="Consultant") || (fnc == "Partner") || (fnc == "Student")) { document.getElementById('RoleTM').style.display = 'none'; document.getElementById('RoleIT').style.display = 'none'; document.getElementById('RoleOther').style.display = 'none' document.user.COuntry.focus(); } else { document.getElementById('RoleTM').style.display = 'none'; document.getElementById('RoleIT').style.display = 'none'; document.getElementById('RoleOther').style.display = '' document.user.RoleOtherselect.focus(); } } function select_state(country) { if (country=="United States") { document.getElementById('STateUS').style.display = ''; document.getElementById('STateAus').style.display = 'none'; document.getElementById('STateCanada').style.display = 'none'; document.getElementById('STateIndia').style.display = 'none'; document.user.STateUS.focus(); } else if (country=="Canada") { document.getElementById('STateCanada').style.display = ''; document.getElementById('STateIndia').style.display = 'none'; document.getElementById('STateUS').style.display = 'none'; document.getElementById('STateAus').style.display = 'none'; document.user.STateCanada.focus(); } else if (country=="Australia") { document.getElementById('STateAus').style.display = ''; document.getElementById('STateCanada').style.display = 'none'; document.getElementById('STateIndia').style.display = 'none'; document.getElementById('STateUS').style.display = 'none'; document.user.STateAus.focus(); } else if (country=="India") { document.getElementById('STateIndia').style.display = ''; document.getElementById('STateUS').style.display = 'none'; document.getElementById('STateCanada').style.display = 'none'; document.getElementById('STateAus').style.display = 'none'; document.user.STateIndia.focus(); } else { document.getElementById('STateIndia').style.display = 'none'; document.getElementById('STateUS').style.display = 'none'; document.getElementById('STateCanada').style.display = 'none'; document.getElementById('STateAus').style.display = 'none'; document.user.CIty.focus(); } } function clear() { document.user.reset(); } function reg_validate() { if ((document.getElementById("FName").value=="") || (!document.getElementById("FName").value.match(/[^\s]/))) { hideAllErrors(); document.getElementById("fnameError_1").style.display = "inline"; document.getElementById("FName").select(); document.getElementById("FName").focus(); return false; } var iChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?"; for (var i = 0; i < document.getElementById("FName").value.length; i++) { if (iChars.indexOf(document.getElementById("FName").value.charAt(i)) != -1) { hideAllErrors(); document.getElementById("fnameError_2").style.display = "inline"; document.getElementById("FName").select(); document.getElementById("FName").focus(); return false; } } if ((document.getElementById("LName").value=="") || (!document.getElementById("LName").value.match(/[^\s]/))) { hideAllErrors(); document.getElementById("lnameError_1").style.display = "inline"; document.getElementById("LName").select(); document.getElementById("LName").focus(); return false; } var iChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?"; for (var i = 0; i < document.getElementById("LName").value.length; i++) { if (iChars.indexOf(document.getElementById("LName").value.charAt(i)) != -1) { hideAllErrors(); document.getElementById("lnameError_2").style.display = "inline"; document.getElementById("LName").select(); document.getElementById("LName").focus(); return false; } } var iChars = "abcdefghijklmnopqrstuvwxyz!@#$%^&*()=[]\\\';,./{}|\":<>?"; for (var i = 0; i < document.getElementById("PHone").value.length; i++) { if (iChars.indexOf(document.getElementById("PHone").value.charAt(i)) != -1) { hideAllErrors(); document.getElementById("phoneError").style.display = "inline"; document.getElementById("PHone").select(); document.getElementById("PHone").focus(); return false; } } if ((document.getElementById("PHone").value.length<'5') || (!document.getElementById("PHone").value.match(/[^\s]/))) { hideAllErrors(); document.getElementById("phoneError").style.display = "inline"; document.getElementById("PHone").select(); document.getElementById("PHone").focus(); return false; } if ((document.user.EMail.value=="") || (!document.user.EMail.value.match(/[^\s]/))) { hideAllErrors(); document.getElementById("emailError_1").style.display = "inline"; document.user.EMail.select(); document.user.EMail.focus(); return false; } var email = document.user.EMail.value; if (!validateEmail(email,1,0)) { hideAllErrors(); document.getElementById("emailError_1").style.display = "inline"; document.user.EMail.select(); document.user.EMail.focus(); return false; } var EM = new Array(); EM = email.split("@"); domain_name = EM[1]; domain = domain_name.split("."); domain1 = domain[0]; if(domain1=="yahoo"|| domain1=="rediffmail" ||domain1=="hotmail" || domain1=="googlemail" || domain1=="gmail" ||domain1=="rediff" ||domain1=="msn" ||domain1=="mac" ||domain1=="alloymail" ||domain1=="address" || domain1=="mail" || domain1=="gmx" || domain1=="altavista" || domain1=="138mail"|| domain1=="address"|| domain1=="animail"|| domain1=="asiamail"|| domain1=="aussiemail"|| domain1=="bluebottle"|| domain1=="boardermail"|| domain1=="bolt"|| domain1=="canada"|| domain1=="canoemail"|| domain1=="cashette"|| domain1=="catchamail"|| domain1=="centralpets"|| domain1=="coolgoose"|| domain1=="coolgoose"|| domain1=="coolgoose"|| domain1=="dbzmail"|| domain1=="dcemail"|| domain1=="didamail"|| domain1=="doramail"|| domain1=="emailaccount"|| domain1=="excite"|| domain1=="fanfiction"|| domain1=="fastmail"|| domain1=="fastmail"|| domain1=="fastermail"|| domain1=="fictionpress"|| domain1=="flashmail"|| domain1=="gawab"|| domain1=="gmail"|| domain1=="gmx"|| domain1=="gmx"|| domain1=="graffiti"|| domain1=="hotmail"|| domain1=="hushmail"|| domain1=="hush"|| domain1=="hush"|| domain1=="icqmail"|| domain1=="ignmail"|| domain1=="incamail"|| domain1=="indiatimes"|| domain1=="kittymail"|| domain1=="koreanmail"|| domain1=="linuxmail"|| domain1=="lycos"|| domain1=="mail"|| domain1=="mail2world"|| domain1=="mailpanda"|| domain1=="mailasia"|| domain1=="mantramail"|| domain1=="marchmail"|| domain1=="moose-mail"|| domain1=="myownemail"|| domain1=="mypersonalemail"|| domain1=="myway"|| domain1=="netster"|| domain1=="online"|| domain1=="operamail"|| domain1=="outgun"|| domain1=="postmark"|| domain1=="postmaster"|| domain1=="prontomail"|| domain1=="recyclermail"|| domain1=="rediffmail"|| domain1=="romymichele"|| domain1=="sacmail"|| domain1=="recipedemo"|| domain1=="sandiego"|| domain1=="shadango"|| domain1=="safe-mail"|| domain1=="snail-mail"|| domain1=="stalag13"|| domain1=="surfy"|| domain1=="talk21"|| domain1=="themail"|| domain1=="tmicha"|| domain1=="ureach"|| domain1=="uymail"|| domain1=="vfemail"|| domain1=="virtual-mail"|| domain1=="vorras"|| domain1=="wapicode"|| domain1=="web"|| domain1=="weekonline"|| domain1=="whale-mail"|| domain1=="wildmail"|| domain1=="x-mail"|| domain1=="yahoo"|| domain1=="yyhmail"|| domain1=="inbox"|| domain1=="zapakmail"|| domain1=="wanadoo") { hideAllErrors(); document.getElementById("emailError_2").style.display = "inline"; document.user.EMail.select(); document.user.EMail.focus(); return false; } if ((document.getElementById("COmpany").value=="") || (!document.getElementById("COmpany").value.match(/[^\s]/))) { hideAllErrors(); document.getElementById("companyError").style.display = "inline"; document.getElementById("COmpany").select(); document.getElementById("COmpany").focus(); return false; } var iChars = "!@#$%^&*()=[]\\\';,./{}|\":<>?-"; for (var i = 0; i < document.getElementById("COmpany").value.length; i++) { if (iChars.indexOf(document.getElementById("COmpany").value.charAt(i)) != -1) { hideAllErrors(); document.getElementById("companyError_1").style.display = "inline"; document.getElementById("COmpany").select(); document.getElementById("COmpany").focus(); return false; } } var functions = document.getElementById("Functions").value; if (document.getElementById("Functions").value=="") { hideAllErrors(); document.getElementById("functionsError").style.display = "inline"; document.getElementById("Functions").focus(); return false; } if ((functions=="Top Management") && (document.getElementById("RoleTMselect").value=="")) { hideAllErrors(); document.getElementById("roletmError").style.display = "inline"; document.getElementById("RoleTMselect").focus(); return false; } if ((functions=="IT") && (document.getElementById("RoleITselect").value=="")) { hideAllErrors(); document.getElementById("roleitError").style.display = "inline"; document.getElementById("RoleITselect").focus(); return false; } if ((functions=="Sales & Marketing" || functions=="HR" || functions=="Finance" || functions=="Operations" || functions=="Others") && (document.getElementById("RoleOtherselect").value=="")) { hideAllErrors(); document.getElementById("roleotherError").style.display = "inline"; document.getElementById("RoleOtherselect").focus(); return false; } var country = document.getElementById("COuntry").value; if (document.getElementById("COuntry").value=="") { hideAllErrors(); document.getElementById("countryError").style.display = "inline"; document.getElementById("COuntry").focus(); return false; } if ((country=="United States") && (document.user.stateus.value=="")) { hideAllErrors(); document.getElementById("stateusError").style.display = "inline"; document.user.stateus.focus(); return false; } if ((country=="Canada") && (document.user.statecanada.value=="")) { hideAllErrors(); document.getElementById("statecanadaError").style.display = "inline"; document.user.statecanada.focus(); return false; } if ((country=="Australia") && (document.user.stateaus.value=="")) { hideAllErrors(); document.getElementById("stateausError").style.display = "inline"; document.user.stateaus.focus(); return false; } if ((country=="India") && (document.user.stateindia.value=="")) { hideAllErrors(); document.getElementById("stateindiaError").style.display = "inline"; document.user.stateindia.focus(); return false; } if ((document.getElementById("CIty").value=="") || (!document.getElementById("CIty").value.match(/[^\s]/))) { hideAllErrors(); document.getElementById("cityError").style.display = "inline"; document.getElementById("CIty").select(); document.getElementById("CIty").focus(); return false; } var iChars = "!@#$%^&*()=[]\\\';,./{}|\":<>?-"; for (var i = 0; i < document.getElementById("CIty").value.length; i++) { if (iChars.indexOf(document.getElementById("CIty").value.charAt(i)) != -1) { hideAllErrors(); document.getElementById("cityError_1").style.display = "inline"; document.getElementById("CIty").select(); document.getElementById("CIty").focus(); return false; } } return true; } function hideAllErrors() { document.getElementById("fnameError_1").style.display = "none"; document.getElementById("fnameError_2").style.display = "none"; document.getElementById("lnameError_1").style.display = "none"; document.getElementById("lnameError_2").style.display = "none"; document.getElementById("phoneError").style.display = "none"; document.getElementById("emailError_1").style.display = "none"; document.getElementById("emailError_2").style.display = "none"; document.getElementById("companyError").style.display = "none"; document.getElementById("companyError_1").style.display = "none"; document.getElementById("functionsError").style.display = "none"; document.getElementById("roletmError").style.display = "none"; document.getElementById("roleitError").style.display = "none"; document.getElementById("roleotherError").style.display = "none"; document.getElementById("countryError").style.display = "none"; document.getElementById("stateusError").style.display = "none"; document.getElementById("statecanadaError").style.display = "none"; document.getElementById("stateausError").style.display = "none"; document.getElementById("stateindiaError").style.display = "none"; document.getElementById("cityError").style.display = "none"; document.getElementById("cityError_1").style.display = "none"; }