// JavaScript Document function validateOnSubmit() { //alert("fgdfg"); errorMsg = " "; invalid = null; user_type = document.entry_form.dd_type.value; firstName = document.entry_form.landlord_fname.value.length; lastName = document.entry_form.landlord_lname.value.length; address = document.entry_form.landlord_mailing_address.value.length; //app_no = document.entry_form.landlord_appartment_no.value.length; state = document.entry_form.landlord_state.value; city = document.entry_form.landlord_city.value.length; ziplength = document.entry_form.landlord_zip.value.length; zip = document.entry_form.landlord_zip.value; mobilelength = document.entry_form.landlord_mobile.value.length; mobile = document.entry_form.landlord_mobile.value; email = document.entry_form.landlord_email.value; lfirstName = document.entry_form.lawyer_fname.value.length; llastName = document.entry_form.lawyer_lname.value.length; laddress = document.entry_form.lawyer_add.value.length; lemail = document.entry_form.lawyer_email.value; lwebsite = document.entry_form.lawyer_website.value.length; lofficenolength = document.entry_form.lawyer_officno.value.length; lofficeno = document.entry_form.lawyer_officno.value; lmobilelength = document.entry_form.lawyer_mobile.value.length; lmobile = document.entry_form.lawyer_mobile.value; lfaxnolength = document.entry_form.lawyer_faxno.value.length; lfaxno = document.entry_form.lawyer_faxno.value; //alert(CaptchImage); if (user_type == 0) { errorMsg += "User Type, "; if (invalid == null ) { invalid = document.entry_form.dd_type; } } if((document.getElementById('dd_type').value==1)||(document.getElementById('dd_type').value==0)) { if (firstName == 0) { errorMsg += "Landlord First Name, "; if (invalid == null ) { invalid = document.entry_form.landlord_fname; } } if (lastName == 0 ) { errorMsg += "Landlord Last Name, "; if (invalid == null ) { invalid = document.entry_form.landlord_lname; } } if (address == 0 ) { errorMsg += "Landlord mailing address, "; if ( invalid == null ) { invalid = document.entry_form.landlord_mailing_address; } } //if (app_no == 0 ) // { // errorMsg += "Landlord Appatrment no., "; // // if ( invalid == null ) // { // invalid = document.entry_form.landlord_appartment_no; // } // // } // if (state == 0) { errorMsg += "Landlord state., "; if (invalid == null ) { invalid = document.entry_form.landlord_state; } } if (city == 0 ) { errorMsg += "Landlord City, "; if (invalid == null ) { invalid = document.entry_form.landlord_city; } } if (ziplength == 0 ) { errorMsg += "Landlord Zip Code, "; if (invalid == null ) { invalid = document.entry_form.landlord_zip; } } if (isNaN(zip)) { errorMsg += "Landlord Zip Code, "; if (invalid == null ) { invalid = document.entry_form.landlord_zip; } } if (mobilelength == 0 ) { errorMsg += "Landlord Mobile Number, "; if (invalid == null ) { invalid = document.entry_form.landlord_mobile; } } if (isNaN(mobile)) { errorMsg += "Landlord Mobile Number, "; if (invalid == null ) { invalid = document.entry_form.landlord_mobile; } } if (!(email.match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/))) { errorMsg += "Landlord Email id, "; if ( invalid == null ) { invalid = document.entry_form.landlord_email; } } //if ( " " != document.entry_form.creditcardnumber.value.charAt(4) || " " != document.entry_form.creditcardnumber.value.charAt(9)) // { // // if ( document.FormPage.creditcardnumber.value.charAt(14) != " " ) // { // errorMsg += "-- Credit Card Number\n"; // // if ( invalid == null ) // { // invalid = document.entry_form.creditcardnumber; // } // // } // // } } else { if (lfirstName == 0) { errorMsg += "Lawyer First Name, "; if (invalid == null ) { invalid = document.entry_form.lawyer_fname; } } if (llastName == 0 ) { errorMsg += "Lawyer Last Name, "; if (invalid == null ) { invalid = document.entry_form.lawyer_lname; } } if (laddress == 0 ) { errorMsg += "Lawyer mailing address, "; if ( invalid == null ) { invalid = document.entry_form.lawyer_add; } } if (!(lemail.match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/))) { errorMsg += "Lawyer Email id, "; if ( invalid == null ) { invalid = document.entry_form.lawyer_email; } } if (lwebsite == 0 ) { errorMsg += "Lawyer website, "; if ( invalid == null ) { invalid = document.entry_form.lawyer_website; } } if (lofficenolength==0) { errorMsg += "Lawyer Office Phone no., "; if (invalid == null ) { invalid = document.entry_form.lawyer_officeno; } } if (isNaN(lofficeno)) { errorMsg += "Lawyer Office Phone no., "; if (invalid == null ) { invalid = document.entry_form.lawyer_officeno; } } if (lmobilelength==0) { errorMsg += "Lawyer Mobile Number, "; if (invalid == null ) { invalid = document.entry_form.lawyer_mobile; } } if (isNaN(lmobile)) { errorMsg += "Lawyer Mobile Number, "; if (invalid == null ) { invalid = document.entry_form.lawyer_mobile; } } if (lfaxnolength==0) { errorMsg += "Lawyer Fax Number, "; if (invalid == null ) { invalid = document.entry_form.lawyer_faxno; } } if (isNaN(lfaxno)) { errorMsg += "Lawyer Fax Number, "; if (invalid == null ) { invalid = document.entry_form.lawyer_faxno; } } if (firstName == 0) { errorMsg += "Landlord First Name, "; if (invalid == null ) { invalid = document.entry_form.landlord_fname; } } if (lastName == 0 ) { errorMsg += "Landlord Last Name, "; if (invalid == null ) { invalid = document.entry_form.landlord_lname; } } if (address == 0 ) { errorMsg += "Landlord mailing address, "; if ( invalid == null ) { invalid = document.entry_form.landlord_mailing_address; } } // if (app_no == 0 ) // { // errorMsg += "Landlord Appatrment no., "; // // if ( invalid == null ) // { // invalid = document.entry_form.landlord_appartment_no; // } // // } if (state == 0 ) { errorMsg += "Landlord state., "; if (invalid == null ) { invalid = document.entry_form.landlord_state; } } if (city == 0 ) { errorMsg += "Landlord City, "; if (invalid == null ) { invalid = document.entry_form.landlord_city; } } if (isNaN(zip)) { errorMsg += "Landlord Zip Code, "; if (invalid == null ) { invalid = document.entry_form.landlord_zip; } } if (isNaN(zip)) { errorMsg += "Landlord Zip Code, "; if (invalid == null ) { invalid = document.entry_form.landlord_zip; } } if (mobilelength == 0 ) { errorMsg += "Landlord Mobile Number, "; if (invalid == null ) { invalid = document.entry_form.landlord_mobile; } } if (isNaN(mobile)) { errorMsg += "Landlord Mobile Number, "; if (invalid == null ) { invalid = document.entry_form.landlord_mobile; } } if (!(email.match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/))) { errorMsg += "Landlord Email id, "; if ( invalid == null ) { invalid = document.entry_form.landlord_email; } } } if ( errorMsg == " " ) { return true; } else { //alert("The following are invalid:\n" + errorMsg); // invalid.focus(); //alert("lkj"); //document.getElementById('warning_div').innerHTML =""; document.getElementById('warning_div').style.display='block'; document.getElementById('warning_div').focus(); document.getElementById('warning_div').innerHTML = "The following are invalid:\n" + errorMsg; return false; } } //############################################################################################################################### function check_email_exist() { var eid=document.getElementById('landlord_email').value; if(eid!="" || eid!=NULL) { ajax_check_email_exist(eid); } } function ajax_check_email_exist(str) { //var xmlHttp; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX!"); return false; } } } xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4) {//alert(xmlHttp.responseText); //if(xmlHttp.responseText!=1) //{ //if(str==landlord_email) // { if(xmlHttp.responseText!=1) { document.getElementById('warning_email_1').style.display='block'; document.getElementById('warning_email_1').innerHTML = xmlHttp.responseText; document.getElementById('insert_warning').value=0; document.getElementById('submit').disabled=true; } //} else { document.getElementById('warning_email_1').style.display='none'; document.getElementById('insert_warning').value=1; document.getElementById('warning_email_1').innerHTML = ""; document.getElementById('submit').disabled=false; } //} } } var url_next='check_email.php?id=' + str; xmlHttp.open("GET",url_next,true); // alert(url_next); xmlHttp.send(null); //} } function check_lwemail_exist() { var elwid=document.getElementById('lawyer_email').value; //alert(elwid); ajax_check_lwemail_exist(elwid); } function ajax_check_lwemail_exist(str) { //var xmlHttp; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX!"); return false; } } } xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4) {//alert(xmlHttp.responseText); //if(xmlHttp.responseText!=1) //{ //if(str==landlord_email) // { if(xmlHttp.responseText!=1) { document.getElementById('warning_email_2').style.display='block'; document.getElementById('warning_email_2').innerHTML = xmlHttp.responseText; document.getElementById('insert_warning').value=0; //document.getElementById('lawyer_email').focus(); //return false; } // } else { document.getElementById('warning_email_2').style.display='none'; document.getElementById('insert_warning').value=1; //document.getElementById('warning_email_2').innerHTML = xmlHttp.responseText; //return true; } //} } } var url_next='check_email.php?id=' + str; xmlHttp.open("GET",url_next,true); // alert(url_next); xmlHttp.send(null); //} } //############################################################################################################################## function show_div() { //alert("hg"); if(document.getElementById('dd_type').value==2) { if(document.getElementById('lawyer_email_div').style.display=='none') { document.getElementById('lawyer_email_div').style.display='block'; } else { document.getElementById('lawyer_email_div').style.display='none'; } } if((document.getElementById('dd_type').value==1)||(document.getElementById('dd_type').value==0)) { if(document.getElementById('lawyer_email_div').style.display=='block') { document.getElementById('lawyer_email_div').style.display='none'; } } } //################################################################ 3_day eviction ########################################### function validateOnSubmit1() { errorMsg = " "; invalid = null; user_type = document.entry_form.dd_type.value; firstName = document.entry_form.landlord_fname.value.length; lastName = document.entry_form.landlord_lname.value.length; address = document.entry_form.landlord_mailing_address.value.length; //app_no = document.entry_form.landlord_appartment_no.value.length; state = document.entry_form.landlord_state.value; city = document.entry_form.landlord_city.value.length; ziplength = document.entry_form.landlord_zip.value.length; zip = document.entry_form.landlord_zip.value; mobilelength = document.entry_form.landlord_mobile.value.length; mobile = document.entry_form.landlord_mobile.value; email = document.entry_form.landlord_email.value; lfirstName = document.entry_form.lawyer_fname.value.length; llastName = document.entry_form.lawyer_lname.value.length; laddress = document.entry_form.lawyer_add.value.length; lemail = document.entry_form.lawyer_email.value; lwebsite = document.entry_form.lawyer_website.value.length; lofficenolength = document.entry_form.lawyer_officno.value.length; lofficeno = document.entry_form.lawyer_officno.value; lmobilelength = document.entry_form.lawyer_mobile.value.length; lmobile = document.entry_form.lawyer_mobile.value; lfaxnolength = document.entry_form.lawyer_faxno.value.length; lfaxno = document.entry_form.lawyer_faxno.value; //CaptchImage = document.entry_form.capthamsg.value; //securitycode = document.entry_form.SecurityCode.value; //alert(CaptchImage); //alert(securitycode); // alert(firstName); if (user_type == 0) { errorMsg += "User Type, "; if (invalid == null ) { invalid = document.entry_form.dd_type; } } if((document.getElementById('dd_type').value==1)||(document.getElementById('dd_type').value==0)) { if (firstName == 0) { errorMsg += "Landlord First Name, "; if (invalid == null ) { invalid = document.entry_form.landlord_fname; } } if (lastName == 0 ) { errorMsg += "Landlord Last Name, "; if (invalid == null ) { invalid = document.entry_form.landlord_lname; } } if (address == 0 ) { errorMsg += "Landlord mailing address, "; if ( invalid == null ) { invalid = document.entry_form.landlord_mailing_address; } } // if (app_no == 0 ) // { // errorMsg += "Landlord Appatrment no., "; // // if ( invalid == null ) // { // invalid = document.entry_form.landlord_appartment_no; // } // // } if (state == 0 ) { errorMsg += "Landlord state., "; if (invalid == null ) { invalid = document.entry_form.landlord_state; } } if (city == 0 ) { errorMsg += "Landlord City, "; if (invalid == null ) { invalid = document.entry_form.landlord_city; } } if (ziplength == 0 ) { errorMsg += "Landlord Zip Code, "; if (invalid == null ) { invalid = document.entry_form.landlord_zip; } } if (isNaN(zip)) { errorMsg += "Landlord Zip Code, "; if (invalid == null ) { invalid = document.entry_form.landlord_zip; } } if (mobilelength == 0 ) { errorMsg += "Landlord Mobile Number, "; if (invalid == null ) { invalid = document.entry_form.landlord_mobile; } } if (isNaN(mobile)) { errorMsg += "Landlord Mobile Number, "; if (invalid == null ) { invalid = document.entry_form.landlord_mobile; } } if (!(email.match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/))) { errorMsg += "Landlord Email id, "; if ( invalid == null ) { invalid = document.entry_form.landlord_email; } } // Added by :swarnima // Date:24 Dec 2008 //Reson:for check security code///////////////////////////////////// //////////////////////////////////////////////////////////////////////// //if ( " " != document.entry_form.creditcardnumber.value.charAt(4) || " " != document.entry_form.creditcardnumber.value.charAt(9)) // { // // if ( document.FormPage.creditcardnumber.value.charAt(14) != " " ) // { // errorMsg += "-- Credit Card Number\n"; // // if ( invalid == null ) // { // invalid = document.entry_form.creditcardnumber; // } // // } // // } } else { if (lfirstName == 0) { errorMsg += "Lawyer First Name, "; if (invalid == null ) { invalid = document.entry_form.lawyer_fname; } } if (llastName == 0 ) { errorMsg += "Lawyer Last Name, "; if (invalid == null ) { invalid = document.entry_form.lawyer_lname; } } if (laddress == 0 ) { errorMsg += "Lawyer mailing address, "; if ( invalid == null ) { invalid = document.entry_form.lawyer_add; } } if (!(lemail.match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/))) { errorMsg += "Lawyer Email id, "; if ( invalid == null ) { invalid = document.entry_form.lawyer_email; } } if (lwebsite == 0 ) { errorMsg += "Lawyer website, "; if ( invalid == null ) { invalid = document.entry_form.lawyer_website; } } if (lofficenolength==0) { errorMsg += "Lawyer Office Phone no., "; if (invalid == null ) { invalid = document.entry_form.lawyer_officeno; } } if (isNaN(lofficeno)) { errorMsg += "Lawyer Office Phone no., "; if (invalid == null ) { invalid = document.entry_form.lawyer_officeno; } } if (lmobilelength==0) { errorMsg += "Lawyer Mobile Number, "; if (invalid == null ) { invalid = document.entry_form.lawyer_mobile; } } if (isNaN(lmobile)) { errorMsg += "Lawyer Mobile Number, "; if (invalid == null ) { invalid = document.entry_form.lawyer_mobile; } } if (lfaxnolength==0) { errorMsg += "Lawyer Fax Number, "; if (invalid == null ) { invalid = document.entry_form.lawyer_faxno; } } if (isNaN(lfaxno)) { errorMsg += "Lawyer Fax Number, "; if (invalid == null ) { invalid = document.entry_form.lawyer_faxno; } } if (firstName == 0) { errorMsg += "Landlord First Name, "; if (invalid == null ) { invalid = document.entry_form.landlord_fname; } } if (lastName == 0 ) { errorMsg += "Landlord Last Name, "; if (invalid == null ) { invalid = document.entry_form.landlord_lname; } } if (address == 0 ) { errorMsg += "Landlord mailing address, "; if ( invalid == null ) { invalid = document.entry_form.landlord_mailing_address; } } // if (app_no == 0 ) // { // errorMsg += "Landlord Appatrment no., "; // // if ( invalid == null ) // { // invalid = document.entry_form.landlord_appartment_no; // } // // } if (state == 0 ) { errorMsg += "Landlord state., "; if (invalid == null ) { invalid = document.entry_form.landlord_state; } } if (city == 0 ) { errorMsg += "Landlord City, "; if (invalid == null ) { invalid = document.entry_form.landlord_city; } } if (isNaN(zip)) { errorMsg += "Landlord Zip Code, "; if (invalid == null ) { invalid = document.entry_form.landlord_zip; } } if (isNaN(zip)) { errorMsg += "Landlord Zip Code, "; if (invalid == null ) { invalid = document.entry_form.landlord_zip; } } if (mobilelength == 0 ) { errorMsg += "Landlord Mobile Number, "; if (invalid == null ) { invalid = document.entry_form.landlord_mobile; } } if (isNaN(mobile)) { errorMsg += "Landlord Mobile Number, "; if (invalid == null ) { invalid = document.entry_form.landlord_mobile; } } if (!(email.match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/))) { errorMsg += "Landlord Email id, "; if ( invalid == null ) { invalid = document.entry_form.landlord_email; } } } if ( errorMsg == " " ) { return true; } else { //alert("The following are invalid:\n" + errorMsg); // invalid.focus(); //alert("lkj"); //document.getElementById('warning_div').innerHTML =""; document.getElementById('warning_div').style.display='block'; document.getElementById('warning_div').focus(); document.getElementById('warning_div').innerHTML = "The following are invalid:\n" + errorMsg; return false; } } //############################################################################################################################## function check_email_exist() { var eid=document.getElementById('landlord_email').value; if(eid!="" || eid!=NULL) { ajax_check_email_exist(eid); } } function ajax_check_email_exist(str) { //var xmlHttp; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX!"); return false; } } } xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4) {//alert(xmlHttp.responseText); //if(xmlHttp.responseText!=1) //{ //if(str==landlord_email) // { if(xmlHttp.responseText!=1) { document.getElementById('warning_email_1').style.display='block'; document.getElementById('warning_email_1').innerHTML = xmlHttp.responseText; document.getElementById('insert_warning').value=0; document.getElementById('submit').disabled=true; } //} else { document.getElementById('warning_email_1').style.display='none'; document.getElementById('warning_email_1').innerHTML = ""; document.getElementById('insert_warning').value=1; document.getElementById('submit').disabled=false; } //} } } var url_next='check_email.php?id=' + str; xmlHttp.open("GET",url_next,true); // alert(url_next); xmlHttp.send(null); //} } function check_lwemail_exist() { var elwid=document.getElementById('lawyer_email').value; //alert("kjg"); ajax_check_lwemail_exist(elwid); } function ajax_check_lwemail_exist(str) { //var xmlHttp; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX!"); return false; } } } xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4) {//alert(xmlHttp.responseText); //if(xmlHttp.responseText!=1) //{ //if(str==landlord_email) // { if(xmlHttp.responseText!=1) { document.getElementById('warning_email_2').style.display='block'; document.getElementById('warning_email_2').innerHTML = xmlHttp.responseText; document.getElementById('insert_warning').value=0; //document.getElementById('lawyer_email').focus(); //return false; } // } else { document.getElementById('warning_email_2').style.display='none'; document.getElementById('insert_warning').value=1; //document.getElementById('warning_email_2').innerHTML = xmlHttp.responseText; //return true; } //} } } var url_next='check_email.php?id=' + str; xmlHttp.open("GET",url_next,true); // alert(url_next); xmlHttp.send(null); //} } function get_eviction_type() { } //############################################################################################################################### function show_div() { //alert("hg"); if(document.getElementById('dd_type').value==2) { if(document.getElementById('lawyer_email_div').style.display=='none') { document.getElementById('lawyer_email_div').style.display='block'; } else { document.getElementById('lawyer_email_div').style.display='none'; } } if((document.getElementById('dd_type').value==1)||(document.getElementById('dd_type').value==0)) { if(document.getElementById('lawyer_email_div').style.display=='block') { document.getElementById('lawyer_email_div').style.display='none'; } } } //################################################Start_AN_EVICTION_EDIT######################################################## function validateOnSubmit2() { errorMsg = " "; invalid = null; user_type = document.entry_form.dd_type.value; firstName = document.entry_form.landlord_fname.value.length; lastName = document.entry_form.landlord_lname.value.length; address = document.entry_form.landlord_mailing_address.value.length; app_no = document.entry_form.landlord_appartment_no.value.length; // state = document.entry_form.landlord_state.value; city = document.entry_form.landlord_city.value.length; ziplength = document.entry_form.landlord_zip.value.length; zip = document.entry_form.landlord_zip.value; mobilelength = document.entry_form.landlord_mobile.value.length; mobile = document.entry_form.landlord_mobile.value; email = document.entry_form.landlord_email.value; lfirstName = document.entry_form.lawyer_fname.value.length; llastName = document.entry_form.lawyer_lname.value.length; laddress = document.entry_form.lawyer_add.value.length; lemail = document.entry_form.lawyer_email.value; lwebsite = document.entry_form.lawyer_website.value.length; lofficenolength = document.entry_form.lawyer_officno.value.length; lofficeno = document.entry_form.lawyer_officno.value; lmobilelength = document.entry_form.lawyer_mobile.value.length; lmobile = document.entry_form.lawyer_mobile.value; lfaxnolength = document.entry_form.lawyer_faxno.value.length; lfaxno = document.entry_form.lawyer_faxno.value; if (user_type == 0) { errorMsg += "User Type, "; if (invalid == null ) { invalid = document.entry_form.dd_type; } } if((document.getElementById('dd_type').value==1)||(document.getElementById('dd_type').value==0)) { if (firstName == 0) { errorMsg += "Landlord First Name, "; if (invalid == null ) { invalid = document.entry_form.landlord_fname; } } if (lastName == 0 ) { errorMsg += "Landlord Last Name, "; if (invalid == null ) { invalid = document.entry_form.landlord_lname; } } if (address == 0 ) { errorMsg += "Landlord mailing address, "; if ( invalid == null ) { invalid = document.entry_form.landlord_mailing_address; } } if (app_no == 0 ) { errorMsg += "Landlord Appatrment no., "; if ( invalid == null ) { invalid = document.entry_form.landlord_appartment_no; } } // if (state == 0 ) // { // errorMsg += "Landlord state., "; // // if (invalid == null ) // { // invalid = document.entry_form.landlord_state; // } // // } if (city == 0 ) { errorMsg += "Landlord City, "; if (invalid == null ) { invalid = document.entry_form.landlord_city; } } if (ziplength == 0 ) { errorMsg += "Landlord Zip Code, "; if (invalid == null ) { invalid = document.entry_form.landlord_zip; } } if (isNaN(zip)) { errorMsg += "Landlord Zip Code, "; if (invalid == null ) { invalid = document.entry_form.landlord_zip; } } if (mobilelength == 0 ) { errorMsg += "Landlord Mobile Number, "; if (invalid == null ) { invalid = document.entry_form.landlord_mobile; } } if (isNaN(mobile)) { errorMsg += "Landlord Mobile Number, "; if (invalid == null ) { invalid = document.entry_form.landlord_mobile; } } if (!(email.match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/))) { errorMsg += "Landlord Email id, "; if ( invalid == null ) { invalid = document.entry_form.landlord_email; } } //if ( " " != document.entry_form.creditcardnumber.value.charAt(4) || " " != document.entry_form.creditcardnumber.value.charAt(9)) // { // // if ( document.FormPage.creditcardnumber.value.charAt(14) != " " ) // { // errorMsg += "-- Credit Card Number\n"; // // if ( invalid == null ) // { // invalid = document.entry_form.creditcardnumber; // } // // } // // } } else { if (lfirstName == 0) { errorMsg += "Lawyer First Name, "; if (invalid == null ) { invalid = document.entry_form.lawyer_fname; } } if (llastName == 0 ) { errorMsg += "Lawyer Last Name, "; if (invalid == null ) { invalid = document.entry_form.lawyer_lname; } } if (laddress == 0 ) { errorMsg += "Lawyer mailing address, "; if ( invalid == null ) { invalid = document.entry_form.lawyer_add; } } if (!(lemail.match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/))) { errorMsg += "Lawyer Email id, "; if ( invalid == null ) { invalid = document.entry_form.lawyer_email; } } if (lwebsite == 0 ) { errorMsg += "Lawyer website, "; if ( invalid == null ) { invalid = document.entry_form.lawyer_website; } } if (lofficenolength==0) { errorMsg += "Lawyer Office Phone no., "; if (invalid == null ) { invalid = document.entry_form.lawyer_officeno; } } if (isNaN(lofficeno)) { errorMsg += "Lawyer Office Phone no., "; if (invalid == null ) { invalid = document.entry_form.lawyer_officeno; } } if (lmobilelength==0) { errorMsg += "Lawyer Mobile Number, "; if (invalid == null ) { invalid = document.entry_form.lawyer_mobile; } } if (isNaN(lmobile)) { errorMsg += "Lawyer Mobile Number, "; if (invalid == null ) { invalid = document.entry_form.lawyer_mobile; } } if (lfaxnolength==0) { errorMsg += "Lawyer Fax Number, "; if (invalid == null ) { invalid = document.entry_form.lawyer_faxno; } } if (isNaN(lfaxno)) { errorMsg += "Lawyer Fax Number, "; if (invalid == null ) { invalid = document.entry_form.lawyer_faxno; } } if (firstName == 0) { errorMsg += "Landlord First Name, "; if (invalid == null ) { invalid = document.entry_form.landlord_fname; } } if (lastName == 0 ) { errorMsg += "Landlord Last Name, "; if (invalid == null ) { invalid = document.entry_form.landlord_lname; } } if (address == 0 ) { errorMsg += "Landlord mailing address, "; if ( invalid == null ) { invalid = document.entry_form.landlord_mailing_address; } } if (app_no == 0 ) { errorMsg += "Landlord Appatrment no., "; if ( invalid == null ) { invalid = document.entry_form.landlord_appartment_no; } } if (state == 0 ) { errorMsg += "Landlord state., "; if (invalid == null ) { invalid = document.entry_form.landlord_state; } } if (city == 0 ) { errorMsg += "Landlord City, "; if (invalid == null ) { invalid = document.entry_form.landlord_city; } } if (isNaN(zip)) { errorMsg += "Landlord Zip Code, "; if (invalid == null ) { invalid = document.entry_form.landlord_zip; } } if (isNaN(zip)) { errorMsg += "Landlord Zip Code, "; if (invalid == null ) { invalid = document.entry_form.landlord_zip; } } if (mobilelength == 0 ) { errorMsg += "Landlord Mobile Number, "; if (invalid == null ) { invalid = document.entry_form.landlord_mobile; } } if (isNaN(mobile)) { errorMsg += "Landlord Mobile Number, "; if (invalid == null ) { invalid = document.entry_form.landlord_mobile; } } if (!(email.match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/))) { errorMsg += "Landlord Email id, "; if ( invalid == null ) { invalid = document.entry_form.landlord_email; } } } if ( errorMsg == " " ) { return true; } else { //alert("The following are invalid:\n" + errorMsg); // invalid.focus(); //alert("lkj"); //document.getElementById('warning_div').innerHTML =""; document.getElementById('warning_div').style.display='block'; document.getElementById('warning_div').focus(); document.getElementById('warning_div').innerHTML = "The following are invalid:\n" + errorMsg; return false; } } //############################################################################################################################### function show_div() { //alert("hg"); if(document.getElementById('dd_type').value==2) { if(document.getElementById('lawyer_email_div').style.display=='none') { document.getElementById('lawyer_email_div').style.display='block'; } else { document.getElementById('lawyer_email_div').style.display='none'; } } if((document.getElementById('dd_type').value==1)||(document.getElementById('dd_type').value==0)) { if(document.getElementById('lawyer_email_div').style.display=='block') { document.getElementById('lawyer_email_div').style.display='none'; } } }