function validateAndCheck(g_loginType){var submitForm="companyForm";varUserName=eval("document."+submitForm+".userName.value");varPassword=eval("document."+submitForm+".password.value");if(!validateFormFields(submitForm)){return false}if(g_loginType=="Companies"){$.post("/validateCompanyLogin.asp",{userName:varUserName,password:varPassword,loginType:g_loginType},function(data){showLoginRespose_company(data)})}return false}function validateFormFields(submitForm){varUserName=eval("document."+submitForm+".userName.value");varPassword=eval("document."+submitForm+".password.value");if(varUserName==""){alert("You must provide an Email Address.");setFocusToUserName(submitForm);return false}if(varPassword==""){alert("You must provide a Password.");eval("document."+submitForm+".password.focus()");return false}else{return true}}function setFocusToUserName(submitForm){try{eval("document."+submitForm+".userName.focus()")}catch(e){}}function showLoginRespose_company(a){if(a=="Valid"){window.location="/Companies/index.asp"}else{alert("Invalid Email and Password combination. Please try again.");setFocusToUserName("companyForm")}}function sendPassword(g_loginType){submitForm="companyForm";varUserName=eval("document."+submitForm+".userName.value");if(varUserName==""){alert("Please provide your Email Address to get your Password");setFocusToUserName(submitForm);return false}if(g_loginType=="Companies"){submitPage="/companies/getPassword.asp"}if(g_loginType=="Companies"){$.post(submitPage,{userName:varUserName},function(data){showPasswordResponse(data,submitForm)})}}function showPasswordResponse(b,a){alert(b);if(b.indexOf("Please provide a valid Email Address.")>=0){setFocusToUserName(a)}}function popup(c,b){if(!window.focus){return true}var a;if(typeof(c)=="string"){a=c}else{a=c.href}window.open(a,b,"width=1024,height=710,dependent=yes,left=0,top=0,resizable=no,toolbar=no,scrollbars=yes");return false}function changeMousePointer(a){if($.browser.msie){a.className="cursorHand"}else{a.className="cursorHand"}}function defaultMouse(a){if($.browser.msie){a.className="cursorDefault"}else{a.className="cursorDefault"}};
