var IMG_SERVER="http://img.makaan.com";var ALERT_IMG="http://img.makaan.com/images/alert.gif";var SERVER_PATH="http://www.makaan.com";var IMG_SERVER_PROPERTY="http://www.makaan.com";var IMG_SERVER_LOGO="http://www.makaan.com";var BODY_COLOR="#D4EBFA";var TAX_RATE=10.3;var borderline="#FFFFFF";if(screen.width=="800"){var tablewidth="783"}else{var tablewidth="1007"}if(screen.width>="1024"){var tablewidths="998"}else{var tablewidths="775"}function changetab(B,A){if(A==true){if(B=="reg"){document.getElementById("menu-reg-mid").style.color="#FFFFFF";document.getElementById("menu-reg-mid").style.backgroundPosition="0px -29px";document.getElementById("menu-reg-left").style.backgroundPosition="0px -29px";document.getElementById("menu-reg-right").style.backgroundPosition="0px -29px"}else{if(B=="search"){document.getElementById("menu-search-mid").style.color="#FFFFFF";document.getElementById("menu-search-mid").style.backgroundPosition="0px -29px";document.getElementById("menu-search-left").style.backgroundPosition="0px -29px";document.getElementById("menu-search-right").style.backgroundPosition="0px -29px"}else{if(B=="list"){document.getElementById("menu-list-mid").style.color="#FFFFFF";document.getElementById("menu-list-mid").style.backgroundPosition="0px -29px";document.getElementById("menu-list-left").style.backgroundPosition="0px -29px";document.getElementById("menu-list-right").style.backgroundPosition="0px -29px"}else{if(B=="req"){document.getElementById("menu-req-mid").style.color="#FFFFFF";document.getElementById("menu-req-mid").style.backgroundPosition="0px -29px";document.getElementById("menu-req-left").style.backgroundPosition="0px -29px";document.getElementById("menu-req-right").style.backgroundPosition="0px -29px"}else{if(B=="adv"){document.getElementById("menu-adv-mid").style.color="#FFFFFF";document.getElementById("menu-adv-mid").style.backgroundPosition="0px -29px";document.getElementById("menu-adv-left").style.backgroundPosition="0px -29px";document.getElementById("menu-adv-right").style.backgroundPosition="0px -29px"}else{if(B=="loan"){document.getElementById("menu-loan-mid").style.color="#FFFFFF";document.getElementById("menu-loan-mid").style.backgroundPosition="0px -29px";document.getElementById("menu-loan-left").style.backgroundPosition="0px -29px";document.getElementById("menu-loan-right").style.backgroundPosition="0px -29px"}else{if(B=="blp"){document.getElementById("menu-blp-mid").style.color="#FFFFFF";document.getElementById("menu-blp-mid").style.backgroundPosition="0px -29px";document.getElementById("menu-blp-left").style.backgroundPosition="0px -29px";document.getElementById("menu-blp-right").style.backgroundPosition="0px -29px"}}}}}}}}else{if(B=="reg"){document.getElementById("menu-reg-mid").style.color="#000000";document.getElementById("menu-reg-mid").style.backgroundPosition="0px 0px";document.getElementById("menu-reg-left").style.backgroundPosition="0px 0px";document.getElementById("menu-reg-right").style.backgroundPosition="0px 0px"}else{if(B=="search"){document.getElementById("menu-search-mid").style.color="#000000";document.getElementById("menu-search-mid").style.backgroundPosition="0px 0px";document.getElementById("menu-search-left").style.backgroundPosition="0px 0px";document.getElementById("menu-search-right").style.backgroundPosition="0px 0px"}else{if(B=="list"){document.getElementById("menu-list-mid").style.color="#000000";document.getElementById("menu-list-mid").style.backgroundPosition="0px 0px";document.getElementById("menu-list-left").style.backgroundPosition="0px 0px";document.getElementById("menu-list-right").style.backgroundPosition="0px 0px"}else{if(B=="req"){document.getElementById("menu-req-mid").style.color="#000000";document.getElementById("menu-req-mid").style.backgroundPosition="0px 0px";document.getElementById("menu-req-left").style.backgroundPosition="0px 0px";document.getElementById("menu-req-right").style.backgroundPosition="0px 0px"}else{if(B=="adv"){document.getElementById("menu-adv-mid").style.color="#000000";document.getElementById("menu-adv-mid").style.backgroundPosition="0px 0px";document.getElementById("menu-adv-left").style.backgroundPosition="0px 0px";document.getElementById("menu-adv-right").style.backgroundPosition="0px 0px"}else{if(B=="loan"){document.getElementById("menu-loan-mid").style.color="#000000";document.getElementById("menu-loan-mid").style.backgroundPosition="0px 0px";document.getElementById("menu-loan-left").style.backgroundPosition="0px 0px";document.getElementById("menu-loan-right").style.backgroundPosition="0px 0px"}else{if(B=="blp"){document.getElementById("menu-blp-mid").style.color="#000000";document.getElementById("menu-blp-mid").style.backgroundPosition="0px 0px";document.getElementById("menu-blp-left").style.backgroundPosition="0px 0px";document.getElementById("menu-blp-right").style.backgroundPosition="0px 0px"}}}}}}}}}function setBudget(I,A,G){var H;var F=(navigator.appName=="Microsoft Internet Explorer")?-1:null;var B=I.form.elements.budget;while(B.options.length){B.remove(0)}var C=I.options[I.selectedIndex].value;var J=budgetval[C];if(C!=""){for(var D=0;D<J.length;D++){H=document.createElement("option");H.text=J[D].text;H.value=J[D].value;B.add(H,F);if(C==1&&J[D].value==A){H.selected=true}else{if(J[D].value==G){H.selected=true}}}}}function validatesymbol(formName,fieldName){var doc="document.";a=eval(doc+formName+"."+fieldName);fieldValue=eval(doc+formName+"."+fieldName+".value");chk1="!@# $%^*+=|~`{}[]:;<>?/_,()";chk3="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";for(j=0;j!=fieldValue.length;j++){ch1=fieldValue.charAt(j);ch2=fieldValue.charAt(0);rtn1=chk1.indexOf(ch1);rtn3=chk3.indexOf(ch2);if(rtn3<0){eval(doc+formName+"."+fieldName+".focus()");return false;break}else{if(rtn1!=-1){eval(doc+formName+"."+fieldName+".focus()");return false;break}}}return true}function clear_checkbox(frm,field,data){var val=eval("document."+frm+"."+field+".value");if(data==val){eval("document."+frm+"."+field+".value=''")}}var i,j,strlen;var strchar=new String("");function LTrim(A){A=new String(A);for(i=0;i<A.length;i++){strchar=A.charAt(i);if((strchar==" ")||(strchar=="\t")||(strchar=="\n")||(strchar=="\r")){A=A.substr(i+1);i--}else{break}}return A}function RTrim(A){A=new String(A);for(i=A.length-1;i>-1;i--){strchar=A.charAt(i);if((strchar==" ")||(strchar=="\t")||(strchar=="\n")||(strchar=="\r")){A=A.substr(0,i)}else{break}}return A}function Trim(A){return LTrim(RTrim(A))}function check_name(D){var C=D;var B="!@#&$%^*+=|~`{}[]:;<>?/,";var F="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var A=true;for(j=0;j!=C.length;j++){ch1=C.charAt(j);ch2=C.charAt(0);rtn1=B.indexOf(ch1);rtn3=F.indexOf(ch2);if(rtn3<0){A=false;break}else{if(rtn1!=-1){A=false;break}}}return A}function check_name_num(D){var C=D;var B="!@#&$%^*+=|~`{}[]:;<>?/,1234567890";var F="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var A=true;for(j=0;j!=C.length;j++){ch1=C.charAt(j);ch2=C.charAt(0);rtn1=B.indexOf(ch1);rtn3=F.indexOf(ch2);if(rtn3<0){A=false;break}else{if(rtn1!=-1){A=false;break}}}return A}function check_other_city(D,B,A){var G=document.getElementById(B);var C=D.indexOf("other");if(C==0){G.style.display=""}else{G.style.display="none"}if(A!=""){var F=document.getElementById(A);F.style.display="none"}}function isValidEmail(A){if(!(/^[^a-zA-Z]/.test(A))&&(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(A))){return true}else{return false}}function ValidateNo(F,C){for(var D=0;D<F.length;D++){var B=F.charAt(D);var G=false;for(var A=0;A<C.length;A++){if(B==C.charAt(A)){G=true}}if(!G){return false}}return true}function acceptNumber(B,H){if(!H){H=0}var A=(B.which)?B.which:event.keyCode;var C="0";if(H=="0"){var G=["48","49","50","51","52","53","54","55","56","57","96","97","98","99","100","101","102","103","104","105","8","46","13","9","116","37","38","39","40"]}else{var G=["48","49","50","51","52","53","54","55","56","57","96","97","98","99","100","101","102","103","104","105","8","46","13","9","116","37","38","39","40","190","110"]}var F=G.length;for(var D=0;D<F;D++){if(G[D]==A){C="1"}}if(C=="1"){return true}else{return false}}function createAjaxObject(D){var B=new Array();B[D]=false;try{B[D]=new ActiveXObject("Msxml2.XMLHTTP")}catch(C){try{B[D]=new ActiveXObject("Microsoft.XMLHTTP")}catch(A){B[D]=false}}if(!B[D]&&typeof XMLHttpRequest!="undefined"){B[D]=new XMLHttpRequest()}return B[D]}var xmlhttp=false;try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){xmlhttp=false}}if(!xmlhttp&&typeof XMLHttpRequest!="undefined"){xmlhttp=new XMLHttpRequest()}Array.prototype.inArray=function(B){var A;for(A=0;A<this.length;A++){if(this[A]===B){return true}}return false};function makerequest(serverPage,objID){var obj=document.getElementById(objID);try{xmlhttp.open("GET",serverPage,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){var text=xmlhttp.responseText.substr(0,(xmlhttp.responseText.length-1));if(text==""){text="&nbsp;"}obj.innerHTML=text;mystr=xmlhttp.responseText.substr(0,(xmlhttp.responseText.length-1));var thelength=xmlhttp.responseText.length;var last_char=xmlhttp.responseText.charAt(thelength-1);if(eval("last_char")==0){return false}else{return true}}else{document.getElementById(objID).innerHTML='<table width="100%"><tr><td height="10" valign="center" align="center" class="text" style="color:000000;"><font style="font-size:9px">Loading</font>&nbsp;&nbsp;<input type="image" name="imageField" src="'+IMG_SERVER+'/images/loading.gif"/></td></tr></table>'}};xmlhttp.send(null)}catch(e){}}function makeajaxpostrequest(B,A){var D=document.getElementById(A);try{xmlhttp.open("POST",B,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){D.innerHTML=xmlhttp.responseText}};xmlhttp.send(null)}catch(C){}}function ajaxlogin(serverPage,objID,type,mode,currentpage,show,propertyid,mobilepage){if(currentpage==""||currentpage=="undefined"){currentpage="listing"}if(!mobilepage){mobilepage=0}var obj=document.getElementById(objID);try{xmlhttp.open("GET",serverPage,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){mystr=xmlhttp.responseText.substr(0,(xmlhttp.responseText.length-1));var thelength=xmlhttp.responseText.length;var last_char=xmlhttp.responseText.charAt(thelength-1);if(currentpage=="saveagetalert"){var getmessage="";getmessage=xmlhttp.responseText;var temp=new Array();temp=getmessage.split("##$$##");output=temp[0].substr(temp[0].length-4,temp[0].length);if(output=="DONE"){if(document.getElementById("div_getalert")){document.getElementById("div_getalert").innerHTML=temp[0].substr(0,temp[0].length-4)}if(document.getElementById("div_welcome")){document.getElementById("div_welcome").innerHTML="Hi <b>"+temp[1]+"</b>&nbsp;&nbsp;"}if(document.getElementById("div_toplinks")){document.getElementById("div_toplinks").innerHTML='<a href="/" class="toplinks" >Home</a>&nbsp;|&nbsp;<a href="/help/about-us.php" class="toplinks" >About Us</a>&nbsp;|&nbsp;<a href="/help/faq.php" class="toplinks" >FAQ\'s</a>&nbsp;|&nbsp;<a href="/help/contact-us.php" class="toplinks" >Contact Us</a>&nbsp;|&nbsp;<a href="/member/logout.php" class="toplinks" >Logout</a>'}if(document.getElementById("div_register_tab")){document.getElementById("div_register_tab").innerHTML='<a href="/member/my-makaan-account.php" class="hrefheader" style="color:#000;font-size:13px;text-decoration:none;"><span class="menu-left" onmouseover="changetab(\'reg\', true);" onmouseout="changetab(\'reg\', false);" id="menu-reg-left"></span><span class="menu-mid textnopad" onmouseover="changetab(\'reg\', true);" onmouseout="changetab(\'reg\', false);" id="menu-reg-mid"><b><span class="tabtext">My Makaan Account</span></b> </span><span class="menu-right" onmouseover="changetab(\'reg\', true);" onmouseout="changetab(\'reg\', false);" id="menu-reg-right"></span></a>'}if(document.getElementById("div_msg")){document.getElementById("div_msg").innerHTML=""}if(document.getElementById("div_msg2")){document.getElementById("div_msg2").innerHTML=""}}else{output=getmessage.substr(getmessage.length-1,getmessage.length);if(eval(output)=="0"||eval(output)==0){document.getElementById("div_msg2").innerHTML="";document.getElementById("div_msg2").innerHTML=getmessage.substr(0,getmessage.length-1)}else{document.getElementById("div_msg2").innerHTML=getmessage}}}else{if(eval(last_char)=="0"){obj.innerHTML=mystr}else{var b=xmlhttp.responseText;var temp=new Array();temp=b.split("#");if(currentpage=="requirement"){if(document.getElementById("div_toplinks")){document.getElementById("div_toplinks").innerHTML='<a href="/" class="toplinks" >Home</a>&nbsp;|&nbsp;<a href="/help/about-us.php" class="toplinks" >About Us</a>&nbsp;|&nbsp;<a href="/help/faq.php" class="toplinks" >FAQ\'s</a>&nbsp;|&nbsp;<a href="/help/contact-us.php" class="toplinks" >Contact Us</a>&nbsp;|&nbsp;<a href=\'/makaan-iq/iq.php\' class=\'toplinks\' target=_blank>MakaanIQ</a><img src=\'http://img.makaan.com/images/new.jpg\' align=\'absmiddle\' />|&nbsp;<a href="/member/logout.php" class="toplinks" >Logout</a>'}if(document.getElementById("div_register_tab")){document.getElementById("div_register_tab").innerHTML='<a href="/member/my-makaan-account.php" class="hrefheader" style="color:#000;font-size:13px;text-decoration:none;"><span class="menu-left" onmouseover="changetab(\'reg\', true);" onmouseout="changetab(\'reg\', false);" id="menu-reg-left"></span><span class="menu-mid textnopad" onmouseover="changetab(\'reg\', true);" onmouseout="changetab(\'reg\', false);" id="menu-reg-mid"><b><span class="tabtext">My Makaan Account</span></b> </span><span class="menu-right" onmouseover="changetab(\'reg\', true);" onmouseout="changetab(\'reg\', false);" id="menu-reg-right"></span></a>'}document.getElementById("div_welcome").innerHTML="Hi <b>"+temp[2]+"</b>&nbsp;&nbsp;";document.getElementById("tr_rl1").style.display="none";document.getElementById("tr_rl2").style.display="none";document.getElementById("tr_f1").style.display="";document.getElementById("tr_f2").style.display="";document.requiremant_frm.loginuser.value=temp[0];disable_fields();document.getElementById("tr_edit").style.display=""}else{document.getElementById("div_welcome").innerHTML="Hi <b>"+temp[2]+"</b>&nbsp;&nbsp;";document.getElementById("div_toplinks").innerHTML='<a href="/" class="toplinks" >Home</a>&nbsp;|&nbsp;<a href="/help/about-us.php" class="toplinks" >About Us</a>&nbsp;|&nbsp;<a href="/help/faq.php" class="toplinks" >FAQ\'s</a>&nbsp;|&nbsp;<a href="/help/contact-us.php" class="toplinks" >Contact Us</a>&nbsp;|&nbsp;<a href="/member/logout.php" class="toplinks" >Logout</a>';document.getElementById("div_register_tab").innerHTML='<a href="/member/my-makaan-account.php" class="hrefheader" style="color:#000;font-size:13px;text-decoration:none;"><span class="menu-left" onmouseover="changetab(\'reg\', true);" onmouseout="changetab(\'reg\', false);" id="menu-reg-left"></span><span class="menu-mid textnopad" onmouseover="changetab(\'reg\', true);" onmouseout="changetab(\'reg\', false);" id="menu-reg-mid"><b><span class="tabtext">My Makaan Account</span></b> </span><span class="menu-right" onmouseover="changetab(\'reg\', true);" onmouseout="changetab(\'reg\', false);" id="menu-reg-right"></span></a>';document.getElementById("div_login").innerHTML=""}}}}else{document.getElementById(objID).innerHTML="Processing.....please wait"}};xmlhttp.send(null)}catch(e){}}function makeajaxrequesnumber(B,A){var D=document.getElementById(A);try{xmlhttp.open("GET",B,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){D.innerHTML=xmlhttp.responseText}else{D.innerHTML="<table border=0 width='100%'><tr><td valign='top' class='columnhead' width='30%'></td><td   width='1%' ></td><td  width='79%' valign='middle'><font style='font-size:9px'>Processing.....please wait</font></td> </tr></table>"}};xmlhttp.send(null)}catch(C){}}onerror=handleErrors;var msg=null;function handleErrors(C,B,A){document.status="";return true}function trim(B){var A=B;return A.replace(/^\s+/,"").replace(/\s+$/,"")}function ltrim(A){return A.replace(/^\s*/,"")}function rtrim(A){return A.replace(/\s*$/,"")}function validatesymbolwithspace(formName,fieldName){var doc="document.";a=eval(doc+formName+"."+fieldName);fieldValue=eval(doc+formName+"."+fieldName+".value");chk1="!@#$%^*+=|~`{}[]:;<>?/,1234567890";chk3="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(j=0;j!=fieldValue.length;j++){ch1=fieldValue.charAt(j);ch2=fieldValue.charAt(0);rtn1=chk1.indexOf(ch1);rtn3=chk3.indexOf(ch2);if(rtn3<0){eval(doc+formName+"."+fieldName+".focus()");return false;break}else{if(rtn1!=-1){eval(doc+formName+"."+fieldName+".focus()");return false;break}}}return true}function format_indian_currency(F){myvalue=F.split(".");if(myvalue[0].length>3){orginalnum=myvalue[0];num="";for(var C=orginalnum.length-1;C>=0;C--){num+=orginalnum.charAt(C)}var A=3;var B;B="";for(var D=(num.length-1);D>=0;D--){if(D%A==0&&D>0){B+=",";A=2}B+=num.charAt(D)}if(num.length%2==0){return B}else{return B.substr(1)}}else{return myvalue[0]}}function change_res_com_requirement(){var B=document.requiremant_frm.property_type_id.value;if(B==4||B==10||B==9||B==16||B==7||B==6){document.getElementById("unit_combo").style.display="";document.getElementById("sqfeet").style.display="none"}else{document.getElementById("unit_combo").style.display="none";document.getElementById("sqfeet").style.display=""}if(B==4||B>=10){document.getElementById("tr_bedrooms").style.display="none"}else{document.getElementById("tr_bedrooms").style.display=""}}var ptimeval=new Object();ptimeval["1"]=[{value:"0",text:"Less than 6 months"},{value:"1",text:"6 - 12 months"},{value:"2",text:"More than 12 months"}];ptimeval["2"]=[{value:"3",text:"Ready to move-in"},{value:"4",text:"30 - 60 days"},{value:"5",text:"More than 60 days"}];function clearValidation(frm){formObj=eval("document."+frm);var msg="";var val="1";for(var i=1;i<formObj.length;i++){fldObj=formObj.elements[i];if(fldObj.type.toUpperCase()=="TEXT"||fldObj.type.toUpperCase()=="SELECT"||fldObj.type.toUpperCase()=="SELECT-ONE"||fldObj.type.toUpperCase()=="TEXTAREA"||fldObj.type.toUpperCase()=="CHECKBOX"){fldObj.className="textcontrol"}if(fldObj.name=="userradio"&&fldObj.checked&&document.getElementById("tr_f2").style.display!=""){val=fldObj.value;change_user_type(val)}}}function checkemailcondition(){var A="@";x=document.requiremant_frm.contact_email.value;ctrl=x.split(A);if(ctrl[1]=="rediff.com"){document.requiremant_frm.contact_email.value=ctrl[0]+"@rediffmail.com"}return true}function reqsetBudget(chooser,def_sale,def_rent,find,frm_name,price_from,price_to){if(!price_from){price_from=0}if(!price_to){price_to=0}if(find==0){chooser=chooser}else{if(document.requiremant_frm.property_for[0].checked==true){chooser="1"}else{chooser="2"}}var newElem;var where=(navigator.appName=="Microsoft Internet Explorer")?-1:null;var cityChooser=eval("document."+frm_name+".elements['budget_from']");if(find!=1){while(cityChooser.options.length){cityChooser.remove(0)}var choice=chooser;var db=budgetval[choice];newElem=document.createElement("option");if(chooser=="2"){newElem.text="<5000";newElem.value="4999"}else{newElem.text="<10 Lacs";newElem.value="999999"}cityChooser.add(newElem,where);if(choice!=""){var selfound=0;for(var i=0;i<db.length;i++){if(selfound==0&&chooser=="2"&&price_from=="4999"){newElem.selected=true;selfound=1}else{if(selfound==0&&chooser=="1"&&price_from=="999999"){newElem.selected=true;selfound=1}}newElem=document.createElement("option");newElem.text=db[i].text;newElem.value=db[i].value;if(i==(db.length-1)){newElem.text=">"+newElem.text}cityChooser.add(newElem,where);if(selfound==0&&db[i].value==price_from){newElem.selected=true;selfound=1}else{if(selfound==0&&chooser==1&&db[i].value=="3000000"){newElem.selected=true}else{if(selfound==0&&chooser==2&&db[i].value=="15000"){newElem.selected=true}}}}}}var cityChooser2=eval("document."+frm_name+".elements['budget_to']");while(cityChooser2.options.length){cityChooser2.remove(0)}var choice=chooser;var db=budgetval[choice];var start=0;if(find==0){if(chooser==1){start=4}else{start=3}}else{start=cityChooser.selectedIndex}var maxoptions=cityChooser.options.length-1;if(start==0||start==maxoptions){newElem=document.createElement("option");newElem.text="Max Price";newElem.value="";cityChooser2.add(newElem,where);cityChooser2.disabled=true}else{if(choice!=""){var selfound=0;for(var i=start;i<db.length;i++){newElem=document.createElement("option");newElem.text=db[i].text;newElem.value=db[i].value;cityChooser2.add(newElem,where);if(db[i].value==price_to){newElem.selected=true;selfound=1}else{if(selfound==0&&choice==1&&db[i].value==def_sale){newElem.selected=true}else{if(selfound==0&&db[i].value==def_rent){newElem.selected=true}}}}cityChooser2.disabled=false}}}var priorityval=new Object();priorityval["1"]=[{value:"1",text:"Within 3 months"},{value:"2",text:"3 to 6 months"},{value:"3",text:"6 to 9 months"},{value:"4",text:"More than 9 months"}];priorityval["2"]=[{value:"5",text:"Within 1 month"},{value:"6",text:"1 to 2 months"},{value:"7",text:"2 to 3 months"},{value:"8",text:"More than 3 months"}];function showhideloan(G,A){var F;var C=(navigator.appName=="Microsoft Internet Explorer")?-1:null;var H=document.requiremant_frm.elements.loan_time;while(H.options.length){H.remove(0)}F=document.createElement("option");F.text="--- Select ---";F.value="";H.add(F,C);if(G=="Rent"){var B=priorityval["2"]}else{var B=priorityval["1"]}for(var D=0;D<B.length;D++){F=document.createElement("option");F.text=B[D].text;F.value=B[D].value;H.add(F,C);if(B[D].value==A){F.selected=true}}}function post_requirement_check(B,C){clearValidation("requiremant_frm");var A=0;if(document.requiremant_frm.loginuser.value==""||document.requiremant_frm.loginuser.value=="0"){document.getElementById("div_msg2").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please login";A++;return false}A+=new_requiremant_form();if(A>0){return false}else{enable_fields();document.getElementById("submit_image").disabled=true;document.getElementById("submit_image").src=IMG_SERVER+"/images/submit-button-deact.gif";document.requiremant_frm.submit();return true}}function change_user_type(A){if(A=="existing"){document.getElementById("span_exist").style.display="";document.getElementById("span_exist").style.paddingTop="19px";document.getElementById("span_exist").style.paddingBottom="19px";document.getElementById("span_new").style.display="none";document.getElementById("span_checkbox").style.display="none";document.getElementById("trchk").style.display="none";document.requiremant_frm.userid.focus();document.requiremant_frm.usertype.value="existing"}else{document.getElementById("span_exist").style.display="none";document.getElementById("span_new").style.display="";document.getElementById("span_checkbox").style.display="";document.getElementById("trchk").style.display="";document.requiremant_frm.fullname.focus();document.requiremant_frm.usertype.value="new"}}function check_login(){clearValidation("requiremant_frm");var D=0;var C=10;var G=4;var F=parseInt(document.requiremant_frm.property_type_id.value);var A=document.requiremant_frm.property_for.value;if(document.requiremant_frm.property_for[0].checked==true){var A="Sale"}else{var A="Rent"}if(document.requiremant_frm.property_type_id.value==""){if(D==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please select property type";document.requiremant_frm.property_type_id.focus()}document.requiremant_frm.property_type_id.className="errorcontrol";D++}if(document.requiremant_frm.city.value==""){if(D==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please select a city";document.requiremant_frm.city.focus()}document.requiremant_frm.city.className="errorcontrol";D++}else{if(document.requiremant_frm.city.value.substring(0,5)=="other"&&(document.requiremant_frm.city_other.value=="Please enter other city"||document.requiremant_frm.city_other.value=="")){if(D==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter a city";document.requiremant_frm.city_other.focus()}document.requiremant_frm.city_other.className="errorcontrol";D++}}if(document.requiremant_frm.city.value.indexOf("other")!=-1&&(document.requiremant_frm.city_other.value!=""&&!check_name(document.requiremant_frm.city_other.value))){if(D==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter valid city.";document.requiremant_frm.city_other.focus()}document.requiremant_frm.city_other.className="errorcontrol";D++}if((F!="4"&&F<"10")&&(document.requiremant_frm.bedroom.value=="")){if(D==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please provide no. of bedroom";document.requiremant_frm.bedroom.focus()}document.requiremant_frm.bedroom.className="errorcontrol";D++}if(document.requiremant_frm.budget_from.value==""){if(D==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please select your budget";document.requiremant_frm.budget_from.focus()}document.requiremant_frm.budget_from.className="errorcontrol";D++}if((F==4||F==10||F==9||F==16||F==7||F==6)&&(document.requiremant_frm.area_unit.value=="Unit"||document.requiremant_frm.area_unit.value=="")){if(D==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please select area unit";document.requiremant_frm.area_unit.focus()}document.requiremant_frm.area_unit.className="errorcontrol";D++}if(document.requiremant_frm.min_area.value==""||isNaN(document.requiremant_frm.min_area.value)){if(D==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter valid minimum area";document.requiremant_frm.min_area.focus()}document.requiremant_frm.min_area.className="errorcontrol";D++}else{if(document.requiremant_frm.min_area.value.indexOf(".")!="-1"){if(D==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter minimum area without decimals";document.requiremant_frm.min_area.focus()}document.requiremant_frm.min_area.className="errorcontrol";D++}}if(document.requiremant_frm.loan_time.value==""){if(D==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please select estimated time of purchase";document.requiremant_frm.loan_time.focus()}document.requiremant_frm.loan_time.className="errorcontrol";D++}if(document.requiremant_frm.userid.value==""){if(D==0){document.getElementById("div_msg").innerHTML="<img src='/images/alert.gif' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter your username.";document.requiremant_frm.userid.focus()}document.requiremant_frm.userid.className="errorcontrol";D++}if(document.requiremant_frm.password.value==""){if(D==0){document.getElementById("div_msg").innerHTML="<img src='/images/alert.gif' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter your password.";document.requiremant_frm.password.focus()}document.requiremant_frm.password.className="errorcontrol";D++}if(D==0){document.getElementById("div_msg").innerHTML="";var B="/ssi/ajax/ajax-content.php?process=login&userid="+document.requiremant_frm.userid.value+"&password="+document.requiremant_frm.password.value;ajaxlogin(B,"div_msg","","","requirement")}return false}function reg_login(val){clearValidation("requiremant_frm");var errnum=0;var com_id=10;var res_id=4;var selected=parseInt(document.requiremant_frm.property_type_id.value);var option_sr=document.requiremant_frm.property_for.value;if(document.requiremant_frm.property_for[0].checked==true){var option_sr="Sale"}else{var option_sr="Rent"}if(document.requiremant_frm.property_type_id.value==""){if(errnum==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please select property type";document.requiremant_frm.property_type_id.focus()}document.requiremant_frm.property_type_id.className="errorcontrol";errnum++}if(document.requiremant_frm.city.value==""){if(errnum==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please select a city";document.requiremant_frm.city.focus()}document.requiremant_frm.city.className="errorcontrol";errnum++}else{if(document.requiremant_frm.city.value.substring(0,5)=="other"&&(document.requiremant_frm.city_other.value=="Please enter other city"||document.requiremant_frm.city_other.value=="")){if(errnum==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter a city";document.requiremant_frm.city_other.focus()}document.requiremant_frm.city_other.className="errorcontrol";errnum++}}if(document.requiremant_frm.city.value.indexOf("other")!=-1&&(document.requiremant_frm.city_other.value!=""&&!check_name(document.requiremant_frm.city_other.value))){if(errnum==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter valid city.";document.requiremant_frm.city_other.focus()}document.requiremant_frm.city_other.className="errorcontrol";errnum++}if((selected!="4"&&selected<"10")&&(document.requiremant_frm.bedroom.value=="")){if(errnum==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please provide no. of bedroom";document.requiremant_frm.bedroom.focus()}document.requiremant_frm.bedroom.className="errorcontrol";errnum++}if(document.requiremant_frm.budget_from.value==""){if(errnum==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please select your budget";document.requiremant_frm.budget_from.focus()}document.requiremant_frm.budget_from.className="errorcontrol";errnum++}if((selected==4||selected==10||selected==9||selected==16||selected==7||selected==6)&&(document.requiremant_frm.area_unit.value=="Unit"||document.requiremant_frm.area_unit.value=="")){if(errnum==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please select area unit";document.requiremant_frm.area_unit.focus()}document.requiremant_frm.area_unit.className="errorcontrol";errnum++}if(document.requiremant_frm.min_area.value==""||isNaN(document.requiremant_frm.min_area.value)){if(errnum==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter valid minimum area";document.requiremant_frm.min_area.focus()}document.requiremant_frm.min_area.className="errorcontrol";errnum++}else{if(document.requiremant_frm.min_area.value.indexOf(".")!="-1"){if(errnum==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter minimum area without decimals";document.requiremant_frm.min_area.focus()}document.requiremant_frm.min_area.className="errorcontrol";errnum++}}if(document.requiremant_frm.loan_time.value==""){if(errnum==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please select estimated time of purchase";document.requiremant_frm.loan_time.focus()}document.requiremant_frm.loan_time.className="errorcontrol";errnum++}if(document.requiremant_frm.fullname.value==""||document.requiremant_frm.fullname.value=="Name"){if(errnum==0){document.getElementById("div_msg").innerHTML="<img src='/images/alert.gif' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter your name.";document.requiremant_frm.fullname.focus()}document.requiremant_frm.fullname.className="errorcontrol";errnum++}if(document.requiremant_frm.fullname.value!=""&&!check_name(document.requiremant_frm.fullname.value)){if(errnum==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter your name without any special characters.";document.requiremant_frm.fullname.focus()}document.requiremant_frm.fullname.className="errorcontrol";errnum++}else{if(document.requiremant_frm.fullname.value!=""&&!check_name_num(document.requiremant_frm.fullname.value)){if(errnum==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter your name without any numeric characters.";document.requiremant_frm.fullname.focus()}document.requiremant_frm.fullname.className="errorcontrol";errnum++}}if(document.requiremant_frm.fullname.value!=""&&document.requiremant_frm.fullname.value.length<=1){if(errnum==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter a correct name .";document.requiremant_frm.fullname.focus()}document.requiremant_frm.fullname.className="errorcontrol";errnum++}if(document.requiremant_frm.email.value==""||document.requiremant_frm.email.value=="E-mail"){if(errnum==0){document.getElementById("div_msg").innerHTML="<img src='/images/alert.gif' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter your e-mail.";document.requiremant_frm.email.focus()}document.requiremant_frm.email.className="errorcontrol";errnum++}else{if(document.requiremant_frm.email.value!=""&&!isValidEmail(document.requiremant_frm.email.value)){if(errnum==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter a valid e-mail.";document.requiremant_frm.email.focus()}document.requiremant_frm.email.className="errorcontrol";errnum++}}if(document.requiremant_frm.country_code.value==""){if(errnum==0){document.getElementById("div_msg").innerHTML="<img src='/images/alert.gif' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter the country code.";document.requiremant_frm.country_code.focus()}document.requiremant_frm.country_code.className="errorcontrol";errnum++}else{if(!ValidateNo(document.requiremant_frm.country_code.value,"1234567890,-/+")&&document.requiremant_frm.country_code.value!=""){if(errnum==0){document.getElementById("div_msg").innerHTML="&nbsp;&nbsp;<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter your valid country code.";document.requiremant_frm.country_code.focus()}document.requiremant_frm.country_code.className="errorcontrol";errnum++}}if(document.requiremant_frm.mobile.value==""||document.requiremant_frm.mobile.value=="Mobile"){if(errnum==0){document.getElementById("div_msg").innerHTML="<img src='/images/alert.gif' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter your mobile.";document.requiremant_frm.mobile.focus()}document.requiremant_frm.mobile.className="errorcontrol";errnum++}else{if(!ValidateNo(document.requiremant_frm.mobile.value,"1234567890,-/+")&&document.requiremant_frm.mobile.value!=""){if(errnum==0){document.getElementById("div_msg").innerHTML="&nbsp;&nbsp;<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter your valid mobile.";document.requiremant_frm.mobile.focus()}document.requiremant_frm.mobile.className="errorcontrol";errnum++}else{if(document.requiremant_frm.mobile.value.length<10){if(errnum==0){document.getElementById("div_msg").innerHTML="&nbsp;&nbsp;<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter your valid mobile.";document.requiremant_frm.mobile.focus()}document.requiremant_frm.mobile.className="errorcontrol";errnum++}else{if(document.requiremant_frm.mobile.value.substring(0,1)!=9&&document.requiremant_frm.mobile.value.substring(0,1)!=8){if(errnum==0){document.getElementById("div_msg").innerHTML="&nbsp;&nbsp;<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter your valid mobile.";document.requiremant_frm.mobile.focus()}document.requiremant_frm.mobile.className="errorcontrol";errnum++}}}}if(!document.requiremant_frm.terms.checked){if(errnum==0){document.getElementById("div_msg").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please accept privacy policy and terms of use agreement.";document.requiremant_frm.terms.focus()}document.requiremant_frm.terms.className="errorcontrol";errnum++}if(errnum==0){var cother=document.requiremant_frm.city_other.value;if(cother=="Please enter other city"){cother=""}document.getElementById("div_msg").innerHTML="";var url="/ssi/ajax/ajax-content.php?process=registeruser&val="+val+"&city="+document.requiremant_frm.city.value+"&cother="+cother+"&fullname="+document.requiremant_frm.fullname.value+"&mobile="+document.requiremant_frm.mobile.value+"&email="+document.requiremant_frm.email.value+"&updateprofile=1";var xmlhttp=false;try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){xmlhttp=false}}if(!xmlhttp&&typeof XMLHttpRequest!="undefined"){xmlhttp=new XMLHttpRequest()}var obj=document.getElementById("div_msg");try{xmlhttp.open("GET",url,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){mystr=xmlhttp.responseText.substr(0,(xmlhttp.responseText.length-1));var thelength=xmlhttp.responseText.length;var last_char=xmlhttp.responseText.charAt(thelength-1);if(eval(last_char)=="0"){obj.innerHTML=mystr}else{var b=xmlhttp.responseText;var temp=new Array();temp=b.split("#");if(temp[0]==0){document.getElementById("div_msg").innerHTML=temp[1];eval("document.requiremant_frm."+temp[2]+".focus();")}else{if(document.getElementById("div_toplinks")){document.getElementById("div_toplinks").innerHTML='<a href="/" class="toplinks" >Home</a>&nbsp;|&nbsp;<a href="/help/about-us.php" class="toplinks" >About Us</a>&nbsp;|&nbsp;<a href="/help/faq.php" class="toplinks" >FAQ\'s</a>&nbsp;|&nbsp;<a href="/help/contact-us.php" class="toplinks" >Contact Us</a>&nbsp;|&nbsp;<a href=\'/makaan-iq/iq.php\' class=\'toplinks\' target=_blank>MakaanIQ</a><img src=\'http://img.makaan.com/images/new.jpg\' align=\'absmiddle\' />|&nbsp;<a href="/member/logout.php" class="toplinks" >Logout</a>'}if(document.getElementById("div_register_tab")){document.getElementById("div_register_tab").innerHTML='<a href="/member/my-makaan-account.php" class="hrefheader" style="color:#000;font-size:13px;text-decoration:none;"><span class="menu-left" onmouseover="changetab(\'reg\', true);" onmouseout="changetab(\'reg\', false);" id="menu-reg-left"></span><span class="menu-mid textnopad" onmouseover="changetab(\'reg\', true);" onmouseout="changetab(\'reg\', false);" id="menu-reg-mid"><b><span class="tabtext">My Makaan Account</span></b> </span><span class="menu-right" onmouseover="changetab(\'reg\', true);" onmouseout="changetab(\'reg\', false);" id="menu-reg-right"></span></a>'}document.getElementById("div_welcome").innerHTML="Hi <b>"+temp[3]+"</b>&nbsp;&nbsp;";document.getElementById("tr_rl1").style.display="none";document.getElementById("tr_rl2").style.display="none";document.getElementById("tr_f1").style.display="";document.getElementById("tr_f2").style.display="";document.requiremant_frm.loginuser.value=temp[0];disable_fields();document.getElementById("tr_edit").style.display=""}}}else{document.getElementById("div_msg").innerHTML="Processing.....please wait"}}}catch(e){}xmlhttp.send(null)}return false}function checkerrors(A){if(document.requiremant_frm.userradio&&document.getElementById("tr_f2").style.display!=""){if(document.requiremant_frm.userradio[0].checked==true){if(A=="0"){reg_login(0)}else{reg_login(1)}}else{check_login()}}else{post_requirement_check()}}function new_requiremant_form(){var C=0;var B=10;var F=4;var D=parseInt(document.requiremant_frm.property_type_id.value);var A=document.requiremant_frm.property_for.value;if(document.requiremant_frm.property_for[0].checked==true){var A="Sale"}else{var A="Rent"}if(document.requiremant_frm.property_type_id.value==""){if(C==0){document.getElementById("div_msg2").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please select property type";document.requiremant_frm.property_type_id.focus()}document.requiremant_frm.property_type_id.className="errorcontrol";C++}if(document.requiremant_frm.city.value==""){if(C==0){document.getElementById("div_msg2").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please select a city";document.requiremant_frm.city.focus()}document.requiremant_frm.city.className="errorcontrol";C++}else{if(document.requiremant_frm.city.value.substring(0,5)=="other"&&(document.requiremant_frm.city_other.value=="Please enter other city"||document.requiremant_frm.city_other.value=="")){if(C==0){document.getElementById("div_msg2").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter a city";document.requiremant_frm.city_other.focus()}document.requiremant_frm.city_other.className="errorcontrol";C++}}if(document.requiremant_frm.city.value.indexOf("other")!=-1&&(document.requiremant_frm.city_other.value!=""&&!check_name(document.requiremant_frm.city_other.value))){if(C==0){document.getElementById("div_msg2").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter valid city.";document.requiremant_frm.city_other.focus()}document.requiremant_frm.city_other.className="errorcontrol";C++}if((D!="4"&&D<"10")&&(document.requiremant_frm.bedroom.value=="")){if(C==0){document.getElementById("div_msg2").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please provide no. of bedroom";document.requiremant_frm.bedroom.focus()}document.requiremant_frm.bedroom.className="errorcontrol";C++}if(document.requiremant_frm.budget_from.value==""){if(C==0){document.getElementById("div_msg2").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please select your budget";document.requiremant_frm.budget_from.focus()}document.requiremant_frm.budget_from.className="errorcontrol";C++}if((D==4||D==10||D==9||D==16||D==7||D==6)&&(document.requiremant_frm.area_unit.value=="Unit"||document.requiremant_frm.area_unit.value=="")){if(C==0){document.getElementById("div_msg2").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please select area unit";document.requiremant_frm.area_unit.focus()}document.requiremant_frm.area_unit.className="errorcontrol";C++}if(document.requiremant_frm.min_area.value==""||isNaN(document.requiremant_frm.min_area.value)){if(C==0){document.getElementById("div_msg2").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter valid minimum area";document.requiremant_frm.min_area.focus()}document.requiremant_frm.min_area.className="errorcontrol";C++}else{if(document.requiremant_frm.min_area.value.indexOf(".")!="-1"){if(C==0){document.getElementById("div_msg2").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter minimum area without decimals";document.requiremant_frm.min_area.focus()}document.requiremant_frm.min_area.className="errorcontrol";C++}}if(document.requiremant_frm.loan_time.value==""){if(C==0){document.getElementById("div_msg2").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please select estimated time of purchase";document.requiremant_frm.loan_time.focus()}document.requiremant_frm.loan_time.className="errorcontrol";C++}if(document.requiremant_frm.folder_name.value==""){if(C==0){document.getElementById("div_msg2").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please enter folder name";document.requiremant_frm.folder_name.focus()}document.requiremant_frm.folder_name.className="errorcontrol";C++}else{if(validatesymbol("requiremant_frm","folder_name")==false){if(C==0){document.getElementById("div_msg2").innerHTML="<img src='"+ALERT_IMG+"' width='10' height='10' align='absmiddle' vspace='3' border=0>&nbsp;Please a valid folder name";document.requiremant_frm.folder_name.focus()}document.requiremant_frm.folder_name.className="errorcontrol";C++}}return C}function disable_fields(){document.requiremant_frm.property_for[0].disabled=true;document.requiremant_frm.property_for[1].disabled=true;document.requiremant_frm.property_type_id.disabled=true;document.requiremant_frm.city.disabled=true;document.requiremant_frm.city_other.disabled=true;if(document.getElementById("locality_id")!=null){document.getElementById("locality_id").disabled=true}if(document.getElementById("loc")!=null){document.getElementById("loc").disabled=true}document.requiremant_frm.bedroom.disabled=true;document.requiremant_frm.budget_from.disabled=true;document.requiremant_frm.budget_to.disabled=true;document.requiremant_frm.area_unit.disabled=true;document.requiremant_frm.min_area.disabled=true;document.requiremant_frm.loan_time.disabled=true;document.getElementById("unitc").style.display="none";document.requiremant_frm.property_for[0].style.color="#999999";document.requiremant_frm.property_for[1].style.color="#999999";document.requiremant_frm.property_type_id.style.color="#999999";document.requiremant_frm.city.style.color="#999999";document.requiremant_frm.city_other.style.color="#999999";if(document.getElementById("locality_id")!=null){document.requiremant_frm.locality_id.style.color="#999999"}document.requiremant_frm.bedroom.style.color="#999999";document.requiremant_frm.budget_from.style.color="#999999";document.requiremant_frm.budget_to.style.color="#999999";document.requiremant_frm.area_unit.style.color="#999999";document.requiremant_frm.min_area.style.color="#999999";document.requiremant_frm.loan_time.style.color="#999999";document.getElementById("middletable").style.backgroundColor="#F2F2F2";document.getElementById("borderdiv").style.borderLeft="1px solid #F2F2F2";document.getElementById("borderdiv").style.borderRight="1px solid #F2F2F2";var K="bl1h";var J="bl2h";var I="bl3h";var H="bl4h";var G="bl1bh";var F="bl2bh";var D="bl3bh";var C="bl4bh";var B=new RegExp("\\b"+K+"\\b");var A=new RegExp("\\b"+J+"\\b");var T=new RegExp("\\b"+I+"\\b");var S=new RegExp("\\b"+H+"\\b");var R=new RegExp("\\b"+G+"\\b");var Q=new RegExp("\\b"+F+"\\b");var P=new RegExp("\\b"+D+"\\b");var O=new RegExp("\\b"+C+"\\b");var M=document.getElementsByTagName("*");for(var L=0;L<M.length;L++){var N=M[L].className;if(B.test(N)){M[L].style.backgroundColor="#F2F2F2"}else{if(A.test(N)||Q.test(N)){M[L].style.backgroundColor="#F2F2F2";M[L].style.borderRight="2px solid #F2F2F2";M[L].style.borderLeft="2px solid #F2F2F2"}else{if(T.test(N)||S.test(N)||P.test(N)||O.test(N)){M[L].style.backgroundColor="#F2F2F2";M[L].style.borderRight="1px solid #F2F2F2";M[L].style.borderLeft="1px solid #F2F2F2"}}}}if(document.getElementById("s1")){document.getElementById("s1").style.color="#999999";document.getElementById("s2").style.color="#999999";document.getElementById("s3").style.color="#999999";document.getElementById("s4").style.color="#999999";document.getElementById("s5").style.color="#999999";document.getElementById("s6").style.color="#999999";document.getElementById("s7").style.color="#999999";document.getElementById("s8").style.color="#999999"}document.getElementById("sa").style.color="#999999";document.getElementById("sb").style.color="#999999";document.getElementById("sc").style.color="#999999";document.getElementById("sqfeet").style.color="#999999";document.getElementById("tr_edit").style.display=""}function enable_fields(){document.requiremant_frm.property_for[0].disabled=false;document.requiremant_frm.property_for[1].disabled=false;document.requiremant_frm.property_type_id.disabled=false;document.requiremant_frm.city.disabled=false;document.requiremant_frm.city_other.disabled=false;document.requiremant_frm.locality_id.disabled=false;document.requiremant_frm.bedroom.disabled=false;document.requiremant_frm.budget_from.disabled=false;document.requiremant_frm.budget_to.disabled=false;document.requiremant_frm.area_unit.disabled=false;document.requiremant_frm.min_area.disabled=false;document.requiremant_frm.loan_time.disabled=false;document.getElementById("unitc").style.display="";document.requiremant_frm.property_for[0].style.color="#000000";document.requiremant_frm.property_for[1].style.color="#000000";document.requiremant_frm.property_type_id.style.color="#000000";document.requiremant_frm.city.style.color="#000000";document.requiremant_frm.city_other.style.color="#000000";document.requiremant_frm.locality_id.style.color="#000000";document.requiremant_frm.bedroom.style.color="#000000";document.requiremant_frm.budget_from.style.color="#000000";document.requiremant_frm.budget_to.style.color="#000000";document.requiremant_frm.area_unit.style.color="#000000";document.requiremant_frm.min_area.style.color="#000000";document.requiremant_frm.loan_time.style.color="#000000";document.getElementById("middletable").style.backgroundColor="#BCDEFA";document.getElementById("borderdiv").style.borderLeft="1px solid #A7C4E3";document.getElementById("borderdiv").style.borderRight="1px solid #A7C4E3";var K="bl1h";var J="bl2h";var I="bl3h";var H="bl4h";var G="bl1bh";var F="bl2bh";var D="bl3bh";var C="bl4bh";var B=new RegExp("\\b"+K+"\\b");var A=new RegExp("\\b"+J+"\\b");var T=new RegExp("\\b"+I+"\\b");var S=new RegExp("\\b"+H+"\\b");var R=new RegExp("\\b"+G+"\\b");var Q=new RegExp("\\b"+F+"\\b");var P=new RegExp("\\b"+D+"\\b");var O=new RegExp("\\b"+C+"\\b");var M=document.getElementsByTagName("*");for(var L=0;L<M.length;L++){var N=M[L].className;if(B.test(N)){M[L].style.backgroundColor="#BCDEFA"}else{if(A.test(N)||Q.test(N)){M[L].style.backgroundColor="#BCDEFA";M[L].style.borderRight="2px solid #A7C4E3";M[L].style.borderLeft="2px solid #A7C4E3"}else{if(T.test(N)||S.test(N)||P.test(N)||O.test(N)){M[L].style.backgroundColor="#BCDEFA";M[L].style.borderRight="1px solid #A7C4E3";M[L].style.borderLeft="1px solid #A7C4E3"}}}}if(document.getElementById("s1")){document.getElementById("s1").style.color="#000000";document.getElementById("s2").style.color="#000000";document.getElementById("s3").style.color="#000000";document.getElementById("s4").style.color="#000000";document.getElementById("s5").style.color="#000000";document.getElementById("s6").style.color="#000000";document.getElementById("s7").style.color="#000000";document.getElementById("s8").style.color="#000000"}document.getElementById("sa").style.color="#000000";document.getElementById("sb").style.color="#000000";document.getElementById("sc").style.color="#000000";document.getElementById("sqfeet").style.color="#000000";document.getElementById("tr_edit").style.display="none"};
