﻿var xmlHttp
var AJEle
var AJCatId
var subCat
function GetXmlHttpObject()
{var xmlHttp=null;try
{xmlHttp=new XMLHttpRequest();}
catch(e)
{try
{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}}
return xmlHttp;}
var ListUtil=new Object();ListUtil.add=function(oListbox,sValue,sName){var oOption=document.createElement("option");oOption.setAttribute("value",sValue);oOption.appendChild(document.createTextNode(sName));oListbox.appendChild(oOption);}
function AlertMsg(Ele,msg)
{alert("Please "+msg);Ele.focus();return false;}
function LoadFlash()
{var PrjFls=document.getElementById("divProjectFlash");if(PrjFls)
{if(PrjFls.style.left=='')
{PrjFls.style.top="385px";PrjFls.style.display="";}}
return false;}
function ShowProjectReplay()
{clearTimeout(timerBanner)
timerBanner=setTimeout("ShowHiddenFlash()",10000);LoadFlash();var flashMovie=getFlashMovieObject("prjswf");if(document.getElementById('divProjectFlash'))
document.getElementById('divProjectFlash').style.display="";if(flashMovie)
{flashMovie.Rewind();flashMovie.Play();}}
function getFlashMovieObject(movieName)
{if(navigator.appName.indexOf("Microsoft Internet")==-1)
{if(document.embeds&&document.embeds[movieName])
return document.embeds[movieName];}
else if(window.document[movieName])
{return window.document[movieName];}
else
{return document.getElementById(movieName);}}
function ShowHiddenFlash()
{if(document.getElementById('divProjectFlash'))
document.getElementById('divProjectFlash').style.display="none";}
scrollStep=1
timerLeft=""
timerRight=""
function toLeft(id){document.getElementById(id).scrollLeft=0}
function scrollDivLeft(id){clearTimeout(timerRight)
document.getElementById(id).scrollLeft+=scrollStep
timerRight=setTimeout("scrollDivLeft('"+id+"')",10)}
function scrollIncreaseSpeed(){scrollStep++}
function scrollDivRight(id){clearTimeout(timerLeft)
document.getElementById(id).scrollLeft-=scrollStep
timerLeft=setTimeout("scrollDivRight('"+id+"')",10)}
function toRight(id){document.getElementById(id).scrollLeft=document.getElementById(id).scrollWidth}
function stopMe(){clearTimeout(timerRight)
clearTimeout(timerLeft)}
function ScrollNormal(Ele,DomainPath)
{scrollStep=1
if(Ele.src.toLowerCase().indexOf("rigarrg.gif")!=-1)
Ele.src=DomainPath+"images/RigArr.gif";else if(Ele.src.toLowerCase().indexOf("lefarrg.gif")!=-1)
Ele.src=DomainPath+"images/LefArr.gif";}
function ScrollOriginal(Ele,DomainPath)
{scrollStep=1
var scrollDiff=eval(document.getElementById("containerScroll").scrollWidth)-eval(document.getElementById("containerScroll").scrollLeft);if(Ele.src.toLowerCase().indexOf("rigarr.gif")!=-1&&scrollDiff>672)
Ele.src=DomainPath+"images/RigArrG.gif";else if(Ele.src.toLowerCase().indexOf("lefarr.gif")!=-1&&eval(document.getElementById("containerScroll").scrollLeft)>0)
Ele.src=DomainPath+"images/LefArrG.gif";}
function ScrollOriginalDev(Ele,DomainPath)
{scrollStep=1
var scrollDiff=eval(document.getElementById("container").scrollWidth)-eval(document.getElementById("container").scrollLeft);if(Ele.src.toLowerCase().indexOf("rigarr.gif")!=-1&&scrollDiff>648)
Ele.src=DomainPath+"images/RigArrG.gif";else if(Ele.src.toLowerCase().indexOf("lefarr.gif")!=-1&&eval(document.getElementById("containerScroll").scrollLeft)>0)
Ele.src=DomainPath+"images/LefArrG.gif";}
function scrollPImgDivLeft(id){document.getElementById("containerImg").scrollLeft+=285
if(document.getElementById("containerEnlgImg"))
document.getElementById("containerEnlgImg").scrollLeft+=100}
function scrollPImgDivRight(id){document.getElementById("containerImg").scrollLeft-=285
if(document.getElementById("containerEnlgImg"))
document.getElementById("containerEnlgImg").scrollLeft-=100}
function scrollProjectDivLeft(id,DomainPath){document.getElementById(id).scrollLeft+=672;var imgPSLeft=document.getElementById("imgPSLeft");var imgPSRight=document.getElementById("imgPSRight");var scrollDiff=eval(document.getElementById("containerScroll").scrollWidth)-eval(document.getElementById("containerScroll").scrollLeft);if(scrollDiff>672)
imgPSRight.src=DomainPath+"images/RigArrG.gif";if(scrollDiff==672)
imgPSRight.src=DomainPath+"images/RigArr.gif";if(eval(document.getElementById("containerScroll").scrollLeft)>0)
imgPSLeft.src=DomainPath+"images/LefArrG.gif";if(eval(document.getElementById("containerScroll").scrollLeft)==0)
imgPSLeft.src=DomainPath+"images/LefArr.gif";}
function scrollProjectDivRight(id,DomainPath){document.getElementById(id).scrollLeft=0;var imgPSLeft=document.getElementById("imgPSLeft");var imgPSRight=document.getElementById("imgPSRight");var scrollDiff=eval(document.getElementById("containerScroll").scrollWidth)-eval(document.getElementById("containerScroll").scrollLeft);if(scrollDiff>672)
imgPSRight.src=DomainPath+"images/RigArrG.gif";if(scrollDiff==672)
imgPSRight.src=DomainPath+"images/RigArr.gif";if(eval(document.getElementById("containerScroll").scrollLeft)>0)
imgPSLeft.src=DomainPath+"images/LefArrG.gif";if(eval(document.getElementById("containerScroll").scrollLeft)==0)
imgPSLeft.src=DomainPath+"images/LefArr.gif";}
function scrollDevDivLeft(id,DomainPath){document.getElementById(id).scrollLeft+=648;var imgDSLeft=document.getElementById("imgDSLeft");var imgDSRight=document.getElementById("imgDSRight");var scrollDiff=eval(document.getElementById("container").scrollWidth)-eval(document.getElementById("container").scrollLeft);if(scrollDiff>648)
imgDSRight.src=DomainPath+"images/RigArrG.gif";if(scrollDiff==648)
imgDSRight.src=DomainPath+"images/RigArr.gif";if(eval(document.getElementById("container").scrollLeft)>0)
imgDSLeft.src=DomainPath+"images/LefArrG.gif";if(eval(document.getElementById("container").scrollLeft)==0)
imgDSLeft.src=DomainPath+"images/LefArr.gif";}
function scrollDevDivRight(id,DomainPath){document.getElementById(id).scrollLeft-=648;var imgDSLeft=document.getElementById("imgDSLeft");var imgDSRight=document.getElementById("imgDSRight");var scrollDiff=eval(document.getElementById("container").scrollWidth)-eval(document.getElementById("container").scrollLeft);if(scrollDiff>648)
imgDSRight.src=DomainPath+"images/RigArrG.gif";if(scrollDiff==648)
imgDSRight.src=DomainPath+"images/RigArr.gif";if(eval(document.getElementById("container").scrollLeft)>0)
imgDSLeft.src=DomainPath+"images/LefArrG.gif";if(eval(document.getElementById("container").scrollLeft)==0)
imgDSLeft.src=DomainPath+"images/LefArr.gif";}
function ShowModelWindow(id,strMessage,pid,LoanType)
{var myWidth;var myHeight;if(typeof(window.innerWidth)=='number')
{myWidth=window.innerWidth;myHeight=window.innerHeight;}
else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight))
{myWidth=document.documentElement.clientWidth;myHeight=document.documentElement.clientHeight;}
else if(document.body&&(document.body.clientWidth||document.body.clientHeight))
{myWidth=document.body.clientWidth;myHeight=document.body.clientHeight;}
if(document.getElementById("divDisMessage"))
document.getElementById("divDisMessage").style.display="none";document.getElementById("divLogin").style.display="";document.getElementById(id).style.display="";if(id.indexOf("Enquiry")!=-1)
{document.getElementById(id).style.width="400px";document.getElementById(id).style.top=((eval(myHeight)/2)-eval(200))+"px";document.getElementById(id).style.left=((eval(myWidth)/2)-eval(200))+"px";if(strMessage.indexOf("Locations")!=-1)
{document.getElementById(id).style.width="660px";document.getElementById(id).style.left=((eval(myWidth)/2)-eval(330))+"px";}
if(strMessage=="RequestEBrochure")
{
document.getElementById(id).style.width="320px";document.getElementById(id).style.left=((eval(myWidth)/2)-eval(160))+"px";
ShowRequestEBrochure(id,pid,LoanType);
}
else if(strMessage=="ContactOwner")
{
document.getElementById(id).style.width="320px";document.getElementById(id).style.left=((eval(myWidth)/2)-eval(160))+"px";
ShowContactOwner(id,pid,LoanType);
}
else if(strMessage=="SignOut")
{setTimeout("RedirectToHome()",3000);document.getElementById(id).style.top=((eval(myHeight)/2)-eval(100))+"px"
ShowSignOut(id);}
else if(strMessage=="ProspectDetails")
{document.getElementById(id).style.top=((eval(myHeight)/2)-eval(250))+"px"
ShowProspectDetails(id,pid);}
else if(strMessage=="SearchLocations")
ShowLocationList(id,pid,LoanType,"1");else if(strMessage=="SearchCommLocations")
ShowLocationList(id,pid,LoanType,"2");else if(strMessage=="SearchDynamicLocations")
ShowDynamicLocationList(id,pid,LoanType);else if(strMessage=="ResidentialProjectsEnquiry")
ShowProjectResiEnquiryForm(id,pid,LoanType);else if(strMessage=="ResaleResiProperty")
ShowResaleResiEnquiryForm(id,pid,LoanType);else if(strMessage=="ResaleCommProperty")
ShowResaleCommEnquiryForm(id,pid,LoanType);else if(strMessage=="ResidentialLocations")
ShowResidentialLocationList(id,pid,LoanType);else if(strMessage=="ResaleResiLocations")
ShowResaleResiLocationList(id,pid,LoanType);else if(strMessage=="CommProjectsLocations")
ShowCommProjectsLocationList(id,pid,LoanType);else if(strMessage=="SearchHotLocation")
{document.getElementById(id).style.width="705px";if(document.getElementById("SearchCap"))
{document.getElementById(id).style.top=(eval($('#SearchCap').offset().top)-10)+"px";document.getElementById(id).style.left=(eval($('#SearchCap').offset().left)-17)+"px";}
else if(document.getElementById("ddlType"))
{document.getElementById(id).style.top=(eval($('#ddlType').offset().top)-26)+"px";document.getElementById(id).style.left=(eval($('#ddlType').offset().left)-21)+"px";}
ShowSearchHotLocation(id,pid,LoanType);}
else if(strMessage=="ResaleCommLocations")
ShowResaleCommLocationList(id,pid,LoanType);else if(strMessage!="PostReqThanksMessage")
ShowEnquiryForm(id,strMessage,pid,LoanType);
else {document.getElementById(id).style.border="none";document.getElementById(id).style.width="660px";document.getElementById(id).style.backgroundColor="Transparent";document.getElementById(id).style.top=((eval(myHeight)/2)-eval(280))+"px";document.getElementById(id).style.left=((eval(myWidth)/2)-eval(360))+"px";document.getElementById("divEnquiry").innerHTML=LoanType;}}
else if(id.indexOf("EnlargeImage")!=-1)
{document.getElementById(id).style.left=((eval(myWidth)/2)-eval(410))+"px";document.getElementById(id).style.top="5%";document.getElementById("imgEnlargeImage").src=strMessage;if(pid!=null)
document.getElementById("divEngCap").innerHTML=pid;else
document.getElementById("divEngCap").innerHTML="";var newImg=new Image();newImg.src=strMessage;var imgWidth=newImg.width;var imgHeight=newImg.height;}
document.getElementById("frmBack").style.display="";positionIFrame(id);}
function HideLogin(id)
{document.getElementById("divLogin").style.display="none";if(document.getElementById(id))
{document.getElementById(id).innerHTML="";document.getElementById(id).style.backgroundColor="#ffffff";document.getElementById(id).style.display="none";}
document.getElementById("frmBack").style.display="none";if(id.indexOf("EnlargeImage")!=-1&&document.getElementById("imgEnlargeImage"))
document.getElementById("imgEnlargeImage").src="";}
function positionIFrame(divid)
{var div=document.getElementById(divid);var frm=document.getElementById("frmBack");frm.style.left=div.style.left;frm.style.top=div.style.top;frm.style.height=div.offsetHeight;frm.style.width=div.offsetWidth;if(frm.style.height=="")
{if(frm.contentDocument)
{frm.contentDocument.height=div.offsetHeight;}
else
{frm.contentWindow.document.body.scrollHeight=div.offsetHeight;}}}
var dropdowncontent={disableanchorlink:false,hidedivmouseout:[true,1500],ajaxloadingmsg:"Loading content. Please wait...",ajaxbustcache:true,getposOffset:function(what,offsettype)
{return(what.offsetParent)?what[offsettype]+this.getposOffset(what.offsetParent,offsettype):what[offsettype]},isContained:function(m,e)
{var e=window.event||e
var c=e.relatedTarget||((e.type=="mouseover")?e.fromElement:e.toElement)
while(c&&c!=m)try{c=c.parentNode}catch(e){c=m}
if(c==m)
return true
else
return false},elewidth:function(Ele)
{return Ele.offsetWidth},eleheight:function(Ele)
{return Ele.offsetHeight},fixE:function(e)
{if(typeof e=='undefined')e=window.event;if(typeof e.layerX=='undefined')e.layerX=e.offsetX;if(typeof e.layerY=='undefined')e.layerY=e.offsetY;return e;},getMouse:function(e)
{var psmx=0;var psmy=0;var ev=(!e)?window.event:e;if(ev.pageX)
{psmx=ev.pageX+window.pageXOffset;psmy=ev.pageY+window.pageYOffset;}
else if(ev.clientX)
{psmx=ev.clientX+document.body.scrollLeft;psmy=ev.clientY+document.body.scrollTop;}
return psmx;},parentleft:function(Ele,evt)
{var pleft;if(typeof(Ele.offsetParent)!='undefined')
{for(var posX=0;Ele;Ele=Ele.offsetParent)
{posX+=Ele.offsetLeft;}
pleft=posX;}
else
{pleft=Ele.x;}
return pleft;},parenttop:function(Ele)
{var ptop;if(typeof(Ele.offsetParent)!='undefined')
{for(var posY=0;Ele;Ele=Ele.offsetParent)
{posY+=Ele.offsetTop;}
ptop=posY}
else
{ptop=Ele.y}
return ptop;},removeattach:function(id,setval)
{document.getElementById(id).innerHTML=setval;},show:function(anchorobj,subobj,e)
{if(!this.isContained(anchorobj,e)||(e&&e.type=="click"))
{var e=window.event||e
if(e.type=="click"&&subobj.style.visibility=="visible")
{subobj.style.visibility="hidden"
return}
var horizontaloffset,verticaloffset
horizontaloffset=parseInt(dropdowncontent.parentleft(anchorobj))
anchorobj.onmousemove=function(e)
{var apmx;apmx=dropdowncontent.getMouse(e)
var diff=parseInt(apmx)-parseInt(horizontaloffset)
if(diff<0)
diff=-diff;if(diff>85)
horizontaloffset=apmx;subobj.style.left=horizontaloffset+"px"}
verticaloffset=parseInt(dropdowncontent.parenttop(anchorobj))-(parseInt(10)+parseInt(dropdowncontent.eleheight(anchorobj)));if(subobj.yOffSet!=0)
verticaloffset=subobj.yOffSet;setTimeout(function(){subobj.style.top=verticaloffset+"px"
subobj.style.clip=(subobj.dropposition[1]=="top")?"rect(auto auto auto 0)":"rect(0 auto 0 0)"
subobj.style.visibility="visible"},2000)}},curveincrement:function(percent)
{return(1-Math.cos(percent*Math.PI))/2},slideengine:function(obj,direction)
{var elapsed=new Date().getTime()-obj.startTime
if(elapsed<obj.glidetime)
{var distancepercent=(direction=="down")?this.curveincrement(elapsed/obj.glidetime):1-this.curveincrement(elapsed/obj.glidetime)
var currentclip=(distancepercent*obj.contentheight)+"px"
obj.style.clip=(direction=="down")?"rect(0 auto "+currentclip+" 0)":"rect("+currentclip+" auto auto 0)"
window["glidetimer_"+obj.id]=setTimeout(function(){dropdowncontent.slideengine(obj,direction)},10)}
else
{obj.style.clip="rect(0 auto auto 0)"}},hide:function(activeobj,subobj,e)
{if(!dropdowncontent.isContained(activeobj,e))
{window["hidetimer_"+subobj.id]=setTimeout(function()
{subobj.innerHTML="";subobj.style.visibility="hidden"
subobj.style.left=subobj.style.top=0
clearTimeout(window["glidetimer_"+subobj.id])},dropdowncontent.hidedivmouseout[1])}},hidediv:function(subobjid)
{document.getElementById(subobjid).style.visibility="hidden"},showProjectTab:function(tabval,divid)
{var PID=document.getElementById("ctl00_ContentPlaceHolder1_HiddenPID").value;var subobjsource=document.getElementById(tabval).getAttribute("rev")+"?PID="+PID+"&ProjectTab="+tabval;dropdowncontent.ajaxconnect(subobjsource,divid)},showCommProjectTab:function(tabval,divid)
{var PID=document.getElementById("ctl00_ContentPlaceHolder1_HiddenPID").value;var subobjsource=document.getElementById(tabval).getAttribute("rev")+"?ProjCat=Commercial&PID="+PID+"&ProjectTab="+tabval;dropdowncontent.ajaxconnect(subobjsource,divid)},ajaxconnect:function(pageurl,divId)
{var RefineSearch;if(document.getElementById("tabRSDivM"))
{var RefineCond="";if(pageurl.indexOf("bm.Status=1")!=-1)
{RefineCond=pageurl.substr(pageurl.indexOf("bm.Status=1")+11);if(RefineCond.indexOf("cm.CityId=")!=-1)
{RefineCond=RefineCond.substr(RefineCond.indexOf("cm.CityId=")+10);RefineCond=RefineCond.substr(RefineCond.indexOf(" "));}}
RefineSearch=document.getElementById("tabRSDivM").innerHTML;if(RefineCond!="")
{if(RefineSearch.indexOf("Keyword Search")!=-1)
setEnqCookie("UniProRefineSearch",RefineCond,1);}}
var page_request=false
var bustcacheparameter=""
if(window.XMLHttpRequest)
page_request=new XMLHttpRequest()
else if(window.ActiveXObject)
{try
{page_request=new ActiveXObject("Msxml2.XMLHTTP")}
catch(e)
{try
{page_request=new ActiveXObject("Microsoft.XMLHTTP")}
catch(e){}}}
else
return false
if(divId!="divDisMessage")
{if(divId.indexOf("|")!=-1)
document.getElementById(divId.split('|')[divId.split('|').length-1]).innerHTML=this.ajaxloadingmsg
else
{if(document.getElementById(divId))
document.getElementById(divId).innerHTML=this.ajaxloadingmsg}}
page_request.onreadystatechange=function()
{dropdowncontent.loadpage(page_request,divId)}
if(this.ajaxbustcache)
bustcacheparameter=(pageurl.indexOf("?")!=-1)?"&"+new Date().getTime():"?"+new Date().getTime()
page_request.open('GET',pageurl+bustcacheparameter,true)
page_request.send(null)},loadpage:function(page_request,divId)
{if(page_request.readyState==4&&(page_request.status==200))
{var strText=page_request.responseText;if(divId.indexOf("|")!=-1&&strText.indexOf("~")!=-1)
{for(i=0;i<divId.split('|').length;i++)
{if(document.getElementById(divId.split('|')[i]))
{document.getElementById(divId.split('|')[i]).innerHTML=strText.split('~')[i]
if(strText.split('~')[i]==""&&i<2&&document.getElementById("ctl00_ContentPlaceHolder1_tdPaging"+(i+1)))
document.getElementById("ctl00_ContentPlaceHolder1_tdPaging"+(i+1)).style.display="none";else if(strText.split('~')[i]!=""&&i<2&&document.getElementById("ctl00_ContentPlaceHolder1_tdPaging"+(i+1)))
document.getElementById("ctl00_ContentPlaceHolder1_tdPaging"+(i+1)).style.display="";}}}
else
{if(document.getElementById(divId))
{document.getElementById(divId).style.visibility="visible"
document.getElementById(divId).innerHTML=strText;}}
if(page_request.responseText==""&&document.getElementById(divId))
{document.getElementById(divId).innerHTML="";document.getElementById(divId).style.visibility="hidden"}}},showLRimages:function(id1,id2)
{if(document.getElementById(id1))
document.getElementById(id1).style.display="";if(document.getElementById(id2))
document.getElementById(id2).style.display="";},hideLRimages:function(id1,id2)
{if(document.getElementById(id1))
document.getElementById(id1).style.display="none";if(document.getElementById(id2))
document.getElementById(id2).style.display="none";},showBuilderProjects:function(id,totpages,divId)
{var val=document.getElementById(id).value
var url=document.getElementById("ctl00_ContentPlaceHolder1_linkDrop1").getAttribute("rev")
if(val!=""&&parseInt(val)>0&&parseInt(val)<=parseInt(totpages))
{url=url.replace("Paging=True","PageNo="+parseInt(val));dropdowncontent.ajaxconnect(url,divId)}
else
alert("Please enter proper value");dropdowncontent.hidediv("divDisGo");},showAfter:function(anchorid,subobj,e)
{setTimeout(dropdowncontent.show(anchorid,subobj,e),2000)},init:function(anchorid,pos,glidetime,revealbehavior,yOffSet)
{var anchorobj=document.getElementById(anchorid)
var subobj=document.getElementById("divDisMessage")
var subobjsource=anchorobj.getAttribute("rev")
subobj.dropposition=pos.split("-")
subobj.glidetime=glidetime||1000
subobj.style.left=subobj.style.top=0
subobj.yOffSet=yOffSet;if(typeof revealbehavior=="undefined"||revealbehavior=="mouseover")
{anchorobj.onmouseover=function(e)
{dropdowncontent.show(this,subobj,e)
dropdowncontent.ajaxconnect(subobjsource,"divDisMessage")}
if(this.disableanchorlink)anchorobj.onclick=function()
{return false}}},initOnClick:function(anchorid,pos,glidetime,revealbehavior,yOffSet)
{var anchorobj=document.getElementById(anchorid)
var subobj=document.getElementById("divDisGo")
var subobjsource=anchorobj.getAttribute("rev")
subobj.dropposition=pos.split("-")
subobj.glidetime=glidetime||1000
subobj.style.left=subobj.style.top=0
subobj.yOffSet=yOffSet;anchorobj.onclick=function(e)
{dropdowncontent.show(this,subobj,e);dropdowncontent.ajaxconnect(subobjsource,"divDisGo")
return false}}}
function HideOnMouseOut(id)
{clearTimeout(timerShow)
timerHide=setTimeout("HideOnMouseDisDiv('"+id+"')",500)}
function ShowOnMouseOver(id,Ele){var divYPos=eval(dropdowncontent.parenttop(Ele))+36;clearTimeout(timerShow)
clearTimeout(timerHide)
document.getElementById("divDisMessage").style.display="none";anchorobj=document.getElementById(id)
var horizontaloffset,verticaloffset
horizontaloffset=parseInt(dropdowncontent.parentleft(anchorobj))
anchorobj.onmouseout=function(e)
{HideOnMouseOut('divDisMessage');}
anchorobj.onmousemove=function(e)
{var apmx;apmx=dropdowncontent.getMouse(e)
var diff=parseInt(apmx)-parseInt(horizontaloffset)
if(eval(diff)<0)
{horizontaloffset=apmx;timerShow=setTimeout("ShowOnMouseOverData('"+id+"','"+divYPos+"','"+horizontaloffset+"')",1500)}}
timerShow=setTimeout("ShowOnMouseOverData('"+id+"','"+divYPos+"','"+horizontaloffset+"')",1000)}
timerShow="";timerHide="";function ShowOnMouseOverData(id,top,left)
{clearTimeout(timerHide)
timerHide=setTimeout("HideOnMouseDisDiv('divDisMessage')",5000)
clearTimeout(timerShow)
anchorobj=document.getElementById(id)
anchorobj.onmouseout=function(e)
{return}
var subobj=document.getElementById("divDisMessage")
subobj.style.display="";subobj.onmouseover=function(e)
{clearTimeout(timerHide)}
subobj.onmouseout=function(e)
{timerHide=setTimeout("HideOnMouseDisDiv('divDisMessage')",5000)}
var subobjsource=anchorobj.getAttribute("rev")
subobj.yOffSet=top
var horizontaloffset,verticaloffset
horizontaloffset=eval($('#'+id).offset().left)
subobj.style.left=horizontaloffset+"px"
verticaloffset=parseInt(dropdowncontent.parenttop(anchorobj))-(parseInt(10)+parseInt(dropdowncontent.eleheight(anchorobj)));if(subobj.yOffSet!=0)
verticaloffset=subobj.yOffSet;subobj.style.top=verticaloffset+"px"
dropdowncontent.ajaxconnect(subobjsource,"divDisMessage")}
function HideOnMouseDisDiv(id)
{clearTimeout(timerShow)
clearTimeout(timerHide)
document.getElementById(id).innerHTML="";document.getElementById(id).style.display="none";document.getElementById(id).style.left="0px";}
function SetExistingPostData()
{if(document.getElementById("txtPostName"))
document.getElementById("txtPostName").value=getEnqCookie("UniconEnqPostName");if(document.getElementById("txtPostEmail"))
document.getElementById("txtPostEmail").value=getEnqCookie("UniconEnqPostEmail");if(document.getElementById("txtPostPhone"))
document.getElementById("txtPostPhone").value=getEnqCookie("UniconEnqPostPhone");if(document.getElementById("txtPostCity"))
document.getElementById("txtPostCity").value=getEnqCookie("UniconEnqPostCity");if(document.getElementById("ctl00_ContentPlaceHolder1_PostYourRequirement1_txtPostName"))
document.getElementById("ctl00_ContentPlaceHolder1_PostYourRequirement1_txtPostName").value=getEnqCookie("UniconEnqPostName");if(document.getElementById("ctl00_ContentPlaceHolder1_PostYourRequirement1_txtPostEmail"))
document.getElementById("ctl00_ContentPlaceHolder1_PostYourRequirement1_txtPostEmail").value=getEnqCookie("UniconEnqPostEmail");if(document.getElementById("ctl00_ContentPlaceHolder1_PostYourRequirement1_txtPostPhone"))
document.getElementById("ctl00_ContentPlaceHolder1_PostYourRequirement1_txtPostPhone").value=getEnqCookie("UniconEnqPostPhone");if(document.getElementById("ctl00_ContentPlaceHolder1_PostYourRequirement1_txtCity"))
document.getElementById("ctl00_ContentPlaceHolder1_PostYourRequirement1_txtCity").value=getEnqCookie("UniconEnqPostCity");if(document.getElementById("ctl00_ContentPlaceHolder1_PostYourRequirement1_HiddenPostThanks")&&document.getElementById("ctl00_ContentPlaceHolder1_PostYourRequirement1_HiddenPostThanks").value!="")
{alert(document.getElementById("ctl00_ContentPlaceHolder1_PostYourRequirement1_HiddenPostThanks").value);document.getElementById("ctl00_ContentPlaceHolder1_PostYourRequirement1_HiddenPostThanks").value="";}}
function setEnqCookie(c_name,value,expiredays)
{var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);document.cookie=c_name+"="+escape(value)+
((expiredays==null)?"":";expires="+exdate.toGMTString());}
function getEnqCookie(c_name)
{if(document.cookie.length>0)
{c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1)
{c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}
return"";}
function deleteEnqCookie(name){if(getEnqCookie(name))document.cookie=name+"="+";expires=Tue, 30-Mar-1982 00:00:01 GMT";}
function ValidateLeadEnquiryForm(DomainPath,PropertyCategroy,Category,ID,PageType)
{var txtPostName=document.getElementById("txtPostName");var txtPostEmail=document.getElementById("txtPostEmail");var txtPostPhone=document.getElementById("txtPostPhone");var txtPostCity=document.getElementById("txtPostCity");var txtPostQuery=document.getElementById("txtPostQuery");var chkHomeLoan=document.getElementById("chkHomeLoan");var chkLeadEmail=document.getElementById("chkLeadEmail");var chkLeadSMS=document.getElementById("chkLeadSMS");if(txtPostName&&Trim(txtPostName.value)=="")
return AlertMsg(txtPostName,"enter Name");else if(!CheckCOCharacter(txtPostName))
return AlertMsg(txtPostName,"enter alphabets only");else if(txtPostEmail&&Trim(txtPostEmail.value)=="")
return AlertMsg(txtPostEmail,"enter E-mail");else if(!Homeecheck(txtPostEmail.value))
{txtPostEmail.select();return false;}
else if(txtPostPhone&&Trim(txtPostPhone.value)=="")
return AlertMsg(txtPostPhone,"enter Phone");else if(!CheckNumValidate(txtPostPhone))
return AlertMsg(txtPostPhone,"enter number only");else if(txtPostCity&&Trim(txtPostCity.value)=="")
return AlertMsg(txtPostCity,"enter City");else if(!CheckCOCharacter(txtPostCity))
return AlertMsg(txtPostCity,"enter alphabets only");else
{SaveLeadEnquiryForm(DomainPath,PropertyCategroy,Category,ID,PageType);return false;}}
function SaveLeadEnquiryForm(DomainPath,PropertyCategroy,Category,ID,PageType)
{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
var txtPostName=Trim(document.getElementById("txtPostName").value);var txtPostEmail=Trim(document.getElementById("txtPostEmail").value);var txtPostPhone=Trim(document.getElementById("txtPostPhone").value);var txtPostCity=Trim(document.getElementById("txtPostCity").value);var txtPostQuery=Trim(document.getElementById("txtPostQuery").value);var chkHomeLoan=document.getElementById("chkHomeLoan").checked==true?"1":"0";var chkLeadEmail=document.getElementById("chkLeadEmail").checked==true?"1":"0";var chkLeadSMS=document.getElementById("chkLeadSMS").checked==true?"1":"0";var questmarkindex=txtPostQuery.split('?').length-1;var ampmarkindex=txtPostQuery.split('&').length-1;for(i=0;i<questmarkindex;i++)
txtPostQuery=txtPostQuery.replace("?",".");for(i=0;i<ampmarkindex;i++)
txtPostQuery=txtPostQuery.replace("&","n");var questmarkindex=txtPostCity.split('?').length-1;var ampmarkindex=txtPostCity.split('&').length-1;for(i=0;i<questmarkindex;i++)
txtPostCity=txtPostCity.replace("?",".");for(i=0;i<ampmarkindex;i++)
txtPostCity=txtPostCity.replace("&","n");var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?LeadEnqRPID="+ID+"&LeadEnqName="+txtPostName+"&LeadEnqEmail="+txtPostEmail+"&LeadEnqPhone="+txtPostPhone+"&LeadEnqCity="+txtPostCity+"&LeadEnqQuery="+txtPostQuery+"&LeadEnqLoan="+chkHomeLoan+"&LeadEnqEmailAlert="+chkLeadEmail+"&LeadEnqSMSAlert="+chkLeadSMS+"&LeadPropertyCategory="+PropertyCategroy+"&LeadCategory="+Category+"&LeadPageType="+PageType;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{if(strdata.split("~")[1]=="")
{setEnqCookie("UniconEnqPostName",Trim(document.getElementById("txtPostName").value),365);setEnqCookie("UniconEnqPostEmail",Trim(document.getElementById("txtPostEmail").value),365);setEnqCookie("UniconEnqPostPhone",Trim(document.getElementById("txtPostPhone").value),365);setEnqCookie("UniconEnqPostCity",Trim(document.getElementById("txtPostCity").value),365);}
document.getElementById("txtPostQuery").value="";document.getElementById("chkHomeLoan").checked=true;pageTracker._trackPageview("/EnquiryForm.html");var strGoogle="";if(strdata.split("~")[1]=="")
{SetExistingPostData();strGoogle+="<iframe src=\"EnquiryForm.html\" border='0' style='display:none;'></iframe>";var sessionId=strdata.split("~")[2];var storedSession=getEnqCookie("UniconSokSes");var sokLeadDetails=strdata.split("~")[3];if(storedSession!=sessionId)
{setEnqCookie("UniconSokSes",sessionId,1);var paramList={};paramList['leads'] = '1';var PageUrl=window.location.href;PageUrl=PageUrl.split("/")[PageUrl.split("/").length-1];var sokType="";var sokCity="";var sokLoc="";var sokBuilder="";var sokProject="";var sokSource="";var sokItemId="";var sokSplitVal=PageUrl.split("-");if(Category==""&&(sokSplitVal.length==1||(sokSplitVal.length==2&&PageUrl.toLowerCase().indexOf("commercial-projects.html")!=-1)))
{sokItemId=PageUrl!=""?PageUrl:"Default.aspx";sokType=sokSplitVal.length==1?"Residential":"Commercial";/*paramList['project_type']=sokType;paramList['project_detail']=sokProject;paramList['builder_detail']=sokBuilder;paramList['city']=sokCity;paramList['source']=sokSource;paramList['page_type']=sokItemId;*/}
if(Category=="New")
{if(sokSplitVal.length==1)
{/*sokItemId=PageUrl!=""?PageUrl:"Default.aspx";paramList['project_type']=sokType;paramList['project_detail']=sokProject;paramList['builder_detail']=sokBuilder;paramList['city']=sokCity;paramList['source']=sokSource;paramList['page_type']=sokItemId;*/}
else if(sokSplitVal.length==2)
{if(PageUrl.toLowerCase().indexOf("projects")==-1&&(PageUrl.toLowerCase().indexOf("residential")!=-1||PageUrl.toLowerCase().indexOf("commercial")!=-1))
{/*paramList['project_type']=sokLeadDetails.split("$")[0];paramList['project_detail']=sokLeadDetails.split("$").length>1?sokLeadDetails.split("$")[1]:"";paramList['builder_detail']=sokLeadDetails.split("$").length>2?sokLeadDetails.split("$")[2]:"";paramList['city']=sokLeadDetails.split("$").length>4?sokLeadDetails.split("$")[4]:"";paramList['source']=sokLeadDetails.split("$").length>5?sokLeadDetails.split("$")[5]:"";paramList['page_type']='City Projects';*/}
else if(PageUrl.toLowerCase().indexOf("projects")!=-1&&(PageUrl.toLowerCase().indexOf("residential")!=-1||PageUrl.toLowerCase().indexOf("commercial")!=-1))
{/*paramList['project_type']=sokLeadDetails.split("$")[0];paramList['project_detail']=sokLeadDetails.split("$").length>1?sokLeadDetails.split("$")[1]:"";paramList['builder_detail']=sokLeadDetails.split("$").length>2?sokLeadDetails.split("$")[2]:"";paramList['city']=sokLeadDetails.split("$").length>4?sokLeadDetails.split("$")[4]:"";paramList['source']=sokLeadDetails.split("$").length>5?sokLeadDetails.split("$")[5]:"";paramList['page_type']=sokLeadDetails.split("$")[0];+' Projects';*/}
else if(PageUrl.toLowerCase().indexOf("residential")==-1&&PageUrl.toLowerCase().indexOf("commercial")==-1)
{/*paramList['project_type']=sokLeadDetails.split("$")[0];paramList['project_detail']=sokLeadDetails.split("$").length>1?sokLeadDetails.split("$")[1]:"";paramList['builder_detail']=sokLeadDetails.split("$").length>2?sokLeadDetails.split("$")[2]:"";paramList['city']=sokLeadDetails.split("$").length>4?sokLeadDetails.split("$")[4]:"";paramList['source']=sokLeadDetails.split("$").length>5?sokLeadDetails.split("$")[5]:"";paramList['page_type']='Builder Details';*/}}
else if(sokSplitVal.length==4)
{/*paramList['project_type']=sokLeadDetails.split("$")[0];paramList['project_detail']=sokLeadDetails.split("$").length>1?sokLeadDetails.split("$")[1]:"";paramList['builder_detail']=sokLeadDetails.split("$").length>2?sokLeadDetails.split("$")[2]:"";paramList['city']=sokLeadDetails.split("$").length>4?sokLeadDetails.split("$")[4]:"";paramList['source']=sokLeadDetails.split("$").length>5?sokLeadDetails.split("$")[5]:"";paramList['page_type']='Residential Project Details';*/}
else if(sokSplitVal.length==5)
{/*paramList['project_type']=sokLeadDetails.split("$")[0];paramList['project_detail']=sokLeadDetails.split("$").length>1?sokLeadDetails.split("$")[1]:"";paramList['builder_detail']=sokLeadDetails.split("$").length>2?sokLeadDetails.split("$")[2]:"";paramList['city']=sokLeadDetails.split("$").length>4?sokLeadDetails.split("$")[4]:"";paramList['source']=sokLeadDetails.split("$").length>5?sokLeadDetails.split("$")[5]:"";paramList['page_type']='Commercial Project Details';*/}}
else
{/*paramList['property_ID']=ID;paramList['project_type']=sokLeadDetails.split("$")[0];paramList['project_detail']=sokLeadDetails.split("$").length>1?sokLeadDetails.split("$")[1]:"";paramList['locality']=sokLeadDetails.split("$").length>3?sokLeadDetails.split("$")[3]:"";paramList['city']=sokLeadDetails.split("$").length>4?sokLeadDetails.split("$")[4]:"";paramList['source']=sokLeadDetails.split("$").length>5?sokLeadDetails.split("$")[5]:"";paramList['page_type']='city';*/}
{try{sokrati.trackParams('link','1',paramList);}
catch(err){}}}
if(document.getElementById("GoogleLead"))
document.getElementById("GoogleLead").value="True";}
if(document.getElementById("trEnqForm"))
document.getElementById("trEnqForm").style.display="none";if(document.getElementById("tdPostData")&&document.getElementById("trPostData"))
{document.getElementById("trPostData").style.display="";document.getElementById("tdPostData").innerHTML=strdata.split("~")[0]+strGoogle;
document.getElementById("divEnquiry").style.display="none";
var thanksmsg=strdata.split("~")[0]+strGoogle;ShowModelWindow("divEnquiry","PostReqThanksMessage",ID,thanksmsg);
}
else
{var thanksmsg="<div style='float:left; width:100%;border-bottom: solid 1px #00a637; display:none;'><div style=\"float:left;\" class='HeadP1'>Thanks</div><div style=\"float:right;\"><img src=\""+DomainPath+"Images/Cancel.png\" alt=\"\" style=\"cursor: pointer;\" title=\"Close Window\" onclick=\"HideLogin('divEnquiry');\"></div></div><br/>";thanksmsg+=strdata.split("~")[0]+strGoogle;ShowModelWindow("divEnquiry","PostReqThanksMessage",ID,thanksmsg);}}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function SaveEnquiryNowThanks()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{if(strdata.split("~")[1]=="")
{setEnqCookie("UniconEnqPostName",document.getElementById("txtPostName").value,365);setEnqCookie("UniconEnqPostEmail",document.getElementById("txtPostEmail").value,365);setEnqCookie("UniconEnqPostPhone",document.getElementById("txtPostPhone").value,365);setEnqCookie("UniconEnqPostCity",document.getElementById("txtPostCity").value,365);}
document.getElementById("txtPostQuery").value="";document.getElementById("chkHomeLoan").checked=true;pageTracker._trackPageview("/EnquiryForm.html");var strGoogle="";if(strdata.split("~")[1]=="")
{SetExistingPostData();strGoogle+="<iframe src=\"EnquiryForm.html\" border='0' style='display:none;'></iframe>";var sessionId=strdata.split("~")[2];var storedSession=getEnqCookie("UniconSokSes");if(storedSession!=sessionId)
{setEnqCookie("UniconSokSes",sessionId,1);var paramList={};paramList['leads'] = '1';var PageUrl=window.location.href;PageUrl=PageUrl.split("/")[PageUrl.split("/").length-1];var sokType="";var sokCity="";var sokLoc="";var sokBuilder="";var sokProject="";var sokItemId="";var sokSplitVal=PageUrl.split("-");if(sokSplitVal.length==1)
{sokItemId=PageUrl!=""?PageUrl:"Default.aspx";/*paramList['project_type']=sokType;paramList['project_detail']=sokProject;paramList['builder_detail']=sokBuilder;paramList['city']=sokCity;paramList['page_type']=sokItemId;*/}
else if(sokSplitVal.length==2)
{if(PageUrl.toLowerCase().indexOf("projects")==-1&&(PageUrl.toLowerCase().indexOf("residential")!=-1||PageUrl.toLowerCase().indexOf("commercial")!=-1))
{sokType=sokSplitVal[0];sokCity=(sokSplitVal[1]).split(".")[0];sokItemId=sokType+" "+sokCity;/*paramList['project_type']=sokType;paramList['project_detail']=sokProject;paramList['builder_detail']=sokBuilder;paramList['city']=sokCity;paramList['page_type']='City Projects';*/}
else if(PageUrl.toLowerCase().indexOf("projects")!=-1&&(PageUrl.toLowerCase().indexOf("residential")!=-1||PageUrl.toLowerCase().indexOf("commercial")!=-1))
{sokType=sokSplitVal[0];sokItemId=sokType;/*paramList['project_type']=sokType;paramList['project_detail']=sokProject;paramList['builder_detail']=sokBuilder;paramList['city']=sokCity;paramList['page_type']=sokType+' Projects';*/}
else if(PageUrl.toLowerCase().indexOf("residential")==-1&&PageUrl.toLowerCase().indexOf("commercial")==-1)
{sokBuilder=(sokSplitVal[1]).split(".")[0];sokItemId=sokBuilder;/*paramList['project_type']=sokType;paramList['project_detail']=sokProject;paramList['builder_detail']=sokBuilder;paramList['city']=sokCity;paramList['page_type']='Builder Details';*/}}
else if(sokSplitVal.length==4)
{sokType="Residential";sokCity=sokSplitVal[0];sokLoc=sokSplitVal[1];sokBuilder=sokSplitVal[2];sokProject=(sokSplitVal[3]).split(".")[0];sokItemId=sokType+" "+sokBuilder+" "+sokProject+" "+sokLoc+" "+sokCity;/*paramList['project_type']=sokType;paramList['project_detail']=sokProject;paramList['builder_detail']=sokBuilder;paramList['city']=sokCity;paramList['page_type']='Residential Project Details';*/}
else if(sokSplitVal.length==5)
{sokType="Commercial";sokCity=sokSplitVal[1];sokLoc=sokSplitVal[2];sokBuilder=sokSplitVal[3];sokProject=(sokSplitVal[4]).split(".")[0];sokItemId=sokType+" "+sokBuilder+" "+sokProject+" "+sokLoc+" "+sokCity;/*paramList['project_type']=sokType;paramList['project_detail']=sokProject;paramList['builder_detail']=sokBuilder;paramList['city']=sokCity;paramList['page_type']='Commercial Project Details';*/}
if(sokItemId!="")
{try{sokrati.trackParams('link','1',paramList);}
catch(err){}}}
if(document.getElementById("GoogleLead"))
document.getElementById("GoogleLead").value="True";}
if(document.getElementById("trEnqForm"))
document.getElementById("trEnqForm").style.display="none";if(document.getElementById("tdPostData"))
document.getElementById("tdPostData").innerHTML=strdata.split("~")[0]+strGoogle;}}}
function Trim(str)
{while(str.substring(0,1)==' ')
{str=str.substring(1,str.length);}
while(str.substring(str.length-1,str.length)==' ')
{str=str.substring(0,str.length-1);}
return str;}
function HomeValidateEmail(Ele,val)
{if(Ele.value==""||Ele.value.toLowerCase()==val.toLowerCase())
{if(document.getElementById("ctl00_ContentPlaceHolder1_txtEmail"))
{document.getElementById("ctl00_ContentPlaceHolder1_txtEmail").value=val;document.getElementById("ctl00_ContentPlaceHolder1_txtEmail").className="TextCss";}
if(document.getElementById("ctl00_ContentPlaceHolder1_txtEmail1"))
document.getElementById("ctl00_ContentPlaceHolder1_txtEmail1").value="";}
else if(Ele.value!=""&&Ele.value!=val)
{if(!Homeecheck(Ele.value))
{Ele.focus();Ele.select();}
else
{if(document.getElementById("ctl00_ContentPlaceHolder1_txtEmail"))
{document.getElementById("ctl00_ContentPlaceHolder1_txtEmail").value=Ele.value;document.getElementById("ctl00_ContentPlaceHolder1_txtEmail").className="Text";}
if(document.getElementById("ctl00_ContentPlaceHolder1_txtEmail1"))
document.getElementById("ctl00_ContentPlaceHolder1_txtEmail1").value=Ele.value;}}}
function Homeecheck(str)
{var at="@";var dot=".";var lat=str.indexOf(at);var lstr=str.length;var ldot=str.indexOf(dot);if(str=="")
{return true;}
if(str.indexOf(at)==-1)
{alert("Invalid Email-Id");return false;}
if(str.indexOf(at)==-1||str.indexOf(at)==0||str.indexOf(at)==lstr)
{alert("Invalid Email-Id");return false;}
if(str.indexOf(dot)==-1||str.indexOf(dot)==0||str.indexOf(dot)==lstr)
{alert("Invalid Email-Id");return false;}
if(str.indexOf(at,(lat+1))!=-1)
{alert("Invalid Email-Id");return false;}
if(str.substring(lat-1,lat)==dot||str.substring(lat+1,lat+2)==dot)
{alert("Invalid Email-Id");return false;}
if(str.indexOf(dot,(lat+2))==-1)
{alert("Invalid Email-Id");return false;}
if(str.indexOf(" ")!=-1)
{alert("Invalid Email-Id");return false;}
var spCh=SpecialCharacters();for(i=0;i<spCh.length;i++)
{if(str.indexOf(spCh[i])!=-1)
{alert("Invalid Email-Id");return false;}}
if(str.indexOf("__")!=-1||str.indexOf("..")!=-1||str.indexOf("_.")!=-1||str.indexOf("._")!=-1||str.indexOf("@_")!=-1||str.indexOf("_@")!=-1||str.indexOf("@.")!=-1||str.indexOf(".@")!=-1||str.indexOf("_")==0)
{alert("Invalid Email-Id");return false;}
return true;}
function SpecialCharacters()
{var spCh=new Array("~","!","#","$","%","^","&","*","(",")","-","+","=","`",";",":","\"","'",",","/","<",">","?","[","]","\\","{","}","|");return spCh;}
function HomeNumOnly(_char,_mozChar)
{if(_mozChar!=null)
{if((_mozChar>=48&&_mozChar<=57)||_mozChar==8||_mozChar==9||_mozChar==45||_mozChar==0)_RetVal=true;else
{_RetVal=false;}}
else
{if((_char>=48&&_char<=57)||_char==45)_RetVal=true;else
{_RetVal=false;}}
return _RetVal;}
function ChangesMainTabOver()
{document.getElementById("linkTab").className="tabMDivO";document.getElementById("tabDivL").className="TabLDivO";document.getElementById("tabDivM").className="TabMDivO";document.getElementById("tabDivR").className="TabRDivO";}
function ChangesMainTabOut()
{document.getElementById("linkTab").className="tabMDivN";document.getElementById("tabDivL").className="TabLDivN";document.getElementById("tabDivM").className="TabMDivN";document.getElementById("tabDivR").className="TabRDivN";}
function ChangesPartnerTabOver(id)
{document.getElementById("linkTab"+id).className="tabPartMDivO";document.getElementById("tabDiv"+id+"L").className="TabPartLDivO";document.getElementById("tabDiv"+id+"M").className="TabPartMDivO";document.getElementById("tabDiv"+id+"R").className="TabPartRDivO";}
function ChangesPartnerTabOut(id)
{document.getElementById("linkTab"+id).className="tabPartMDivN";document.getElementById("tabDiv"+id+"L").className="TabPartLDivN";document.getElementById("tabDiv"+id+"M").className="TabPartMDivN";document.getElementById("tabDiv"+id+"R").className="TabPartRDivN";}
function ChangesRefineSearchTabOver()
{document.getElementById("linkRSTab").className="tabRSMDivO";document.getElementById("tabRSDivL").className="TabRSLDiv";document.getElementById("tabRSDivM").className="TabRSMDiv";document.getElementById("tabRSDivR").className="TabRSRDiv";}
function ChangesRefineSearchTabOut()
{document.getElementById("linkRSTab").className="tabRSMDivN";document.getElementById("tabRSDivL").className="TabRSLDivN";document.getElementById("tabRSDivM").className="TabRSMDivN";document.getElementById("tabRSDivR").className="TabRSRDivN";}
function ShowHideRefineKeyword(showid,hideid)
{if(document.getElementById("tr"+hideid))
document.getElementById("tr"+hideid).style.display="none";if(document.getElementById("tr"+showid))
document.getElementById("tr"+showid).style.display="";if(document.getElementById("td"+showid))
{document.getElementById("td"+showid).style.backgroundColor="#ffffff"
document.getElementById("td"+showid).style.color="#00a539"
document.getElementById("td"+showid).style.cursor="default";}
if(document.getElementById("td"+hideid))
{document.getElementById("td"+hideid).style.backgroundColor="#00a539"
document.getElementById("td"+hideid).style.color="#ffffff"
document.getElementById("td"+hideid).style.cursor="pointer";}
dropdowncontent.ajaxconnect("MasterPages/UniProAjax.aspx?"+showid+"Search=True","tdRefineSearchTab");if(document.getElementById("tr"+showid+"Search"))
document.getElementById("tr"+showid+"Search").style.display="";if(document.getElementById("tr"+hideid+"Search"))
document.getElementById("tr"+hideid+"Search").style.display="none";}
function RefineCitySearch(load)
{deleteEnqCookie("UniProRefineSearch");deleteEnqCookie("UniProKeySearch");if(load!="")
ShowRefineCitySearch();}
function ShowRefineCitySearch()
{var LocId="";var Bedrooms="";var Bedrooms1="";var MinBdgt="";var MaxBdgt="";var Cond1="";var PropertyCategory="";var CityId="";var HiddenLocId="";var SearchShowLocations="";var SearchShowBedrooms="";var strShowBdgt="";var TypeId=""
var PropertyType=""
var SearchShowTypes="";for(i=1;i<50;i++)
{if(document.getElementById("chkSearchLoc"+i))
{if(document.getElementById("chkSearchLoc"+i).checked)
if(LocId=="")
{LocId+=document.getElementById("chkSearchLoc"+i).value;SearchShowLocations+=document.getElementById("chkSearchLoc"+i).name}
else
{LocId+=","+document.getElementById("chkSearchLoc"+i).value;SearchShowLocations+=", "+document.getElementById("chkSearchLoc"+i).name}}
else
break;}
if(LocId!="")
LocId=" and lm.LocId in ("+LocId+") ";for(j=1;j<20;j++)
{if(document.getElementById("chkSearchType"+j))
{if(document.getElementById("chkSearchType"+j).checked)
if(TypeId=="")
{TypeId+=document.getElementById("chkSearchType"+j).value;SearchShowTypes+=document.getElementById("chkSearchType"+j).name}
else
{TypeId+=","+document.getElementById("chkSearchType"+j).value;SearchShowTypes+=", "+document.getElementById("chkSearchType"+j).name}}
else
break;}
if(TypeId!="")
{PropertyType=" and (";for(p=0;p<TypeId.split(",").length;p++)
{if(p==TypeId.split(",").length-1)
{PropertyType+=" PropertyType like ^%|"+TypeId.split(",")[p]+"|%^ ";}
else
{PropertyType+=" PropertyType like ^%|"+TypeId.split(",")[p]+"|%^  or ";}}
PropertyType+=")";}
for(i=1;i<10;i++)
{if(document.getElementById("chkSearchBed"+i))
{if(document.getElementById("chkSearchBed"+i).checked)
if(Bedrooms=="")
{Bedrooms+=document.getElementById("chkSearchBed"+i).value;SearchShowBedrooms+=document.getElementById("chkSearchBed"+i).name}
else
{Bedrooms+=","+document.getElementById("chkSearchBed"+i).value;SearchShowBedrooms+=", "+document.getElementById("chkSearchBed"+i).name}}
else
break;}
var isBed=false;if(TypeId=="9")
{Bedrooms="";isBed=true;}
for(i=1;i<10;i++)
{if(document.getElementById("chkSearchBed"+i))
document.getElementById("chkSearchBed"+i).disabled=isBed;}
if(Bedrooms!="")
{Cond1=" bedrooms in ("+Bedrooms+") ";if(Bedrooms.indexOf("5")!=-1)
Bedrooms=" and (bedrooms in ("+Bedrooms+") or bedrooms>4) ";else
Bedrooms=" and bedrooms in ("+Bedrooms+") ";}
if(SearchShowLocations=="")
SearchShowLocations=" All";if(SearchShowTypes=="")
SearchShowTypes=" All";if(SearchShowBedrooms=="")
SearchShowBedrooms=" All";if(SearchShowLocations=="")
SearchShowLocations=" All";var ShowMinBdgt="";var ShowMaxBdgt="";if(document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMin")&&document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMin").selectedIndex!=0)
{MinBdgt=document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMin").value
ShowMinBdgt=document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMin").options[document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMin").selectedIndex].text;}
if(document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMax")&&document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMax").selectedIndex!=0)
{MaxBdgt=document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMax").value
ShowMaxBdgt=document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMax").options[document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMax").selectedIndex].text;}
if(eval(MinBdgt)>=eval(MaxBdgt))
{alert("Please select proper range");return;}
if(MinBdgt!=""&&MaxBdgt=="")
strShowBdgt="More than "+ShowMinBdgt;else if(MinBdgt==""&&MaxBdgt!="")
strShowBdgt="Less than "+ShowMaxBdgt;else if(MinBdgt!=""&&MaxBdgt!="")
strShowBdgt=ShowMinBdgt+" - "+ShowMaxBdgt;else
strShowBdgt="All";if(MinBdgt!="")
{if(Cond1!="")
Cond1+=" and price>="+MinBdgt;else
Cond1+=" price>="+MinBdgt;MinBdgt=" and minprice>="+MinBdgt;}
if(MaxBdgt!="")
{if(Cond1!="")
Cond1+=" and price<="+MaxBdgt;else
Cond1+=" price<="+MaxBdgt;MaxBdgt=" and maxprice<="+MaxBdgt;}
if(Cond1!="")
Cond1=": where "+Cond1;if(document.getElementById("ctl00_ContentPlaceHolder1_HiddenPropertyCategory")&&document.getElementById("ctl00_ContentPlaceHolder1_HiddenPropertyCategory").value!="")
PropertyCategory=document.getElementById("ctl00_ContentPlaceHolder1_HiddenPropertyCategory").value;if(document.getElementById("ctl00_ContentPlaceHolder1_HiddenCityId")&&document.getElementById("ctl00_ContentPlaceHolder1_HiddenCityId").value!="")
CityId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenCityId").value;if(document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId")&&document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId").value!="")
HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId").value;if(PropertyCategory!="")
PropertyCategory=" PropertyCategory="+PropertyCategory;else
PropertyCategory=" PropertyCategory=1";if(CityId!="")
CityId=" and cm.CityId="+CityId;if(HiddenLocId!="")
HiddenLocId=" and lm.LocId="+HiddenLocId;var Condition=LocId+" "+PropertyType+" "+Bedrooms+" "+MinBdgt+" "+MaxBdgt+" "+Cond1;var cookieCodition=getEnqCookie("UniProRefineSearch");if(LocId==""&&PropertyType==""&&Bedrooms==""&&MinBdgt==""&&MaxBdgt==""&&Cond1==""&&cookieCodition!="")
Condition=cookieCodition;deleteEnqCookie("UniProKeySearch");setEnqCookie("UniProRefineSearch",Condition,1);dropdowncontent.ajaxconnect("MasterPages/UniProAjax.aspx?Condition= where "+PropertyCategory+" and pm.Status=1 and bm.Status=1 "+CityId+" "+HiddenLocId+" "+Condition+" &PageNo=1&PageSize=6","ctl00_ContentPlaceHolder1_tdDisPaging1|ctl00_ContentPlaceHolder1_tdDisPaging2|ctl00_ContentPlaceHolder1_tdProjects");if(document.getElementById("spanShowLoc"))
document.getElementById("spanShowLoc").innerHTML=SearchShowLocations;if(document.getElementById("spanShowType"))
document.getElementById("spanShowType").innerHTML=SearchShowTypes;if(document.getElementById("spanShowBdgt"))
document.getElementById("spanShowBdgt").innerHTML=strShowBdgt;if(document.getElementById("spanShowBed"))
document.getElementById("spanShowBed").innerHTML=SearchShowBedrooms;}
function ShowKeyWordSearch()
{var KeywordSearchId="";var KeywordSearchValue="";if(document.getElementById("ctl00_ContentPlaceHolder1_KeywordSearchDropDown1_HiddenKeywordSearchId"))
KeywordSearchId=document.getElementById("ctl00_ContentPlaceHolder1_KeywordSearchDropDown1_HiddenKeywordSearchId").value;if(document.getElementById("ctl00_ContentPlaceHolder1_KeywordSearchDropDown1_txtKeywordSearch"))
KeywordSearchValue=document.getElementById("ctl00_ContentPlaceHolder1_KeywordSearchDropDown1_txtKeywordSearch").value;if(document.getElementById("ctl00_ContentPlaceHolder1_tdPaging1"))
document.getElementById("ctl00_ContentPlaceHolder1_tdPaging1").style.display="";if(document.getElementById("ctl00_ContentPlaceHolder1_tdPaging2"))
document.getElementById("ctl00_ContentPlaceHolder1_tdPaging2").style.display="";if(KeywordSearchId!="")
{xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
var url="MasterPages/UniProAjax.aspx?KeywordSearchId="+KeywordSearchId+"&KeywordSearchValue="+KeywordSearchValue;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{if(document.getElementById("HiddenKeySearch"))
document.getElementById("HiddenKeySearch").value=strdata;ShowKeyWordSearchResult();}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
else if(getEnqCookie("UniProKeySearch")!="")
{ShowKeyWordSearchResult();}
else
{if(document.getElementById("ctl00_ContentPlaceHolder1_tdKeywordSearchResults"))
document.getElementById("ctl00_ContentPlaceHolder1_tdKeywordSearchResults").innerHTML="Showing results for: <span style='padding-left:15px; color:#00a539; font-size:12px; font-weight:bold;'>No results found. Try modifying your search query or call us at 09999 56 1111.</span>";if(document.getElementById("ctl00_ContentPlaceHolder1_tdProjects"))
document.getElementById("ctl00_ContentPlaceHolder1_tdProjects").innerHTML="";if(document.getElementById("ctl00_ContentPlaceHolder1_tdPaging1"))
document.getElementById("ctl00_ContentPlaceHolder1_tdPaging1").style.display="none";if(document.getElementById("ctl00_ContentPlaceHolder1_tdPaging2"))
document.getElementById("ctl00_ContentPlaceHolder1_tdPaging2").style.display="none";}}
function ShowKeyWordSearchResult()
{var Condition="";if(document.getElementById("HiddenKeySearch"))
Condition=document.getElementById("HiddenKeySearch").value;var cookieCond=getEnqCookie("UniProKeySearch");if(Condition==""&&cookieCond!="")
Condition=cookieCond;deleteEnqCookie("UniProRefineSearch");setEnqCookie("UniProKeySearch",Condition,1);dropdowncontent.ajaxconnect("MasterPages/UniProAjax.aspx?Condition= "+Condition+" &PageNo=1&PageSize=6","ctl00_ContentPlaceHolder1_tdDisPaging1|ctl00_ContentPlaceHolder1_tdDisPaging2|ctl00_ContentPlaceHolder1_tdProjects");var SearchVal="";if(document.getElementById("ctl00_ContentPlaceHolder1_KeywordSearchDropDown1_txtKeywordSearch").value.toLowerCase()=="name of builder or project")
SearchVal="All";else
SearchVal=document.getElementById("ctl00_ContentPlaceHolder1_KeywordSearchDropDown1_txtKeywordSearch").value;if(document.getElementById("ctl00_ContentPlaceHolder1_tdKeywordSearchResults"))
document.getElementById("ctl00_ContentPlaceHolder1_tdKeywordSearchResults").innerHTML="Showing results for: <span class='SearchLabel' style='padding-left: 15px;'>"+SearchVal+"</span>";}
function ResetRefineCitySearch()
{var PropertyCategory="";var CityId="";var LocId="";for(i=1;i<50;i++)
{if(document.getElementById("chkSearchLoc"+i))
document.getElementById("chkSearchLoc"+i).checked=false;else
break;}
for(i=1;i<20;i++)
{if(document.getElementById("chkSearchType"+i))
document.getElementById("chkSearchType"+i).checked=false;else
break;}
for(i=1;i<10;i++)
if(document.getElementById("chkSearchBed"+i))
document.getElementById("chkSearchBed"+i).checked=false;if(document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMin"))
document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMin").selectedIndex=0
if(document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMax"))
document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMax").selectedIndex=0
if(document.getElementById("ctl00_ContentPlaceHolder1_HiddenPropertyCategory")&&document.getElementById("ctl00_ContentPlaceHolder1_HiddenPropertyCategory").value!="")
PropertyCategory=document.getElementById("ctl00_ContentPlaceHolder1_HiddenPropertyCategory").value;if(document.getElementById("ctl00_ContentPlaceHolder1_HiddenCityId")&&document.getElementById("ctl00_ContentPlaceHolder1_HiddenCityId").value!="")
CityId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenCityId").value;if(document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId")&&document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId").value!="")
LocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId").value;if(PropertyCategory!="")
PropertyCategory=" PropertyCategory="+PropertyCategory;else
PropertyCategory=" PropertyCategory=1";if(CityId!="")
CityId=" and cm.CityId="+CityId;if(LocId!="")
LocId=" and lm.LocId="+LocId;dropdowncontent.ajaxconnect("MasterPages/UniProAjax.aspx?Condition= where "+PropertyCategory+" and pm.Status=1 and bm.Status=1 "+CityId+" "+LocId+" &PageNo=1&PageSize=6","ctl00_ContentPlaceHolder1_tdDisPaging1|ctl00_ContentPlaceHolder1_tdDisPaging2|ctl00_ContentPlaceHolder1_tdProjects");if(document.getElementById("spanShowLoc"))
document.getElementById("spanShowLoc").innerHTML="All";if(document.getElementById("spanShowType"))
document.getElementById("spanShowType").innerHTML="All";if(document.getElementById("spanShowBdgt"))
document.getElementById("spanShowBdgt").innerHTML="All";if(document.getElementById("spanShowBed"))
document.getElementById("spanShowBed").innerHTML="All";}
function ShowPartnerLogin(PartnerLogin)
{xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
if(document.getElementById("ctl00_ContentPlaceHolder1_tdPartnerData"))
document.getElementById("ctl00_ContentPlaceHolder1_tdPartnerData").innerHTML="<div style='width:100%; text-align:center; padding-top:200px;'><img src='images/loadingAnimation.gif' alt=''/></div>";var url="MasterPages/UniProAjax.aspx?PartnerLogin="+PartnerLogin;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{if(document.getElementById("ctl00_ContentPlaceHolder1_tdPartnerTab"))
document.getElementById("ctl00_ContentPlaceHolder1_tdPartnerTab").innerHTML=strdata.split("~")[0];if(document.getElementById("ctl00_ContentPlaceHolder1_tdPartnerData"))
{document.getElementById("ctl00_ContentPlaceHolder1_tdPartnerData").innerHTML=strdata.split("~")[1];if(PartnerLogin=="1")
document.getElementById("ctl00_ContentPlaceHolder1_tdPartnerData").style.backgroundImage="url(images/PartnerLoginBk.gif)";else if(PartnerLogin=="2"||PartnerLogin=="5")
document.getElementById("ctl00_ContentPlaceHolder1_tdPartnerData").style.backgroundImage="url(images/HOwItsWorlBk.jpg)";else if(PartnerLogin=="3")
document.getElementById("ctl00_ContentPlaceHolder1_tdPartnerData").style.backgroundImage="url(images/RegPartBk.gif)";else if(PartnerLogin=="4")
document.getElementById("ctl00_ContentPlaceHolder1_tdPartnerData").style.backgroundImage="url(images/EmpLoginBk.gif)";else if(PartnerLogin=="6")
document.getElementById("ctl00_ContentPlaceHolder1_tdPartnerData").style.backgroundImage="url(images/RegEmpBk.gif)";}}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function ChangeToEnqSel()
{if(document.getElementById("linkEnqUnSel"))
document.getElementById("linkEnqUnSel").style.color="#1c9a49";if(document.getElementById("ctl00_ContentPlaceHolder1_tdEnqTop"))
document.getElementById("ctl00_ContentPlaceHolder1_tdEnqTop").className="EnqTop1";if(document.getElementById("ctl00_ContentPlaceHolder1_tdEnqTell"))
document.getElementById("ctl00_ContentPlaceHolder1_tdEnqTell").className="EnqTell1";}
function ChangeToEnqUnSel()
{if(document.getElementById("linkEnqUnSel"))
document.getElementById("linkEnqUnSel").style.color="#000000";if(document.getElementById("ctl00_ContentPlaceHolder1_tdEnqTop"))
document.getElementById("ctl00_ContentPlaceHolder1_tdEnqTop").className="EnqTop2";if(document.getElementById("ctl00_ContentPlaceHolder1_tdEnqTell"))
document.getElementById("ctl00_ContentPlaceHolder1_tdEnqTell").className="EnqTell2";}
function SetBedRefineOptions()
{var TypeId="";for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineTypeId"+i)&&document.getElementById("chkRefineTypeId"+i).checked)
TypeId+=document.getElementById("chkRefineTypeId"+i).value;}
for(var j=0;j<6;j++)
{if(document.getElementById("chkRefineBedRooms"+j))
{document.getElementById("chkRefineBedRooms"+j).disabled=false;}}
if(TypeId=="9"||TypeId=="26"||TypeId=="926")
{for(var j=0;j<6;j++)
{if(document.getElementById("chkRefineBedRooms"+j))
{document.getElementById("chkRefineBedRooms"+j).checked=false;document.getElementById("chkRefineBedRooms"+j).disabled=true;}}}}
function ScrollUp()
{if(document.getElementById("ctl00_ContentPlaceHolder1_tdResaleCity"))
$('html, body').stop().animate({scrollTop:$("#ctl00_ContentPlaceHolder1_tdResaleCity").offset().top},1500,'easeInOutExpo');else if(document.getElementById("ctl00_ContentPlaceHolder1_divResaleTabs"))
$('html, body').stop().animate({scrollTop:$("#ctl00_ContentPlaceHolder1_divResaleTabs").offset().top},1500,'easeInOutExpo');}
function RefineDynamicPageRefineResults(DomainPath,PageNo)
{ScrollUp();ShowDynamicPageRefineResults(DomainPath,PageNo);}
function ShowDynamicPageRefineResults(DomainPath,PageNo)
{var HiddenZoneId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenZoneId");var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");var HiddenPropertyCategory=document.getElementById("ctl00_ContentPlaceHolder1_HiddenPropertyCategory");var ddlSortExp=document.getElementById("ddlSortExp");var SortExp=ddlSortExp?ddlSortExp.value:"EntryOn";var SortDir="";if(SortExp=="EntryOn")
SortDir="Desc";else if(SortExp=="MinPrice")
SortDir="Asc";var SearchCatId="0";var SearchTypeId="";var SearchBedRooms="";var SearchMinBdgt="";var SearchMaxBdgt="";var SearchLocId="";SearchLocId=HiddenLocId.value;if(document.getElementById("chkRefineCatId0")&&document.getElementById("chkRefineCatId0").checked&&document.getElementById("chkRefineCatId1")&&document.getElementById("chkRefineCatId1").checked)
SearchCatId="0";else if(document.getElementById("chkRefineCatId0")&&document.getElementById("chkRefineCatId0").checked)
SearchCatId="1";else if(document.getElementById("chkRefineCatId1")&&document.getElementById("chkRefineCatId1").checked)
SearchCatId="2";for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineTypeId"+i)&&document.getElementById("chkRefineTypeId"+i).checked)
{SearchTypeId+=":"+document.getElementById("chkRefineTypeId"+i).value+":";}}
for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineBedRooms"+i)&&document.getElementById("chkRefineBedRooms"+i).checked)
{SearchBedRooms+=":"+document.getElementById("chkRefineBedRooms"+i).value+":";}}
if(document.getElementById("ddlRefineMinBdgt")&&document.getElementById("ddlRefineMinBdgt").selectedIndex!=0)
ProjectMinBdgt=document.getElementById("ddlRefineMinBdgt").value;if(document.getElementById("ddlRefineMaxBdgt")&&document.getElementById("ddlRefineMaxBdgt").selectedIndex!=0)
ProjectMaxBdgt=document.getElementById("ddlRefineMaxBdgt").value;{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById("ctl00_ContentPlaceHolder1_divResaleProperty").innerHTML="<div style='height:250px; padding-top:150px;' align='center'>Updating Search Results<br/><br/><img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/></div>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?DynamicPropertyCategory="+HiddenPropertyCategory.value+"&DynamicPageZoneId="+HiddenZoneId.value+"&DynamicPageCatId="+SearchCatId+"&DynamicPageTypeId="+SearchTypeId+"&DynamicPageBedRooms="+SearchBedRooms+"&DynamicPageMinBdgt="+SearchMinBdgt+"&DynamicPageMaxBdgt="+SearchMaxBdgt+"&DynamicPageLocId="+SearchLocId+"&SortExp="+SortExp+"&SortDir="+SortDir+"&PageNo="+PageNo;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{document.getElementById("ctl00_ContentPlaceHolder1_divResaleProperty").innerHTML=strdata;}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}}
function ShowDynamicPageRefineSort(DomainPath,PageNo)
{ScrollUp();document.getElementById("ddlSortExp").value=document.getElementById("ddlSortExp1").value;ShowDynamicPageRefineResults(DomainPath,PageNo);}
function ShowDynamicPageRefineSortDir(DomainPath,PageNo)
{document.getElementById("ddlSortDir").value=document.getElementById("ddlSortDir1").value;ShowDynamicPageRefineResults(DomainPath,PageNo);}
function ShowSearchRefineResults(DomainPath,PageNo)
{var HiddenZoneId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenZoneId");var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");var ddlSortExp=document.getElementById("ddlSortExp");var SortExp=ddlSortExp?ddlSortExp.value:"EntryOn";var SortDir="";if(SortExp=="EntryOn")
SortDir="Desc";else if(SortExp=="MinPrice")
SortDir="Asc";var SearchCatId="0";var SearchTypeId="";var SearchBedRooms="";var SearchMinBdgt="";var SearchMaxBdgt="";var SearchLocId="";SearchLocId=HiddenLocId.value;if(document.getElementById("chkRefineCatId0")&&document.getElementById("chkRefineCatId0").checked&&document.getElementById("chkRefineCatId1")&&document.getElementById("chkRefineCatId1").checked)
SearchCatId="0";else if(document.getElementById("chkRefineCatId0")&&document.getElementById("chkRefineCatId0").checked)
SearchCatId="1";else if(document.getElementById("chkRefineCatId1")&&document.getElementById("chkRefineCatId1").checked)
SearchCatId="2";for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineTypeId"+i)&&document.getElementById("chkRefineTypeId"+i).checked)
{SearchTypeId+=":"+document.getElementById("chkRefineTypeId"+i).value+":";}}
for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineBedRooms"+i)&&document.getElementById("chkRefineBedRooms"+i).checked)
{SearchBedRooms+=":"+document.getElementById("chkRefineBedRooms"+i).value+":";}}
if(document.getElementById("ddlRefineMinBdgt")&&document.getElementById("ddlRefineMinBdgt").selectedIndex!=0)
SearchMinBdgt=document.getElementById("ddlRefineMinBdgt").value;if(document.getElementById("ddlRefineMaxBdgt")&&document.getElementById("ddlRefineMaxBdgt").selectedIndex!=0)
SearchMaxBdgt=document.getElementById("ddlRefineMaxBdgt").value;{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById("ctl00_ContentPlaceHolder1_divResaleProperty").innerHTML="<div style='height:250px; padding-top:150px;' align='center'>Updating Search Results<br/><br/><img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/></div>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?PropertyCategory=1&SearchZoneId="+HiddenZoneId.value+"&SearchCatId="+SearchCatId+"&SearchTypeId="+SearchTypeId+"&SearchBedRooms="+SearchBedRooms+"&SearchMinBdgt="+SearchMinBdgt+"&SearchMaxBdgt="+SearchMaxBdgt+"&SearchLocId="+SearchLocId+"&SortExp="+SortExp+"&SortDir="+SortDir+"&PageNo="+PageNo;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{document.getElementById("ctl00_ContentPlaceHolder1_divResaleProperty").innerHTML=strdata;}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}}
function ShowSearchRefineSortDir(DomainPath,PageNo)
{document.getElementById("ddlSortDir").value=document.getElementById("ddlSortDir1").value;ShowSearchRefineResults(DomainPath,PageNo);}
function SetRefineOptionsQS(DomainPath,SetRefine)
{var HiddenQSProjProp=document.getElementById("ctl00_ContentPlaceHolder1_HiddenQSProjProp");var HiddenQSBed=document.getElementById("ctl00_ContentPlaceHolder1_HiddenQSBed");var HiddenQSPropType=document.getElementById("ctl00_ContentPlaceHolder1_HiddenQSPropType");var HiddenQSMinBdgt=document.getElementById("ctl00_ContentPlaceHolder1_HiddenQSMinBdgt");var HiddenQSMaxBdgt=document.getElementById("ctl00_ContentPlaceHolder1_HiddenQSMaxBdgt");var HiddenQSLoc=document.getElementById("ctl00_ContentPlaceHolder1_HiddenQSLoc");var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");var listSelectedLoc=document.getElementById("listSelectedLoc");var chkRefineCatId0=document.getElementById("chkRefineCatId0");var chkRefineCatId1=document.getElementById("chkRefineCatId1");var Bedrooms="";var PropType="";if(HiddenQSProjProp&&chkRefineCatId0&&chkRefineCatId1)
{if(HiddenQSProjProp.value=="0")
{chkRefineCatId0.checked=true;chkRefineCatId1.checked=true;}
else if(HiddenQSProjProp.value=="1")
{chkRefineCatId0.checked=true;chkRefineCatId1.checked=false;}
else if(HiddenQSProjProp.value=="2")
{chkRefineCatId0.checked=false;chkRefineCatId1.checked=true;}}
if(HiddenQSPropType&&HiddenQSPropType.value!="")
{PropType=HiddenQSPropType.value;for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineTypeId"+i))
{if(PropType.indexOf(":"+document.getElementById("chkRefineTypeId"+i).value+":")!=-1)
{document.getElementById("chkRefineTypeId"+i).checked=true;}}}}
if(HiddenQSBed&&HiddenQSBed.value!="")
{Bedrooms=HiddenQSBed.value;for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineBedRooms"+i))
{if(Bedrooms.indexOf(":"+document.getElementById("chkRefineBedRooms"+i).value+":")!=-1)
{document.getElementById("chkRefineBedRooms"+i).checked=true;}}}}
if(HiddenQSMinBdgt&&document.getElementById("ddlRefineMinBdgt"))
{if(HiddenQSMinBdgt.value!="")
document.getElementById("ddlRefineMinBdgt").value=HiddenQSMinBdgt.value;}
if(HiddenQSMaxBdgt&&document.getElementById("ddlRefineMaxBdgt"))
{if(HiddenQSMaxBdgt.value!="")
document.getElementById("ddlRefineMaxBdgt").value=HiddenQSMaxBdgt.value;}
if(HiddenQSLoc&&HiddenLocId&&listSelectedLoc)
{if(HiddenQSLoc.value!="")
{document.getElementById("chooseloc").style.display="none";document.getElementById("removeloc").style.display="";listSelectedLoc.innerHTML=HiddenQSLoc.value;}}
var HiddenPropPage=document.getElementById("ctl00_ContentPlaceHolder1_HiddenPropPage");var PageNo="1";if(HiddenPropPage)
PageNo=HiddenPropPage.value;if(SetRefine=="ResiCityProperty")
ShowResaleRefineResults(DomainPath,PageNo);else if(SetRefine=="ResiCityProject")
ShowProjectRefineResults(DomainPath,PageNo);else if(SetRefine=="CommRefineProject")
ShowCommProjectRefineResults(DomainPath,PageNo);else if(SetRefine=="CommRefineProperty")
ShowResaleCommRefineResults(DomainPath,PageNo);else if(SetRefine=="DynamicPage")
ShowDynamicPageRefineResults(DomainPath,1);}
function HideSearchMore()
{document.getElementById("divSearchMore").style.display="none";}
function ShowSearchMore()
{document.getElementById("divSearchMore").style.display="";}
function HideSearchTypeMore()
{document.getElementById("divSearchTypeMore").style.display="none";}
function ShowSearchTypeMore()
{document.getElementById("divSearchTypeMore").style.display="";}
function HighlightProjectBorder(Ele,index)
{Ele.style.border="solid 1px #7050f6";if(document.getElementById("linkClickView"+index))
document.getElementById("linkClickView"+index).style.color="#00a637";}
function OriginalProjectBorder(Ele,index)
{Ele.style.border="solid 1px #dcdcdc";if(document.getElementById("linkClickView"+index))
document.getElementById("linkClickView"+index).style.color="#ffffff";}
function ValidatePartnerLogin()
{var txtPartUserId=document.getElementById("txtPartUserId");var txtPartPassword=document.getElementById("txtPartPassword");if(txtPartUserId&&txtPartUserId.value=="")
return AlertMsg(txtPartUserId,"enter User ID");else if(txtPartPassword&&txtPartPassword.value=="")
return AlertMsg(txtPartPassword,"enter Password");PartnerLogin(txtPartUserId.value,txtPartPassword.value);return false;}
function PartnerLogin(PartUserId,PartPassword)
{xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
var url="MasterPages/UniProAjax.aspx?PartUserId="+PartUserId+"&PartPassword="+PartPassword;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{alert(strdata);}
else
{deleteEnqCookie("UniconEnqPostName");deleteEnqCookie("UniconEnqPostEmail");deleteEnqCookie("UniconEnqPostPhone");deleteEnqCookie("UniconEnqPostCity");window.location="MyLeads.aspx";}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function ValidatePartnerRegistration()
{var txtPartMACode=document.getElementById("txtPartMACode");var txtPartPan=document.getElementById("txtPartPan");var txtPartPassword=document.getElementById("txtPartPassword");var txtPartConPassword=document.getElementById("txtPartConPassword");var txtPartContact=document.getElementById("txtPartContact");var txtPartEmail=document.getElementById("txtPartEmail");var chkPartAgree=document.getElementById("chkPartAgree");if(txtPartMACode&&txtPartMACode.value=="")
return AlertMsg(txtPartMACode,"enter MA Code");else if(txtPartPan&&txtPartPan.value=="")
return AlertMsg(txtPartPan,"enter PAN No.");else if(txtPartPan.value.length<10)
return AlertMsg(txtPartPan,"enter correct PAN No.");else if(txtPartPassword&&txtPartPassword.value=="")
return AlertMsg(txtPartPassword,"enter Password");else if(txtPartConPassword&&txtPartConPassword.value=="")
return AlertMsg(txtPartConPassword,"enter Confirm Password");else if(txtPartPassword.value!=txtPartConPassword.value)
return AlertMsg(txtPartConPassword,"enter Confirm Password correctly");else if(txtPartContact&&txtPartContact.value=="")
return AlertMsg(txtPartContact,"enter Contact No.");else if(txtPartEmail&&txtPartEmail.value=="")
return AlertMsg(txtPartEmail,"enter Email");else if(txtPartEmail.value!=""&&!echeck(txtPartEmail.value))
{txtPartEmail.focus();return false;}
else if(chkPartAgree&&!chkPartAgree.checked)
return AlertMsg(chkPartAgree,"select the option to agree with the Terms & Conditions");PartnerRegistration(txtPartMACode.value,txtPartPan.value,txtPartPassword.value,txtPartContact.value,txtPartEmail.value,"0");return false;}
function PartnerRegistration(MACode,PAN,Password,Contact,Email,EntryBy)
{xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
var url="MasterPages/UniProAjax.aspx?MACode="+MACode+"&PAN="+PAN+"&Password="+Password+"&Contact="+Contact+"&Email="+Email+"&EntryBy="+EntryBy;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{alert(strdata);if(strdata.toLowerCase().indexOf("success")!=-1)
{deleteEnqCookie("UniconEnqPostName");deleteEnqCookie("UniconEnqPostEmail");deleteEnqCookie("UniconEnqPostPhone");deleteEnqCookie("UniconEnqPostCity");window.location="MyLeads.aspx";}
else
{ShowPartnerLogin('3');}}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function ValidateEmployeeLogin()
{var txtEmpUserId=document.getElementById("txtEmpUserId");var txtEmpPassword=document.getElementById("txtEmpPassword");if(txtEmpUserId&&txtEmpUserId.value=="")
return AlertMsg(txtEmpUserId,"enter User ID");else if(txtEmpPassword&&txtEmpPassword.value=="")
return AlertMsg(txtEmpPassword,"enter Password");EmployeeLogin(txtEmpUserId.value,txtEmpPassword.value);return false;}
function EmployeeLogin(EmpUserId,EmpPassword)
{xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
var url="MasterPages/UniProAjax.aspx?EmpUserId="+EmpUserId+"&EmpPassword="+EmpPassword;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{alert(strdata);}
else
{deleteEnqCookie("UniconEnqPostName");deleteEnqCookie("UniconEnqPostEmail");deleteEnqCookie("UniconEnqPostPhone");deleteEnqCookie("UniconEnqPostCity");window.location="MyLeads.aspx";}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function ValidateEmployeeRegistration()
{var txtEmpCode=document.getElementById("txtEmpCode");var txtEmpDOB=document.getElementById("txtEmpDOB");var ddlEmpDay=document.getElementById("ddlEmpDay");var ddlEmpMonth=document.getElementById("ddlEmpMonth");var ddlEmpYear=document.getElementById("ddlEmpYear");var txtEmpPassword=document.getElementById("txtEmpPassword");var txtEmpConPassword=document.getElementById("txtEmpConPassword");var txtEmpContact=document.getElementById("txtEmpContact");var txtEmpEmail=document.getElementById("txtEmpEmail");var chkEmpAgree=document.getElementById("chkEmpAgree");var txtDOB=ddlEmpDay.value+"/"+ddlEmpMonth.value+"/"+ddlEmpYear.value;if(txtEmpCode&&txtEmpCode.value=="")
return AlertMsg(txtEmpCode,"enter Employee Code");else if(ddlEmpDay&&ddlEmpDay.selectedIndex==0)
return AlertMsg(ddlEmpDay,"select Day");else if(ddlEmpMonth&&ddlEmpMonth.selectedIndex==0)
return AlertMsg(ddlEmpMonth,"select Month");else if(ddlEmpYear&&ddlEmpYear.selectedIndex==0)
return AlertMsg(ddlEmpYear,"select Year");else if(!isDate(txtDOB))
{ddlEmpDay.focus();return false;}
else if(txtEmpPassword&&txtEmpPassword.value=="")
return AlertMsg(txtEmpPassword,"enter Password");else if(txtEmpConPassword&&txtEmpConPassword.value=="")
return AlertMsg(txtEmpConPassword,"enter Confirm Password");else if(txtEmpPassword.value!=txtEmpConPassword.value)
return AlertMsg(txtEmpConPassword,"enter Confirm Password correctly");else if(txtEmpContact&&txtEmpContact.value=="")
return AlertMsg(txtEmpContact,"enter Contact No.");else if(txtEmpEmail&&txtEmpEmail.value=="")
return AlertMsg(txtEmpEmail,"enter Email");else if(txtEmpEmail.value!=""&&!echeck(txtEmpEmail.value))
{txtEmpEmail.focus();return false;}
else if(chkEmpAgree&&!chkEmpAgree.checked)
return AlertMsg(chkEmpAgree,"select the option to agree with the Terms & Conditions");EmployeeRegistration(txtEmpCode.value,txtDOB,txtEmpPassword.value,txtEmpContact.value,txtEmpEmail.value,"0")
return false;}
function EmployeeRegistration(EmpCode,EmpDOB,Password,Contact,Email,EntryBy)
{xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
var url="MasterPages/UniProAjax.aspx?EmpCode="+EmpCode+"&EmpDOB="+EmpDOB+"&Password="+Password+"&Contact="+Contact+"&Email="+Email+"&EntryBy="+EntryBy;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{alert(strdata);if(strdata.toLowerCase().indexOf("success")!=-1)
{deleteEnqCookie("UniconEnqPostName");deleteEnqCookie("UniconEnqPostEmail");deleteEnqCookie("UniconEnqPostPhone");deleteEnqCookie("UniconEnqPostCity");window.location="MyLeads.aspx";}
else
{ShowPartnerLogin('6');}}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function SearchResultOn(Ele,id)
{Ele.className="SearchResultOn";if(document.getElementById("divViewEnq"+id))
document.getElementById("divViewEnq"+id).style.display="";}
function SearchResultOff(Ele,id)
{Ele.className="SearchResultOff";if(document.getElementById("divViewEnq"+id))
document.getElementById("divViewEnq"+id).style.display="none";}
function ShowHideProjectPropertyDetails(id)
{var imgsrc="";if(document.getElementById("img"+id))
imgsrc=document.getElementById("img"+id).src;if(document.getElementById("div"+id)&&document.getElementById("div"+id).style.display=="none")
{document.getElementById("div"+id).style.display="";document.getElementById("img"+id).src=imgsrc.replace("dwn","up");}
else if(document.getElementById("div"+id)&&document.getElementById("div"+id).style.display=="")
{document.getElementById("div"+id).style.display="none";document.getElementById("img"+id).src=imgsrc.replace("up","dwn");}}
function ShowHideRPRefine(Ele)
{var id=Ele.id.replace("img","div");if(Ele.src.indexOf("minus")!=-1)
{Ele.src=Ele.src.replace("minus","plus");animatedcollapse.hide(id);Ele.title="Expand";}
else if(Ele.src.indexOf("plus")!=-1)
{Ele.src=Ele.src.replace("plus","minus");animatedcollapse.show(id);Ele.title="Collapse";}}
function RefineCommSearchRefineResults(DomainPath,PageNo)
{ScrollUp();ShowCommSearchRefineResults(DomainPath,PageNo);}
function ShowCommSearchRefineResults(DomainPath,PageNo)
{var HiddenZoneId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenZoneId");var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");var ddlSortExp=document.getElementById("ddlSortExp");var SortExp=ddlSortExp?ddlSortExp.value:"EntryOn";var SortDir="";if(SortExp=="EntryOn")
SortDir="Desc";else if(SortExp=="MinPrice")
SortDir="Asc";var SearchCatId="0";var SearchTypeId="";var SearchMinBdgt="";var SearchMaxBdgt="";var SearchLocId="";SearchLocId=HiddenLocId.value;if(document.getElementById("chkRefineCatId0")&&document.getElementById("chkRefineCatId0").checked&&document.getElementById("chkRefineCatId1")&&document.getElementById("chkRefineCatId1").checked)
SearchCatId="0";else if(document.getElementById("chkRefineCatId0")&&document.getElementById("chkRefineCatId0").checked)
SearchCatId="1";else if(document.getElementById("chkRefineCatId1")&&document.getElementById("chkRefineCatId1").checked)
SearchCatId="2";for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineTypeId"+i)&&document.getElementById("chkRefineTypeId"+i).checked)
{SearchTypeId+=":"+document.getElementById("chkRefineTypeId"+i).value+":";}}
if(document.getElementById("ddlRefineMinBdgt")&&document.getElementById("ddlRefineMinBdgt").selectedIndex!=0)
SearchMinBdgt=document.getElementById("ddlRefineMinBdgt").value;if(document.getElementById("ddlRefineMaxBdgt")&&document.getElementById("ddlRefineMaxBdgt").selectedIndex!=0)
SearchMaxBdgt=document.getElementById("ddlRefineMaxBdgt").value;{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById("ctl00_ContentPlaceHolder1_divResaleProperty").innerHTML="<div style='height:250px; padding-top:150px;' align='center'>Updating Search Results<br/><br/><img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/></div>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?PropertyCategory=2&SearchZoneId="+HiddenZoneId.value+"&SearchCatId="+SearchCatId+"&SearchTypeId="+SearchTypeId+"&SearchMinBdgt="+SearchMinBdgt+"&SearchMaxBdgt="+SearchMaxBdgt+"&SearchLocId="+SearchLocId+"&SortExp="+SortExp+"&SortDir="+SortDir+"&PageNo="+PageNo;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{document.getElementById("ctl00_ContentPlaceHolder1_divResaleProperty").innerHTML=strdata;}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}}
function RefineProjectRefineResults(DomainPath,PageNo)
{ScrollUp();ShowProjectRefineResults(DomainPath,PageNo);}
function ShowProjectRefineResults(DomainPath,PageNo)
{var ProjectTypeId="";var ProjectBedRooms="";var ProjectMinBdgt="";var ProjectMaxBdgt="";var HiddenCityId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenCityId");var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");var HiddenKeySearchId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenKeySearchId");for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineTypeId"+i)&&document.getElementById("chkRefineTypeId"+i).checked)
{ProjectTypeId+=":"+document.getElementById("chkRefineTypeId"+i).value+":";}}
for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineBedRooms"+i)&&document.getElementById("chkRefineBedRooms"+i).checked)
{ProjectBedRooms+=":"+document.getElementById("chkRefineBedRooms"+i).value+":";}}
if(document.getElementById("ddlRefineMinBdgt")&&document.getElementById("ddlRefineMinBdgt").selectedIndex!=0)
ProjectMinBdgt=document.getElementById("ddlRefineMinBdgt").value;if(document.getElementById("ddlRefineMaxBdgt")&&document.getElementById("ddlRefineMaxBdgt").selectedIndex!=0)
ProjectMaxBdgt=document.getElementById("ddlRefineMaxBdgt").value;{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById("ctl00_ContentPlaceHolder1_divResaleProperty").innerHTML="<div style='height:250px; padding-top:150px;' align='center'>Updating Search Results<br/><br/><img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/></div>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?ProjectCityId="+HiddenCityId.value+"&ProjectLocId="+HiddenLocId.value+"&ProjectTypeId="+ProjectTypeId+"&ProjectBedRooms="+ProjectBedRooms+"&ProjectMinBdgt="+ProjectMinBdgt+"&ProjectMaxBdgt="+ProjectMaxBdgt+"&PageNo="+PageNo+"&ProjectKeySearch="+HiddenKeySearchId.value.replace("-","|");xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{document.getElementById("ctl00_ContentPlaceHolder1_divResaleProperty").innerHTML=strdata;if(document.getElementById("spanKeySearch")&&document.getElementById("txtKeywordSearch"))
{if(document.getElementById("txtKeywordSearch").value.toLowerCase()!="name of builder or project")
document.getElementById("spanKeySearch").innerHTML=document.getElementById("txtKeywordSearch").value;else
document.getElementById("spanKeySearch").innerHTML="All";}}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}}
function RefineCommProjectRefineResults(DomainPath,PageNo)
{ScrollUp();ShowCommProjectRefineResults(DomainPath,PageNo);}
function ShowCommProjectRefineResults(DomainPath,PageNo)
{var ProjectTypeId="";var HiddenCityId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenCityId");var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");var HiddenKeySearchId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenKeySearchId");var CityId="";for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineCity"+i)&&document.getElementById("chkRefineCity"+i).checked)
{CityId+=":"+document.getElementById("chkRefineCity"+i).value+":";}}
if(CityId=="")
{for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineCity"+i))
{CityId+=":"+document.getElementById("chkRefineCity"+i).value+":";}}}
if(CityId!="")
HiddenCityId.value=CityId;for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineTypeId"+i)&&document.getElementById("chkRefineTypeId"+i).checked)
{ProjectTypeId+=":"+document.getElementById("chkRefineTypeId"+i).value+":";}}
{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById("ctl00_ContentPlaceHolder1_divResaleProperty").innerHTML="<div style='height:250px; padding-top:150px;' align='center'>Updating Search Results<br/><br/><img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/></div>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?CommProjectCityId="+HiddenCityId.value+"&CommProjectLocId="+HiddenLocId.value+"&CommProjectTypeId="+ProjectTypeId+"&PageNo="+PageNo+"&CommProjectKeySearch="+HiddenKeySearchId.value.replace("-","|");xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{document.getElementById("ctl00_ContentPlaceHolder1_divResaleProperty").innerHTML=strdata;if(document.getElementById("spanKeySearch")&&document.getElementById("txtKeywordSearch"))
{if(document.getElementById("txtKeywordSearch").value.toLowerCase()!="name of builder or project")
document.getElementById("spanKeySearch").innerHTML=document.getElementById("txtKeywordSearch").value;else
document.getElementById("spanKeySearch").innerHTML="All";}}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}}
function RefineResaleRefineResults(DomainPath,PageNo)
{ScrollUp();ShowResaleRefineResults(DomainPath,PageNo);}
function ShowResaleRefineResults(DomainPath,PageNo)
{var RefineTypeId="";var RefineBedRooms="";var RefineMinBdgt="";var RefineMaxBdgt="";var HiddenCityId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenCityId");var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");var ddlSortExp=document.getElementById("ddlSortExp");var SortExp=ddlSortExp?ddlSortExp.value:"EntryOn";var SortDir="";if(SortExp=="EntryOn")
SortDir="Desc";else if(SortExp=="ExpectedPrice")
SortDir="Asc";for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineTypeId"+i)&&document.getElementById("chkRefineTypeId"+i).checked)
{RefineTypeId+=":"+document.getElementById("chkRefineTypeId"+i).value+":";}}
for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineBedRooms"+i)&&document.getElementById("chkRefineBedRooms"+i).checked)
{RefineBedRooms+=":"+document.getElementById("chkRefineBedRooms"+i).value+":";}}
if(document.getElementById("ddlRefineMinBdgt")&&document.getElementById("ddlRefineMinBdgt").selectedIndex!=0)
RefineMinBdgt=document.getElementById("ddlRefineMinBdgt").value;if(document.getElementById("ddlRefineMaxBdgt")&&document.getElementById("ddlRefineMaxBdgt").selectedIndex!=0)
RefineMaxBdgt=document.getElementById("ddlRefineMaxBdgt").value;{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById("ctl00_ContentPlaceHolder1_divResaleProperty").innerHTML="<div style='height:250px; padding-top:150px;' align='center'>Updating Search Results<br/><br/><img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/></div>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?CityId="+HiddenCityId.value+"&RefineLocId="+HiddenLocId.value+"&RefineTypeId="+RefineTypeId+"&RefineBedRooms="+RefineBedRooms+"&RefineMinBdgt="+RefineMinBdgt+"&RefineMaxBdgt="+RefineMaxBdgt+"&SortExp="+SortExp+"&SortDir="+SortDir+"&PageNo="+PageNo;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{document.getElementById("ctl00_ContentPlaceHolder1_divResaleProperty").innerHTML=strdata;}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}}
function ShowResaleRefineSort(DomainPath,PageNo)
{ScrollUp();document.getElementById("ddlSortExp").value=document.getElementById("ddlSortExp1").value;ShowResaleRefineResults(DomainPath,PageNo);}
function RefineResaleCommRefineResults(DomainPath,PageNo)
{ScrollUp();ShowResaleCommRefineResults(DomainPath,PageNo);}
function ShowResaleCommRefineResults(DomainPath,PageNo)
{var RefineTypeId="";var RefineMinBdgt="";var RefineMaxBdgt="";var HiddenCityId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenCityId");var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");var ddlSortExp=document.getElementById("ddlSortExp");var SortExp=ddlSortExp?ddlSortExp.value:"EntryOn";var SortDir="";if(SortExp=="EntryOn")
SortDir="Desc";else if(SortExp=="ExpectedPrice")
SortDir="Asc";for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineTypeId"+i)&&document.getElementById("chkRefineTypeId"+i).checked)
{RefineTypeId+=":"+document.getElementById("chkRefineTypeId"+i).value+":";}}
if(document.getElementById("ddlRefineMinBdgt")&&document.getElementById("ddlRefineMinBdgt").selectedIndex!=0)
RefineMinBdgt=document.getElementById("ddlRefineMinBdgt").value;if(document.getElementById("ddlRefineMaxBdgt")&&document.getElementById("ddlRefineMaxBdgt").selectedIndex!=0)
RefineMaxBdgt=document.getElementById("ddlRefineMaxBdgt").value;{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById("ctl00_ContentPlaceHolder1_divResaleProperty").innerHTML="<div style='height:250px; padding-top:150px;' align='center'>Updating Search Results<br/><br/><img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/></div>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?RefineCommCityId="+HiddenCityId.value+"&RefineCommLocId="+HiddenLocId.value+"&RefineCommTypeId="+RefineTypeId+"&RefineCommMinBdgt="+RefineMinBdgt+"&RefineCommMaxBdgt="+RefineMaxBdgt+"&PageNo="+PageNo+"&SortExp="+SortExp+"&SortDir="+SortDir;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{document.getElementById("ctl00_ContentPlaceHolder1_divResaleProperty").innerHTML=strdata;}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}}
function ShowResaleCommRefineSort(DomainPath,PageNo)
{ScrollUp();document.getElementById("ddlSortExp").value=document.getElementById("ddlSortExp1").value;ShowResaleCommRefineResults(DomainPath,PageNo);}
function ShowHideRPDetails(id)
{for(var i=1;i<4;i++)
{if(document.getElementById("divTab"+i))
document.getElementById("divTab"+i).style.display="none";if(document.getElementById("Tab"+i))
document.getElementById("Tab"+i).style.backgroundColor="#efefef";}
if(document.getElementById("divTab"+id))
document.getElementById("divTab"+id).style.display="";if(document.getElementById("Tab"+id))
document.getElementById("Tab"+id).style.backgroundColor="#ffffff";}
function LargePopup(strUrl)
{var mainwin=window.parent.open(strUrl,'MyWin','x=0,y=0,toolbar=no,location=0,directories=no,status=no,scrollbars=yes,resizable=0,copyhistory=no,width=990,height=700,screenX=0,screenY=0,left=210,top=0');mainwin.focus();return false;}
function ValidateResalePostLeads()
{var txtPostName=document.getElementById("txtPostName")
var txtPostEmail=document.getElementById("txtPostEmail")
var txtPostPhone=document.getElementById("txtPostPhone")
var txtCity=document.getElementById("txtCity")
var txtPostQuery=document.getElementById("txtPostQuery")
if(txtPostName&&txtPostName.value=="")
return AlertMsg(txtPostName,"enter Name");else if(txtPostEmail&&txtPostEmail.value=="")
return AlertMsg(txtPostEmail,"enter E-mail");else if(!Homeecheck(txtPostEmail.value))
{txtPostEmail.select();return false;}
else if(txtPostPhone&&txtPostPhone.value=="")
return AlertMsg(txtPostPhone,"enter Phone");else if(!CheckHomeNumValidate(txtPostPhone)&&txtPostPhone.value!="")
return AlertMsg(txtPostPhone,"enter proper number");else if(txtCity&&txtCity.value=="")
return AlertMsg(txtCity,"enter City");else
{SaveResalePostLeads();return false;}
return false;}
function ShowNextInProjectScroller(ProjectCond,ProjectSrNo,disId,DomainPath)
{xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
if(document.getElementById("ctl00_ContentPlaceHolder1_"+disId))
document.getElementById("ctl00_ContentPlaceHolder1_"+disId).innerHTML="<div id='container1'><div id='scroller1' style='padding-top:90px;'><img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/></div></div>";var url=DomainPath+"MasterPages/UniProAjax.aspx?ProjectCond="+ProjectCond+"&ProjectSrNo="+ProjectSrNo+"&DisId="+disId;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(document.getElementById("divDisMessage"))
document.getElementById("divDisMessage").style.display="none";if(strdata!="")
{if(document.getElementById("ctl00_ContentPlaceHolder1_"+disId))
document.getElementById("ctl00_ContentPlaceHolder1_"+disId).innerHTML=strdata;}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function ResaleSnapShotOn(Ele,id)
{Ele.className="ResaleSnapShotOn";if(document.getElementById("divViewEnq"+id))
document.getElementById("divViewEnq"+id).style.display="";}
function ResaleSnapShotOff(Ele,id)
{Ele.className="ResaleSnapShotOff";if(document.getElementById("divViewEnq"+id))
document.getElementById("divViewEnq"+id).style.display="none";}
function DisplayCity()
{var ddlResaleState=document.getElementById('ctl00_ContentPlaceHolder1_ddlResaleState');var SelValue=ddlResaleState.value;var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!")
return;}
var url="MasterPages/AjaxSellProperty.aspx?selectedValue="+SelValue;var ddlResaleCity=document.getElementById("ddlResaleCity");var spanSPCity=document.getElementById("spanSPCity");spanSPCity.innerHTML="<img src='ResaleImages/ajaxloader.gif' alt='' />";ddlResaleCity.length=0;ListUtil.add(ddlResaleCity,"0","Select City");xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;var strCity;if(strdata!="")
{var strCity=strdata.split('|');for(i=0;i<strCity.length;i++)
{ListUtil.add(ddlResaleCity,strCity[i].split('~')[0],strCity[i].split('~')[1]);}}
spanSPCity.innerHTML=" "}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function FillSPKeywordSearchLocList(e,Ele,CityId)
{var ddlCity=document.getElementById("ddlResaleCity");if(ddlCity&&ddlCity.selectedIndex==0)
{alert("Please select City");Ele.value="";return false;}
else
{var unicode=e.charCode?e.charCode:e.keyCode;var divLocList=document.getElementById("ctl00_ContentPlaceHolder1_divLocList");var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");HiddenLocId.value="";var Counter=parseInt(rowCount);if(unicode==40)
{strItem="";if(document.getElementById("tblSymbolSearch"))
{mytable=document.getElementById("tblSymbolSearch");countRow=mytable.rows.length;if(Counter<countRow)
{Counter=Counter+1;if(Counter==countRow)
Counter=0;rowCount=Counter;for(i=0;i<countRow;i++)
{if(i==Counter)
{myrow=mytable.getElementsByTagName("tr")[i];myrow.className="selected";strItem=myrow.id;}
else
{myrow=mytable.getElementsByTagName("tr")[i];myrow.className="unselected";}}}
else if(Counter>=countRow)
{myrow=mytable.getElementsByTagName("tr")[countRow];myrow.className="selected";strItem=myrow.id;}}}
else if(unicode==38)
{strItem="";if(document.getElementById("tblSymbolSearch"))
{mytable=document.getElementById("tblSymbolSearch");countRow=mytable.rows.length;if(Counter>0)
{Counter=Counter-1;rowCount=Counter;for(i=0;i<countRow;i++)
{if(i==Counter)
{myrow=mytable.getElementsByTagName("tr")[i];myrow.className="selected";strItem=myrow.id;}
else
{myrow=mytable.getElementsByTagName("tr")[i];myrow.className="unselected";}}}
else if(Counter<=0)
{Counter=countRow-1;rowCount=Counter;myrow=mytable.getElementsByTagName("tr")[Counter];myrow.className="selected";strItem=myrow.id;myrow=mytable.getElementsByTagName("tr")[0];myrow.className="unselected";}}}
else if(unicode==13)
{if(strItem!="")
{rowCount=-1;var rowItem=strItem.split("|");Ele.value=rowItem[2];HiddenLocId.value=rowItem[0];divLocList.innerHTML="";divLocList.style.display="none";}}
else if(unicode==27)
{rowCount=-1;Ele.value="";Ele.focus();divLocList.innerHTML="";divLocList.style.display="none";}
else
{rowCount=-1;xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
if(Ele.value.indexOf(",")==-1)
divLocList.value="";KeywordSearchDDL=Ele.value;var CityIDDDL="";if(ddlCity)
CityIDDDL="&CityIDDDL="+ddlCity.value;var url="MasterPages/UniProResaleAjax.aspx?LocDDL="+KeywordSearchDDL+CityIDDDL;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{var SalesCode="";var SalesName="";var KeywordSearchName="";divLocList.style.display="";divLocList.innerHTML=strdata;}
else
{divLocList.innerHTML="";divLocList.style.display="none";}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}}}
var rowCount=-1;var strItem="";function noenter(e)
{var unicode=e.charCode?e.charCode:e.keyCode;if(unicode==13)
return false;}
function FillKeywordSearchList(e,Ele,DomainPath,CityId,PropertyCategory)
{var unicode=e.charCode?e.charCode:e.keyCode;var divKeywordSearchList=document.getElementById("divKeywordSearchList");var HiddenKeySearchId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenKeySearchId");HiddenKeySearchId.value="";var Counter=parseInt(rowCount);if(unicode==40)
{strItem="";if(document.getElementById("tblSymbolSearch"))
{mytable=document.getElementById("tblSymbolSearch");countRow=mytable.rows.length;if(Counter<countRow)
{Counter=Counter+1;if(Counter==countRow)
Counter=0;rowCount=Counter;for(i=0;i<countRow;i++)
{if(i==Counter)
{myrow=mytable.getElementsByTagName("tr")[i];myrow.className="selected";strItem=myrow.id;}
else
{myrow=mytable.getElementsByTagName("tr")[i];myrow.className="unselected";}}}
else if(Counter>=countRow)
{myrow=mytable.getElementsByTagName("tr")[countRow];myrow.className="selected";strItem=myrow.id;}}}
else if(unicode==38)
{strItem="";if(document.getElementById("tblSymbolSearch"))
{mytable=document.getElementById("tblSymbolSearch");countRow=mytable.rows.length;if(Counter>0)
{Counter=Counter-1;rowCount=Counter;for(i=0;i<countRow;i++)
{if(i==Counter)
{myrow=mytable.getElementsByTagName("tr")[i];myrow.className="selected";strItem=myrow.id;}
else
{myrow=mytable.getElementsByTagName("tr")[i];myrow.className="unselected";}}}
else if(Counter<=0)
{Counter=countRow-1;rowCount=Counter;myrow=mytable.getElementsByTagName("tr")[Counter];myrow.className="selected";strItem=myrow.id;myrow=mytable.getElementsByTagName("tr")[0];myrow.className="unselected";}}}
else if(unicode==13)
{rowCount=-1;var rowItem=strItem.split("|");Ele.value=rowItem[2];HiddenKeySearchId.value=rowItem[0];divKeywordSearchList.innerHTML="";divKeywordSearchList.style.display="none";}
else if(unicode==27)
{rowCount=-1;Ele.value="";Ele.focus();divKeywordSearchList.innerHTML="";divKeywordSearchList.style.display="none";}
else
{rowCount=-1;xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
if(Ele.value.indexOf(",")==-1)
divKeywordSearchList.value="";KeywordSearchDDL=Ele.value;var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?KeywordSearchDDL="+KeywordSearchDDL+"&KeywordCityId="+CityId+"&KeywordPropertyCategory="+PropertyCategory;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{var SalesCode="";var SalesName="";var KeywordSearchName="";divKeywordSearchList.style.display="";divKeywordSearchList.innerHTML=strdata;}
else
{divKeywordSearchList.innerHTML="";divKeywordSearchList.style.display="none";}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}}
function OnMouseOver(Ele)
{tblSymbol=document.getElementById("tblSymbolSearch");countRow=tblSymbol.rows.length;for(i=0;i<countRow;i++)
{symbolRow=tblSymbol.getElementsByTagName("tr")[i];if(Ele.id==symbolRow.id)
rowCount=i;if(symbolRow.className=="selected")
symbolRow.className="unselected";}
Ele.className="selected";}
function OnMouseClick(Ele)
{var txtKeywordSearch=document.getElementById("txtKeywordSearch");var divKeywordSearchList=document.getElementById("divKeywordSearchList");var HiddenKeySearchId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenKeySearchId");var rowId=Ele.id.split("|");HiddenKeySearchId.value=rowId[0];txtKeywordSearch.value=rowId[2];divKeywordSearchList.innerHTML="";divKeywordSearchList.style.display="none";}
function SetRPOtherLoc(Ele)
{var txtLocality=document.getElementById("ctl00_ContentPlaceHolder1_txtLocality");var txtOtherLoc=document.getElementById("ctl00_ContentPlaceHolder1_txtOtherLoc");var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");if(Ele.checked)
{HiddenLocId.value="0";txtLocality.value="";txtLocality.disabled=true;txtOtherLoc.value="";txtOtherLoc.style.display="";}
else
{txtLocality.disabled=false;txtOtherLoc.value="";txtOtherLoc.style.display="none";}}
function LoadSPPropType(Ele)
{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
var ddlPropertyType=document.getElementById("ctl00_ContentPlaceHolder1_ddlPropertyType");var spanPropertyCategory=document.getElementById("spanPropertyCategory");spanPropertyCategory.innerHTML="<img src='ResaleImages/ajaxloader.gif' alt='' />";if(ddlPropertyType)
{ddlPropertyType.length=0;ListUtil.add(ddlPropertyType,"0","Select Property Type");var url="MasterPages/UniProResaleAjax.aspx?SPPropertyCategory="+Ele.value;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{var str="";for(var i=0;i<strdata.split("~").length;i++)
{str=strdata.split("~")[i];ListUtil.add(ddlPropertyType,str.split("|")[0],str.split("|")[1]);}}
spanPropertyCategory.innerHTML=" ";}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}}
function LoadSPConditionalPropType(Ele)
{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
var ddlPropertyCategory=document.getElementById("ctl00_ContentPlaceHolder1_ddlPropertyCategory");if(ddlPropertyCategory)
{var url="MasterPages/UniProResaleAjax.aspx?SPPropertyType="+Ele.value+"&SPPropertyCategory="+ddlPropertyCategory.value;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{SetSPConditionalPropType(strdata);}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}}
function HideFormText(Ele,val)
{if(Ele.value!=""&&Ele.value.toLowerCase()==val.toLowerCase())
{Ele.value="";Ele.className="AddText";Ele.select();}}
function ShowFormText(Ele,val)
{if((Ele.value.toLowerCase()!=val.toLowerCase()&&Ele.value=="")||(Ele.value.toLowerCase()==val.toLowerCase()&&Ele.value!=""))
{Ele.value=val;Ele.className="AddTextCss";}}
function deleteRows()
{try
{var table=document.getElementById('tbAddRows');var rowCount=table.rows.length;if(rowCount-1!=0)
{table.deleteRow(rowCount-1);}}
catch(e)
{alert(e);}}
function createRows()
{var text1=new Array("sq.ft.","sq.meter","sq.yard");var value1=new Array("1","2","3");var text2=new Array("Super Area","Built-up Area","Plot Area","Carpet Area");var value2=new Array("1","2","3","4");var AreaTypes=document.getElementById("SPHiddenAreaTypes").value;var AreaTypeName=new Array("","Super Area","Built-up Area","Plot Area","Carpet Area");var table=document.getElementById('tbAddRows');var rowCount=table.rows.length;if(rowCount==4)
return false;var row=table.insertRow(rowCount);var cell1=row.insertCell(0);var element1=document.createElement("input");element1.id="txtArea"+rowCount;element1.type="text";element1.style.width="90px";cell1.style.paddingLeft="0px";cell1.appendChild(element1);var cell2=row.insertCell(1);var element2=document.createElement("select");element2.id="ddlArea"+rowCount;element2.style.width="90px";for(var i=0;i<text1.length&&i<value1.length;i++)
{addOption(element2,text1[i],value1[i]);}
cell2.appendChild(element2);var cell3=row.insertCell(2);var element3=document.createElement("select");element3.id="ddlBuilt"+rowCount;element3.style.width="90px";if(AreaTypes!="")
{var AreaTypeId=""
for(var s=0;s<AreaTypes.split("#").length;s++)
{AreaTypeId=AreaTypes.split("#")[s].replace(":","");addOption(element3,AreaTypeName[eval(AreaTypeId)],AreaTypeId);}}
else
{for(var i=0;i<text2.length&&i<value2.length;i++)
{addOption(element3,text2[i],value2[i]);}}
cell3.appendChild(element3);}
function addOption(selectbox,text,value)
{var optn=document.createElement("OPTION");optn.text=text;optn.value=value;selectbox.options.add(optn);return true;}
function SFShowYearPossLabel(Ele)
{var spanYearPoss=document.getElementById("ctl00_ContentPlaceHolder1_spanYearPoss");if(Ele.value=="1")
spanYearPoss.innerHTML="Year Built/Age of Construction";else if(Ele.value=="2")
spanYearPoss.innerHTML="Possession By";else
spanYearPoss.innerHTML="Year Built/Possession By";}
function addSeparator()
{if(document.getElementById('ctl00_ContentPlaceHolder1_txtPrice').value!="")
{var priceValue=document.getElementById('ctl00_ContentPlaceHolder1_txtPrice');if(addComma(priceValue)!="")
{document.getElementById('ctl00_ContentPlaceHolder1_txtPrice').value=addComma(priceValue);}}
if(document.getElementById('ctl00_ContentPlaceHolder1_txtUnitPrice').value!="")
{var priceValue=document.getElementById('ctl00_ContentPlaceHolder1_txtUnitPrice');if(addComma(priceValue)!="")
{document.getElementById('ctl00_ContentPlaceHolder1_txtUnitPrice').value=addComma(priceValue);}}}
function addComma(priceValue)
{var priceValue=priceValue.value;var countdigits=0;var comma=",";var ch=" ",character=" ";if(priceValue.length>3)
{if(priceValue.search(",")!=-1)
{for(i=0;i<priceValue.length;i++)
{ch=priceValue.charAt(i);if(ch==comma)
{priceValue=priceValue.replace(",","");priceValue=priceValue.replace(" ","");}}}
if(priceValue.length%2==0)
{var ch=priceValue.charAt(0);ch=ch+",";character=character+ch;for(i=1;i<priceValue.length;i++)
{ch1=priceValue.charAt(i);ch=ch+ch1;countdigits=countdigits+1;}}
else
{var ch3=priceValue.charAt(0);var ch4=priceValue.charAt(1);ch=ch3+ch4+",";character=character+ch;for(i=2;i<priceValue.length;i++)
{ch1=priceValue.charAt(i);ch=ch+ch1;countdigits=countdigits+1;}}
var position=ch.indexOf(",");var count1=0;var pos=character.lastIndexOf(",");for(i=position+1;i<ch.length;i++)
{count1++;ch2=ch.charAt(i);character=character+ch2;if(count1%2==0&&i!=ch.length-2)
{character=character+",";}}
return character;}
else
{return priceValue;}}
function ValidateForm()
{var ddlPropertyCategory=document.getElementById('ctl00_ContentPlaceHolder1_ddlPropertyCategory');var ddlPropertyType=document.getElementById('ctl00_ContentPlaceHolder1_ddlPropertyType');var ddlBedroom=document.getElementById('ctl00_ContentPlaceHolder1_ddlBedroom');var ddlBathroom=document.getElementById('ctl00_ContentPlaceHolder1_ddlBathroom');var ddlBalcony=document.getElementById('ctl00_ContentPlaceHolder1_ddlBalcony');var ddlFloorNumber=document.getElementById('ctl00_ContentPlaceHolder1_ddlFloorNumber');var ddlTotalFloors=document.getElementById('ctl00_ContentPlaceHolder1_ddlTotalFloors');var ddlConsStatus=document.getElementById('ctl00_ContentPlaceHolder1_ddlConsStatus');var txtYearPoss=document.getElementById('ctl00_ContentPlaceHolder1_txtYearPoss');var txtPrice=document.getElementById('ctl00_ContentPlaceHolder1_txtPrice');var txtUnitPrice=document.getElementById('ctl00_ContentPlaceHolder1_txtUnitPrice');var ddlUnitPrice=document.getElementById('ctl00_ContentPlaceHolder1_ddlUnitPrice');var ddlResaleState=document.getElementById('ctl00_ContentPlaceHolder1_ddlResaleState');var ddlResaleCity=document.getElementById('ddlResaleCity');var txtLocality=document.getElementById('ctl00_ContentPlaceHolder1_txtLocality');var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");var chkOtherLoc=document.getElementById("ctl00_ContentPlaceHolder1_chkOtherLoc");var txtOtherLoc=document.getElementById("ctl00_ContentPlaceHolder1_txtOtherLoc");var HiddenAmeList=document.getElementById("ctl00_ContentPlaceHolder1_HiddenAmeList");var HiddenPropertyCategory=document.getElementById("ctl00_ContentPlaceHolder1_HiddenPropertyCategory");var PropertyTypeControls=document.getElementById('ctl00_ContentPlaceHolder1_PropertyTypeControls');var Controls=PropertyTypeControls.value.split("|");if(ddlPropertyCategory&&ddlPropertyCategory.selectedIndex==0)
return AlertMsg(ddlPropertyCategory,"select Property Category");else if(ddlPropertyType&&ddlPropertyType.selectedIndex==0)
return AlertMsg(ddlPropertyType,"select Property Type");else if(ddlBedroom&&ddlBedroom.selectedIndex==0&&Controls[0]=="1")
return AlertMsg(ddlBedroom,"select Bedrooms");else if(ddlBathroom&&ddlBathroom.selectedIndex==0&&Controls[1]=="1")
return AlertMsg(ddlBathroom,"select Bathrooms");else if(checkNewRows(Controls[3])==false)
{return false;}
else if(ddlFloorNumber&&ddlFloorNumber.selectedIndex==0&&Controls[7]=="1")
return AlertMsg(ddlFloorNumber,"select Floor Number");else if(ddlTotalFloors&&ddlTotalFloors.selectedIndex==0&&Controls[8]=="1")
return AlertMsg(ddlTotalFloors,"select Number of Floors in Building");else if(ddlConsStatus&&ddlConsStatus.selectedIndex==0&&Controls[4]=="1")
return AlertMsg(ddlConsStatus,"select Construction Status");else if(txtYearPoss&&txtYearPoss.value==""&&Controls[4]=="1")
return AlertMsg(txtYearPoss,"enter value");else if(txtPrice&&txtPrice.value==""&&txtUnitPrice&&txtUnitPrice.value=="")
return AlertMsg(txtPrice,"enter Expected Price or Per Unit Price");else if(txtUnitPrice.value!=""&&ddlUnitPrice&&ddlUnitPrice.selectedIndex==0)
return AlertMsg(ddlUnitPrice,"select Unit Type");else if(ddlResaleState&&ddlResaleState.selectedIndex==0)
return AlertMsg(ddlResaleState,"select State");else if(ddlResaleCity&&ddlResaleCity.selectedIndex==0)
return AlertMsg(ddlResaleCity,"select City");else if(txtLocality&&chkOtherLoc&&!chkOtherLoc.checked&&txtLocality.value=="")
return AlertMsg(txtLocality,"enter Location");else if(HiddenLocId&&chkOtherLoc&&!chkOtherLoc.checked&&txtLocality.value!=""&&HiddenLocId.value=="")
return AlertMsg(txtLocality,"select proper Location");else if(chkOtherLoc&&chkOtherLoc.checked&&txtOtherLoc&&txtOtherLoc.value=="")
return AlertMsg(txtOtherLoc,"enter Location");document.getElementById('ctl00_ContentPlaceHolder1_HiddenCity').value=ddlResaleCity.value;HiddenPropertyCategory.value=ddlPropertyType.value;HiddenAmeList.value="";var strAmeList="";for(var i=0;i<99;i++)
{if(document.getElementById("chkAme"+i))
{if(document.getElementById("chkAme"+i).checked)
strAmeList+=":"+document.getElementById("chkAme"+i).value+":";}
else
break;}
HiddenAmeList.value=strAmeList;if(document.getElementById("divContactDetails"))
{document.getElementById("divContactDetails").style.display="";if(document.getElementById("ctl00_ContentPlaceHolder1_txtName"))
document.getElementById("ctl00_ContentPlaceHolder1_txtName").focus();}
if(document.getElementById("divProceed"))
document.getElementById("divProceed").style.display="none";return false;}
function ValidateResaleContactDetails()
{var txtName=document.getElementById('ctl00_ContentPlaceHolder1_txtName');var txtMobile=document.getElementById('ctl00_ContentPlaceHolder1_txtMobile');var txtLandline=document.getElementById('ctl00_ContentPlaceHolder1_txtLandline');var txtEmail=document.getElementById('ctl00_ContentPlaceHolder1_txtEmail');var isNum=true;var isLen=true;if(txtMobile.value!="")
{var mobile=new Array();mobile=txtMobile.value.split(";");for(var i=0;i<mobile.length;i++)
{if(mobile[i]!="")
{if(isNaN(mobile[i]))
{isNum=false;break;}
mobile[i]=mobile[i].replace(" ","");if(mobile[i].replace(" ","").length<10||mobile[i].replace(" ","").length>10)
{isLen=false;break;}}}}
var isLNum=true;var isLFormat=true;if(txtLandline.value!="")
{var landline=new Array();landline=txtLandline.value.split("-");if(landline.length<3||landline.length>3)
isLFormat=false;for(var j=0;j<landline.length;j++)
{if(isNaN(landline[j]))
{isLNum=false;break;}}}
if(txtName&&txtName.value=="")
return AlertMsg(txtName,"enter your Name");else if(txtMobile&&txtMobile.value==""&&txtLandline&&txtLandline.value=="")
return AlertMsg(txtMobile,"enter at least one contact number");else if(txtMobile.value!=""&&!isNum)
return AlertMsg(txtMobile,"enter number only");else if(txtMobile.value!=""&&!isLen)
return AlertMsg(txtMobile,"enter proper mobile number");else if(txtLandline.value!=""&&!isLFormat)
return AlertMsg(txtLandline,"enter landline number in correct format");else if(txtLandline.value!=""&&!isLNum)
return AlertMsg(txtLandline,"enter proper number");else if(txtEmail&&txtEmail.value=="")
return AlertMsg(txtEmail,"enter your Email Address");else if(txtEmail.value!=""&&!echeck(txtEmail.value))
{txtEmail.select();return false;}}
function ShowHomeLoanData(id)
{for(i=0;i<5;i++)
{if(document.getElementById("divHL"+i+"L"))
{document.getElementById("divHL"+i+"L").className="InnerTabL";document.getElementById("divHL"+i+"M").className="InnerTabM";document.getElementById("divHL"+i+"R").className="InnerTabR";document.getElementById("div"+i).style.display="none";}}
document.getElementById("divHL"+id+"L").className="InnerTabOnL";document.getElementById("divHL"+id+"M").className="InnerTabOnM";document.getElementById("divHL"+id+"R").className="InnerTabOnR";document.getElementById("div"+id).style.display="";}
function InsertComm(Ele)
{var strCurr=Ele.value;var retCurr="";for(c=0;c<strCurr.split(",").length;c++)
strCurr=strCurr.replace(",","");for(c=0;c<strCurr.split(",").length;c++)
strCurr=strCurr.replace(",","");i=0;for(p=0;p<strCurr.length;p++)
{i++;if(i==4)
retCurr=","+retCurr;if(i==6)
retCurr=","+retCurr;if(i==8)
retCurr=","+retCurr;if(i==10)
retCurr=","+retCurr;retCurr=strCurr.substr(strCurr.length-i,1)+retCurr;}
Ele.value=retCurr;}
function CalculateEMI()
{var redBal;if(document.getElementById("rdoMonth").checked)
redBal="Month";else if(document.getElementById("rdoAnnual").checked)
redBal="Annual";var LoanAmout=document.getElementById("txtLoanAmt").value;for(i=0;i<LoanAmout.split(',').length;i++)
LoanAmout=LoanAmout.replace(",","");for(i=0;i<LoanAmout.split(',').length;i++)
LoanAmout=LoanAmout.replace(",","");if(document.getElementById("txtLoanAmt").value==""&&document.getElementById("txtLoanPeriod").value=="")
{alert("Please enter a number against 'Loan Amount and Period'");return false;}
else if((isNaN(LoanAmout)==true)||(LoanAmout==""))
{alert("Please enter a number against 'Loan Amount' ");return false;}
else if((isNaN(document.getElementById("txtLoanPeriod").value)==true)||(document.getElementById("txtLoanPeriod").value=="")||(document.getElementById("txtLoanPeriod").value<1))
{alert("Please enter a valid number against 'Loan Period' ");return false;}
else if((isNaN(document.getElementById("txtInt").value)==true)||(document.getElementById("txtInt").value==""))
{alert("Please enter a number against 'Interest Rate' ");return false;}
else
{var loanAMT=LoanAmout;var loanPeriod=document.getElementById("txtLoanPeriod").value;var intRate=(document.getElementById("txtInt").value)/100;if(redBal=="Annual")
{var CalRa=Math.pow((1+intRate),(parseInt(loanPeriod)))
var varEMI=(parseFloat(loanAMT)*parseFloat(CalRa))/parseInt(loanPeriod)
document.getElementById("txtEMI").value=Math.round(varEMI,2);InsertComm(document.getElementById("txtEMI"))}
else
{var CalRa=Math.pow((1+intRate),(parseInt(loanPeriod)))
var varEMI=(parseFloat(loanAMT)*parseFloat(CalRa))/(parseInt(loanPeriod)*12)
document.getElementById("txtEMI").value=Math.round(varEMI,2);InsertComm(document.getElementById("txtEMI"))}
return true;}}
function ResetEMI()
{document.getElementById("rdoMonth").checked=true;document.getElementById("txtLoanAmt").value="";document.getElementById("txtLoanPeriod").value="";document.getElementById("txtInt").value="";document.getElementById("txtEMI").value="";}
function ValidateHomeLoan()
{var txtHLName=document.getElementById("ctl00_ContentPlaceHolder1_txtHLName");var ddlHLState=document.getElementById("ctl00_ContentPlaceHolder1_ddlHLState");
var txtHLCity=document.getElementById("ctl00_ContentPlaceHolder1_txtHLCity");var ddlHLDay=document.getElementById("ctl00_ContentPlaceHolder1_ddlHLDay");
var ddlHLMonth=document.getElementById("ctl00_ContentPlaceHolder1_ddlHLMonth");var ddlHLYear=document.getElementById("ctl00_ContentPlaceHolder1_ddlHLYear");
var txtHLAmount=document.getElementById("ctl00_ContentPlaceHolder1_txtHLAmount");
var txtHLIncome=document.getElementById("ctl00_ContentPlaceHolder1_txtHLIncome");var txtHLEmail=document.getElementById("ctl00_ContentPlaceHolder1_txtHLEmail");var txtHLMobile=document.getElementById("ctl00_ContentPlaceHolder1_txtHLMobile");var HLAmount=txtHLAmount.value;var HLIncome=txtHLIncome.value;var HLMobile=txtHLMobile.value;var HLDOB=ddlHLDay.value+"/"+ddlHLMonth.value+"/"+ddlHLYear.value;for(i=0;i<HLAmount.split(',').length;i++)
HLAmount=HLAmount.replace(",","");for(i=0;i<HLIncome.split(',').length;i++)
HLIncome=HLIncome.replace(",","");for(i=0;i<HLAmount.split(',').length;i++)
HLAmount=HLAmount.replace(",","");for(i=0;i<HLIncome.split(',').length;i++)
HLIncome=HLIncome.replace(",","");if(txtHLName&&txtHLName.value=="")
return AlertMsg(txtHLName,"enter name");
//else if(ddlHLState&&ddlHLState.selectedIndex==0)
//return AlertMsg(ddlHLState,"select state");else if(txtHLCity&&txtHLCity.value=="")
//return AlertMsg(txtHLCity,"enter city");else if(ddlHLDay&&ddlHLDay.selectedIndex==0)
//return AlertMsg(ddlHLDay,"select day");else if(ddlHLMonth&&ddlHLMonth.selectedIndex==0)
//return AlertMsg(ddlHLMonth,"select month");else if(ddlHLYear&&ddlHLYear.selectedIndex==0)
//return AlertMsg(ddlHLYear,"select year");
//else if(HLDOB!=""&&!isDate(HLDOB,"false"))
//{ddlHLDay.focus();return false;}
else if(txtHLAmount&&txtHLAmount.value=="")
return AlertMsg(txtHLAmount,"enter loan amount");else if(!CheckNumValidate(txtHLAmount)&&txtHLAmount.value!="")
return AlertMsg(txtHLAmount,"enter proper value");else if(txtHLIncome&&txtHLIncome.value=="")
return AlertMsg(txtHLIncome,"enter montly income");else if(!CheckNumValidate(txtHLIncome)&&txtHLIncome.value!="")
return AlertMsg(txtHLIncome,"enter proper value");

else if(txtHLEmail&&Trim(txtHLEmail.value)=="")
return AlertMsg(txtHLEmail,"enter E-mail");else if(!Homeecheck(txtHLEmail.value))
{txtHLEmail.select();return false;}

else if(txtHLMobile&&txtHLMobile.value=="")
return AlertMsg(txtHLMobile,"enter contact no.");else if(!CheckNumValidate(txtHLMobile)&&txtHLMobile.value!="")
return AlertMsg(txtHLMobile,"enter proper value");



else if(txtHLAmount&&txtHLAmount.value!=""&&eval(HLAmount)>eval(999999999))
{txtHLAmount.focus();alert("Loan amount should not exceed Rs. 99,99,99,999");return false;}
else if(txtHLIncome&&txtHLIncome.value!=""&&eval(HLIncome)>eval(9999999))
{txtHLIncome.focus();alert("Montly income should not exceed Rs. 99,99,999");return false;}
else if(txtHLEmail&&txtHLEmail.value!=""&&!Homeecheck(txtHLEmail.value))
{txtHLEmail.focus();return false;}
else if(HLMobile!=""&&(HLMobile.indexOf("9")!="0"&&HLMobile.indexOf("8")!="0")||HLMobile.length<10)
return AlertMsg(txtHLMobile,"enter valid contact no.");else if(HLMobile.indexOf("000000000")!=-1||HLMobile.indexOf("111111111")!=-1||HLMobile.indexOf("222222222")!=-1||HLMobile.indexOf("333333333")!=-1||HLMobile.indexOf("444444444")!=-1||HLMobile.indexOf("555555555")!=-1||HLMobile.indexOf("666666666")!=-1||HLMobile.indexOf("777777777")!=-1||HLMobile.indexOf("888888888")!=-1||HLMobile.indexOf("999999999")!=-1)
return AlertMsg(txtHLMobile,"try another contact no.");}

function ResetHomeLoan()
{document.getElementById("ctl00_ContentPlaceHolder1_txtHLName").value="";document.getElementById("ctl00_ContentPlaceHolder1_ddlHLState").selectedIndex=0;document.getElementById("ctl00_ContentPlaceHolder1_txtHLCity").value="";document.getElementById("ctl00_ContentPlaceHolder1_ddlHLDay").selectedIndex=0;document.getElementById("ctl00_ContentPlaceHolder1_ddlHLMonth").selectedIndex=0;document.getElementById("ctl00_ContentPlaceHolder1_ddlHLYear").selectedIndex=0;document.getElementById("ctl00_ContentPlaceHolder1_txtHLAmount").value="";document.getElementById("ctl00_ContentPlaceHolder1_txtHLIncome").value="";document.getElementById("ctl00_ContentPlaceHolder1_txtHLEmail").value="";document.getElementById("ctl00_ContentPlaceHolder1_txtHLMobile").value="";return false;}
function RefineSearchRefineResults(DomainPath,PageNo)
{ScrollUp();ShowSearchRefineResults(DomainPath,PageNo);}
function ShowSearchRefineResults(DomainPath,PageNo)
{var HiddenZoneId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenZoneId");var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");var ddlSortExp=document.getElementById("ddlSortExp");var SortExp=ddlSortExp?ddlSortExp.value:"EntryOn";var SortDir="";if(SortExp=="EntryOn")
SortDir="Desc";else if(SortExp=="MinPrice")
SortDir="Asc";var SearchCatId="0";var SearchTypeId="";var SearchBedRooms="";var SearchMinBdgt="";var SearchMaxBdgt="";var SearchLocId="";SearchLocId=HiddenLocId.value;if(document.getElementById("chkRefineCatId0")&&document.getElementById("chkRefineCatId0").checked&&document.getElementById("chkRefineCatId1")&&document.getElementById("chkRefineCatId1").checked)
SearchCatId="0";else if(document.getElementById("chkRefineCatId0")&&document.getElementById("chkRefineCatId0").checked)
SearchCatId="1";else if(document.getElementById("chkRefineCatId1")&&document.getElementById("chkRefineCatId1").checked)
SearchCatId="2";for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineTypeId"+i)&&document.getElementById("chkRefineTypeId"+i).checked)
{SearchTypeId+=":"+document.getElementById("chkRefineTypeId"+i).value+":";}}
for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineBedRooms"+i)&&document.getElementById("chkRefineBedRooms"+i).checked)
{SearchBedRooms+=":"+document.getElementById("chkRefineBedRooms"+i).value+":";}}
if(document.getElementById("ddlRefineMinBdgt")&&document.getElementById("ddlRefineMinBdgt").selectedIndex!=0)
SearchMinBdgt=document.getElementById("ddlRefineMinBdgt").value;if(document.getElementById("ddlRefineMaxBdgt")&&document.getElementById("ddlRefineMaxBdgt").selectedIndex!=0)
SearchMaxBdgt=document.getElementById("ddlRefineMaxBdgt").value;{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById("ctl00_ContentPlaceHolder1_divResaleProperty").innerHTML="<div style='height:250px; padding-top:150px;' align='center'>Updating Search Results<br/><br/><img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/></div>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?PropertyCategory=1&SearchZoneId="+HiddenZoneId.value+"&SearchCatId="+SearchCatId+"&SearchTypeId="+SearchTypeId+"&SearchBedRooms="+SearchBedRooms+"&SearchMinBdgt="+SearchMinBdgt+"&SearchMaxBdgt="+SearchMaxBdgt+"&SearchLocId="+SearchLocId+"&SortExp="+SortExp+"&SortDir="+SortDir+"&PageNo="+PageNo;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{document.getElementById("ctl00_ContentPlaceHolder1_divResaleProperty").innerHTML=strdata;}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}}
function ShowSearchRefineSort(DomainPath,PageNo)
{ScrollUp();document.getElementById("ddlSortExp").value=document.getElementById("ddlSortExp1").value;ShowSearchRefineResults(DomainPath,PageNo);}
function ShowCommSearchRefineSortDir(DomainPath,PageNo)
{document.getElementById("ddlSortDir").value=document.getElementById("ddlSortDir1").value;ShowCommSearchRefineResults(DomainPath,PageNo);}
function ShowCommSearchRefineSort(DomainPath,PageNo)
{ScrollUp();document.getElementById("ddlSortExp").value=document.getElementById("ddlSortExp1").value;ShowCommSearchRefineResults(DomainPath,PageNo);}
function ReferAddRows(id,strwidth)
{var tbl=document.getElementById(id);var lastRow=tbl.rows.length;var iteration=lastRow+1;var row=tbl.insertRow(lastRow);var eleType=new Array("input","input");var eleID=new Array("txtRecName","txtRecEmail");var eleAlign=new Array("left","left");var eleText=new Array("Recipient Name","Recipient Email");for(i=0;i<eleType.length;i++)
{var cell=row.insertCell(i);var el=document.createElement(eleType[i]);el.name=eleID[i]+iteration;el.id=eleID[i]+iteration;el.style.width=strwidth;el.value=eleText[i];el.type='text';el.className='TextCss';cell.style.backgroundColor='#ffffff';cell.style.textAlign=eleAlign[i];cell.style.paddingTop='8px';if(i==0)
{el.onblur=function()
{ShowText(this,'Recipient Name')}
el.onfocus=function()
{HideText(this,'Recipient Name')}
cell.style.width='50%';}
if(i==1)
{el.onblur=function()
{ShowText(this,'Recipient Email')}
el.onfocus=function()
{HideText(this,'Recipient Email')}
cell.style.paddingLeft='4px';}
cell.appendChild(el);}}
function ReferRemoveRows(id)
{var tbl=document.getElementById(id);var lastRow=tbl.rows.length;if(lastRow>1)tbl.deleteRow(lastRow-1);}
function HideText(Ele,val)
{ShowDivDisMessage(Ele);if(Ele.value!=""&&Ele.value.toLowerCase()==val.toLowerCase())
{Ele.value="";if(Ele.id.indexOf("DOB")!=-1||Ele.id.indexOf("Area")!=-1)
Ele.style.color="#000000";else
Ele.className="Text";Ele.select();}}
function ShowText(Ele,val)
{HideDivDisMessage();if((Ele.value.toLowerCase()!=val.toLowerCase()&&Ele.value=="")||(Ele.value.toLowerCase()==val.toLowerCase()&&Ele.value!=""))
{Ele.value=val;if(Ele.id.indexOf("DOB")!=-1||Ele.id.indexOf("Area")!=-1)
Ele.style.color="#e0e0e0";else
Ele.className="TextCss";}
if(Ele.id.indexOf("DOB")!=-1)
{if(Ele.value!="dd/mm/yyyy"&&Ele.value!="")
{if(!isDate(Ele.value,"true"))
{Ele.value="";Ele.focus();}}}}
function ShowDivDisMessage(Ele)
{var pleft,ptop;var message=Ele.getAttribute("message");if(message!=null&&message!="")
{var eleWidth=Ele.offsetWidth;if(typeof(Ele.offsetParent)!='undefined'){for(var posX=0,posY=0;Ele;Ele=Ele.offsetParent){posX+=Ele.offsetLeft;posY+=Ele.offsetTop;}
pleft=posX;ptop=posY}else{pleft=Ele.x;ptop=Ele.y}
var divDisMessage=document.getElementById("divDisMessage");divDisMessage.style.display="";if((parseInt(pleft)+parseInt(10)+parseInt(eleWidth))<800)
divDisMessage.style.left=parseInt(pleft)+parseInt(10)+parseInt(eleWidth)+"px";else
divDisMessage.style.left=parseInt(pleft)-(parseInt(10)+parseInt(divDisMessage.offsetWidth))+"px";divDisMessage.style.top=parseInt(ptop)+"px";if(message!=null)
divDisMessage.innerHTML=message;else
{divDisMessage.innerHTML=" "}}}
function HideDivDisMessage()
{if(document.getElementById("divDisMessage"))
{var divDisMessage=document.getElementById("divDisMessage");divDisMessage.innerHTML="";divDisMessage.style.display="none";}}
function SetSenderDetails()
{if(document.getElementById("txtName")&&getEnqCookie("UniconEnqPostName")!="")
{document.getElementById("txtName").value=getEnqCookie("UniconEnqPostName");document.getElementById("txtName").className="Text";}
if(document.getElementById("txtEmail")&&getEnqCookie("UniconEnqPostEmail")!="")
{document.getElementById("txtEmail").value=getEnqCookie("UniconEnqPostEmail");document.getElementById("txtEmail").className="Text";}}
function SendReference(DomainPath)
{var Url="";if(document.getElementById("HiddenReferUrl"))
Url=document.getElementById("HiddenReferUrl").value;var SenderName=document.getElementById("txtName")
var SenderEmail=document.getElementById("txtEmail")
var SenderComment=document.getElementById("txtMessage")
if(SenderName&&(SenderName.value.toLowerCase()=="your name"||SenderName.value==""))
return AlertMsg(SenderName,"enter Your Name");else if(SenderEmail&&(SenderEmail.value.toLowerCase()=="your email"||SenderEmail.value==""))
return AlertMsg(SenderEmail,"enter Your Email");else if(SenderEmail.value!=""&&!echeck(SenderEmail.value))
{SenderEmail.select();return false;}
for(p=1;p<999;p++)
{var RecName=document.getElementById("txtRecName"+p)
var RecEmail=document.getElementById("txtRecEmail"+p)
if(RecName&&RecEmail)
{if(RecName&&(RecName.value.toLowerCase()=="recipient name"||RecName.value==""))
return AlertMsg(RecName,"enter Recipient Name");if(RecEmail&&(RecEmail.value.toLowerCase()=="recipient email"||RecEmail.value==""))
return AlertMsg(RecEmail,"enter Recipient Email");else if(RecEmail&&RecEmail.value!=""&&!echeck(RecEmail.value))
{RecEmail.select();return false;}}
else
break;}
var strRecName="";var strRecEmail="";for(i=1;i<999;i++)
{var RecName=document.getElementById("txtRecName"+i)
var RecEmail=document.getElementById("txtRecEmail"+i)
if(RecName&&RecEmail)
{strRecName+="|"+RecName.value+"|";strRecEmail+="|"+RecEmail.value+"|";}
else
break;}
if(document.getElementById("tblTellFriend"))
document.getElementById("tblTellFriend").style.display="none";if(document.getElementById("tblSendFriend"))
document.getElementById("tblSendFriend").style.display="";SendReferenceFriend(strRecName,strRecEmail,SenderName.value,SenderEmail.value,SenderComment.value,Url,DomainPath)}
function SendReferenceFriend(RecName,RecEmail,SenderName,SenderEmail,SenderComment,Url,DomainPath)
{xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
if(document.getElementById("tdSendStatus"))
document.getElementById("tdSendStatus").innerHTML="Please wait while process finished...<br/>Please do not click <b>close</b> link or press <b>Esc</b> key or click out-side window.<br/><br/><img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/>";var url=DomainPath+"MasterPages/UniProAjax.aspx?RecName="+RecName+"&RecEmail="+RecEmail+"&SenderName="+SenderName+"&SenderEmail="+SenderEmail+"&SenderComment="+SenderComment+"&Url="+Url;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{if(document.getElementById("tdSendStatus"))
document.getElementById("tdSendStatus").innerHTML=strdata;}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);return false;}
function SendTellFriendReference(DomainPath,RPID,PropType)
{var SenderName=document.getElementById("txtName");var SenderEmail=document.getElementById("txtEmail");var SenderComment=document.getElementById("txtMessage");if(SenderName&&(SenderName.value.toLowerCase()=="your name"||SenderName.value==""))
return AlertMsg(SenderName,"enter Your Name");else if(SenderEmail&&(SenderEmail.value.toLowerCase()=="your email"||SenderEmail.value==""))
return AlertMsg(SenderEmail,"enter Your Email");else if(SenderEmail.value!=""&&!echeck(SenderEmail.value))
{SenderEmail.select();return false;}
for(p=1;p<999;p++)
{var RecName=document.getElementById("txtRecName"+p);var RecEmail=document.getElementById("txtRecEmail"+p);if(RecName&&RecEmail)
{if(RecName&&(RecName.value.toLowerCase()=="recipient name"||RecName.value==""))
return AlertMsg(RecName,"enter Recipient Name");if(RecEmail&&(RecEmail.value.toLowerCase()=="recipient email"||RecEmail.value==""))
return AlertMsg(RecEmail,"enter Recipient Email");else if(RecEmail&&RecEmail.value!=""&&!echeck(RecEmail.value))
{RecEmail.select();return false;}}
else
break;}
var strRecName="";var strRecEmail="";for(i=1;i<999;i++)
{var RecName=document.getElementById("txtRecName"+i);var RecEmail=document.getElementById("txtRecEmail"+i);if(RecName&&RecEmail)
{strRecName+="|"+RecName.value+"|";strRecEmail+="|"+RecEmail.value+"|";}
else
break;}
if(document.getElementById("tblTellFriend"))
document.getElementById("tblTellFriend").style.display="none";if(document.getElementById("tblSendFriend"))
document.getElementById("tblSendFriend").style.display="";SendTellFriendReferenceMail(strRecName,strRecEmail,SenderName.value,SenderEmail.value,SenderComment.value,DomainPath,RPID,PropType);return false;}
function SendTellFriendReferenceMail(RecName,RecEmail,SenderName,SenderEmail,SenderComment,DomainPath,RPID,PropType)
{xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
if(document.getElementById("tdSendStatus"))
document.getElementById("tdSendStatus").innerHTML="Please wait while process finished...<br/>Please do not click <b>close</b> link or press <b>Esc</b> key or click out-side window.<br/><br/><img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?RecName="+RecName+"&RecEmail="+RecEmail+"&SenderName="+SenderName+"&SenderEmail="+SenderEmail+"&SenderComment="+SenderComment+"&RPID="+RPID+"&PropType="+PropType;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{if(document.getElementById("tdSendStatus"))
document.getElementById("tdSendStatus").innerHTML=strdata;}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);return false;}
function ChangesSMMainTabOver(id)
{document.getElementById("linkSMTab"+id).className="tabSMMDivO";document.getElementById("tabSMDivL"+id).className="SMTabLDivO";document.getElementById("tabSMDivM"+id).className="SMTabMDivO";document.getElementById("tabSMDivR"+id).className="SMTabRDivO";}
function ChangesSMMainTabOut(id)
{document.getElementById("linkSMTab"+id).className="tabSMMDivN";document.getElementById("tabSMDivL"+id).className="SMTabLDivN";document.getElementById("tabSMDivM"+id).className="SMTabMDivN";document.getElementById("tabSMDivR"+id).className="SMTabRDivN";}
function ShowSMData(id)
{var divid="tdSMTabs";var subobjsource="MasterPages/UniProAjax.aspx?PropertyCategory="+id;dropdowncontent.ajaxconnect(subobjsource,divid)
document.getElementById("trResidentialSM").style.display="none";document.getElementById("trCommercialSM").style.display="none";document.getElementById("trDynamicBuilderSM").style.display="none";if(id=="1")
document.getElementById("trResidentialSM").style.display="";else if(id=="2")
document.getElementById("trCommercialSM").style.display="";else if(id=="3")
document.getElementById("trDynamicBuilderSM").style.display="";}
function ChangesMainTabOverDemo(id)
{document.getElementById("linkTab"+id).className="tabMDivO";document.getElementById("tabDivL"+id).className="TabLDivO";document.getElementById("tabDivM"+id).className="TabMDivO";document.getElementById("tabDivR"+id).className="TabRDivO";}
function ChangesMainTabOutDemo(id)
{document.getElementById("linkTab"+id).className="tabMDivN";document.getElementById("tabDivL"+id).className="TabLDivN";document.getElementById("tabDivM"+id).className="TabMDivN";document.getElementById("tabDivR"+id).className="TabRDivN";}
function ValidateProjectSearch()
{var ddlCity=document.getElementById("ddlCity");var ddlBdgtMin=document.getElementById("ctl00_ddlBdgtMin");var ddlBdgtMax=document.getElementById("ctl00_ddlBdgtMax");var HiddenSearchId=document.getElementById("ctl00_HiddenSearchId");var HiddenSearchCity=document.getElementById("ctl00_HiddenSearchCity");var ddlBedrooms=document.getElementById("ctl00_ddlBedrooms");if(ddlCity&&ddlCity.selectedIndex==0)
return AlertMsg(ddlCity,"select City");else if(ddlBdgtMin&&ddlBdgtMax&&ddlBdgtMin.selectedIndex!=0&&ddlBdgtMax.selectedIndex!=0&&parseInt(ddlBdgtMin.value)>parseInt(ddlBdgtMax.value))
return AlertMsg(ddlBdgtMin,"select Proper Range");else
{HiddenSearchId.value=ddlCity.value;HiddenSearchCity.value=ddlCity.options[ddlCity.selectedIndex].text;BdgtMin=ddlBdgtMin.options[ddlBdgtMin.selectedIndex].text;BdgtMax=ddlBdgtMax.options[ddlBdgtMax.selectedIndex].text;Bedrooms=ddlBedrooms.value;HiddenSearchCity.value=HiddenSearchCity.value+"|"+BdgtMin+"|"+BdgtMax+"|"+Bedrooms}}
function GetReplacedValue(val)
{var str=val;for(var i=0;i<val.split(" ").length;i++)
{str=str.replace(" ","-");}
for(var i=0;i<val.split("/").length;i++)
{str=str.replace("/","-");}
for(var i=0;i<val.split("&").length;i++)
{str=str.replace("&","-");}
for(var i=0;i<str.split("---").length;i++)
{str=str.replace("---","-");}
for(var i=0;i<str.split("--").length;i++)
{str=str.replace("--","-");}
return str;}
function GetSearchResult(PropertyCategory)
{var ddlType=document.getElementById("ddlType");var ddlCity=document.getElementById("ddlCity");var ddlBdgtMin=document.getElementById("ddlBdgtMin");var ddlBdgtMax=document.getElementById("ddlBdgtMax");var ddlBedrooms=document.getElementById("ddlBedrooms");var chkNew=document.getElementById("chkNew");var chkResale=document.getElementById("chkResale");var Search="";if(ddlCity&&ddlCity.selectedIndex==0)
{alert("Please select City");ddlCity.focus();return false;}
else if(chkNew&&chkResale&&!chkNew.checked&&!chkResale.checked)
{alert("Please select any Property Category");chkNew.focus();return false;}
else
{if(ddlType&&ddlType.selectedIndex!=0)
{Search+="proptype="+GetReplacedValue(ddlType.options[ddlType.selectedIndex].text);}
if(ddlCity&&ddlCity.selectedIndex!=0)
{Search=Search!=""?Search+"&":"";Search+="city="+GetReplacedValue(ddlCity.options[ddlCity.selectedIndex].text);}
if(ddlBdgtMin&&ddlBdgtMin.selectedIndex!=0)
{Search=Search!=""?Search+"&":"";Search+="minbdgt="+GetReplacedValue(ddlBdgtMin.options[ddlBdgtMin.selectedIndex].text);}
if(ddlBdgtMax&&ddlBdgtMax.selectedIndex!=0)
{Search=Search!=""?Search+"&":"";Search+="maxbdgt="+GetReplacedValue(ddlBdgtMax.options[ddlBdgtMax.selectedIndex].text);}
if(ddlBedrooms&&ddlBedrooms.selectedIndex!=0)
{Search=Search!=""?Search+"&":"";Search+="bedrooms=";Search+=ddlBedrooms.value=="5"?"4+":ddlBedrooms.value;}
if(chkNew&&chkResale&&(chkNew.checked||chkResale.checked))
{var cat="";if(chkNew.checked)
cat="new";if(chkResale.checked)
cat=cat!=""?cat+",resale":"resale";Search=Search!=""?Search+"&":"";Search+="category="+cat;}
window.location=PropertyCategory+"-property-search.aspx?"+Search.toLowerCase();}}
function RedirectOtherCity()
{if(document.getElementById("ddlOtherCity")&&document.getElementById("ddlOtherCity").value!="")
{window.location=document.getElementById("ddlOtherCity").value;}}
function ShowPartnerLead(PartnerLead,PageNo,PageSize)
{document.getElementById("ctl00_ContentPlaceHolder1_HiddenExcelSrNo").value="";var ddlValuedSearch=document.getElementById("ddlValuedSearch");var txtValuedSearch=document.getElementById("txtValuedSearch");var ValuedCondId="";var ValuedCondition="";if(ddlValuedSearch)
ValuedCondId=ddlValuedSearch.value
if(txtValuedSearch)
ValuedCondition=txtValuedSearch.value
xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
if(document.getElementById("ctl00_ContentPlaceHolder1_tdPartnerData"))
document.getElementById("ctl00_ContentPlaceHolder1_tdPartnerData").innerHTML="<div style='width:100%; text-align:center; padding-top:20px;'><img src='images/loadingAnimation.gif' alt=''/></div>";var url="MasterPages/UniProAjax.aspx?PartnerLead="+PartnerLead+"&PageNo="+PageNo+"&PageSize="+PageSize+"&ValuedCondId="+ValuedCondId+"&ValuedCondition="+ValuedCondition;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{var data=strdata.split("~")[1];if(data.indexOf("Session Expired")!=-1)
{alert("Session Expired")
window.location="Index.aspx";return;}
if(document.getElementById("ctl00_ContentPlaceHolder1_tdPartnerTab"))
document.getElementById("ctl00_ContentPlaceHolder1_tdPartnerTab").innerHTML=strdata.split("~")[0];if(document.getElementById("ctl00_ContentPlaceHolder1_tdPartnerData"))
document.getElementById("ctl00_ContentPlaceHolder1_tdPartnerData").innerHTML=strdata.split("~")[1];}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function ShowPartnerLeadPageSize(Ele,PartnerLead)
{ShowPartnerLead(PartnerLead,1,Ele.value);}
document.onkeydown=HandleEscKey;function HandleEscKey(e)
{var keycode;if(window.event)
{keycode=window.event.keyCode;}
else if(e)
{keycode=e.which;}
if(keycode==27)
{if(document.getElementById("divEnquiry"))
HideLogin('divEnquiry');if(document.getElementById("divEnlargeImage"))
HideLogin('divEnlargeImage');}}
function SetSPConditionalPropType(strval)
{var strDis=strval.split("~")[0];var strAme=strval.split("~").length>1?strval.split("~")[1]:"";var divBedrooms=document.getElementById("ctl00_ContentPlaceHolder1_divBedrooms");var divBathrooms=document.getElementById("ctl00_ContentPlaceHolder1_divBathrooms");var divBalconies=document.getElementById("ctl00_ContentPlaceHolder1_divBalconies");var divArea=document.getElementById("ctl00_ContentPlaceHolder1_divArea");var divConstStatus=document.getElementById("ctl00_ContentPlaceHolder1_divConstStatus");var divAmenity=document.getElementById("ctl00_ContentPlaceHolder1_divAmenity");var divAdditional=document.getElementById("ctl00_ContentPlaceHolder1_divAdditional");var divFloor=document.getElementById("ctl00_ContentPlaceHolder1_divFloor");var divFloorNumber=document.getElementById("ctl00_ContentPlaceHolder1_divFloorNumber");var divTotalFloors=document.getElementById("ctl00_ContentPlaceHolder1_divTotalFloors");var PropertyTypeControls=document.getElementById("ctl00_ContentPlaceHolder1_PropertyTypeControls");if(strDis.split("|")[0]=="0")
{divBedrooms.style.display="none";document.getElementById("divBathL").className="SFLabel";}
else
{divBedrooms.style.display="";document.getElementById("divBathL").className="SFNLabel";}
if(strDis.split("|")[1]=="0")
{divBathrooms.style.display="none";document.getElementById("divBalL").className="SFLabel";}
else
{divBathrooms.style.display="";document.getElementById("divBalL").className="SFNLabel";}
divBalconies.style.display=strDis.split("|")[2]=="0"?"none":"";divArea.style.display=strDis.split("|")[3].split(":")[0]=="0"?"none":"";if(strDis.split("|")[0]=="0"&&strDis.split("|")[1]=="0"&&strDis.split("|")[2]=="0")
{if(document.getElementById("divB3"))
document.getElementById("divB3").style.display="none";}
else
{if(document.getElementById("divB3"))
document.getElementById("divB3").style.display="";}
if(document.getElementById("SPHiddenAreaTypes"))
{document.getElementById("SPHiddenAreaTypes").value=strDis.split("|")[3].substr(1,strDis.split("|")[3].length);if(document.getElementById("SPHiddenAreaTypes").value!="")
{var AreaTypes=document.getElementById("SPHiddenAreaTypes").value;var AreaTypeName=new Array("","Super Area","Built-up Area","Plot Area","Carpet Area");for(var p=0;p<3;p++)
{var ddlBuilt=document.getElementById("ddlBuilt"+p);if(ddlBuilt)
{ddlBuilt.length=0;var AreaTypeId=""
for(var s=0;s<AreaTypes.split("#").length;s++)
{AreaTypeId=AreaTypes.split("#")[s].replace(":","");ListUtil.add(ddlBuilt,AreaTypeId,AreaTypeName[eval(AreaTypeId)]);}}}}}
divConstStatus.style.display=strDis.split("|")[4]=="0"?"none":"";divAmenity.style.display=strDis.split("|")[5]=="0"?"none":"";divAdditional.style.display=strDis.split("|")[6]=="0"?"none":"";divFloorNumber.style.display=strDis.split("|")[7]=="0"?"none":"";divTotalFloors.style.display=strDis.split("|")[8]=="0"?"none":"";divFloor.style.display="";if(strDis.split("|")[7]=="0"&&strDis.split("|")[8]=="0")
divFloor.style.display="none";PropertyTypeControls.value=strDis;if(strAme!="")
LoadSPAmenityList(strAme);}
function LoadSPAmenityList(strAme)
{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
var divAmeList=document.getElementById("divAmeList");divAmeList.innerHTML="<div style='float:left; width:480px; padding-top:20px; text-align:center;' align='center'><img src='Images/loadingAnimation.gif' alt=''/></div>";if(divAmeList)
{var url="MasterPages/UniProResaleAjax.aspx?SPAmeList="+strAme;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{divAmeList.innerHTML=strdata;}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}}
function RPGetElementId(id)
{var eleID;switch(id)
{case"tblResaleArea":eleID=new Array("txtArea","ddlUnit","ddlAreaType");break;}
return eleID;}
function RPGetElementType(id)
{var eleID;switch(id)
{case"tblResaleArea":eleID=new Array("input","select","select");break;}
return eleID;}
function RPAddRows(id)
{var tbl=document.getElementById(id);var lastRow=tbl.rows.length;if(lastRow==4)
return false;var iteration=lastRow;var row=tbl.insertRow(lastRow);var arrAreaUnit=new Array("sq.ft.","sq.meter","sq.yard");var arrAreaType=new Array("Super Area","Built-up Area","Plot Area","Carpet Area");var AreaTypes=document.getElementById("ctl00_ContentPlaceHolder1_SPHiddenAreaTypes").value;var AreaTypeName=new Array("","Super Area","Built-up Area","Plot Area","Carpet Area");var eleID=RPGetElementId(id);var eleType=RPGetElementType(id);for(i=0;i<eleID.length;i++)
{var cell=row.insertCell(i);var el=document.createElement(eleType[i]);el.name=eleID[i]+iteration;el.id=eleID[i]+iteration;if(i==0)
el.type='text';if(eleID[i]=="ddlUnit")
{for(s=0;s<arrAreaUnit.length;s++)
ListUtil.add(el,eval(s)+1,arrAreaUnit[s]);}
if(eleID[i]=="ddlAreaType")
{el.style.width="100px";if(AreaTypes!="")
{var AreaTypeId="";for(var s=0;s<AreaTypes.split("#").length;s++)
{AreaTypeId=AreaTypes.split("#")[s].replace(":","");ListUtil.add(el,AreaTypeId,AreaTypeName[eval(AreaTypeId)]);}}
else
{for(s=0;s<arrAreaType.length;s++)
ListUtil.add(el,eval(s)+1,arrAreaType[s]);}}
cell.appendChild(el);}}
function RPRemoveRows(id)
{var tbl=document.getElementById(id);var lastRow=tbl.rows.length;if(lastRow>1)tbl.deleteRow(lastRow-1);}
function ShowYearPossLabel(Ele)
{var spanYearPoss=document.getElementById("ctl00_ContentPlaceHolder1_spanYearPoss");if(Ele.value=="1")
spanYearPoss.innerHTML="Year Built/Age of Construction";else if(Ele.value=="2")
spanYearPoss.innerHTML="Possession Month & Year";else
spanYearPoss.innerHTML="Year Built/Possession Month & Year";}
function ShowLocationList(id,CityId,DomainPath,PropertyCategory)
{var HiddenZoneId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenZoneId");var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");var SearchCatId="0";var SearchTypeId="";var SearchBedRooms="";var SearchMinBdgt="";var SearchMaxBdgt="";var SearchLocId="";SearchLocId=HiddenLocId.value;if(document.getElementById("chkRefineCatId0")&&document.getElementById("chkRefineCatId0").checked&&document.getElementById("chkRefineCatId1")&&document.getElementById("chkRefineCatId1").checked)
SearchCatId="0";else if(document.getElementById("chkRefineCatId0")&&document.getElementById("chkRefineCatId0").checked)
SearchCatId="1";else if(document.getElementById("chkRefineCatId1")&&document.getElementById("chkRefineCatId1").checked)
SearchCatId="2";for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineTypeId"+i)&&document.getElementById("chkRefineTypeId"+i).checked)
{SearchTypeId+=":"+document.getElementById("chkRefineTypeId"+i).value+":";}}
for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineBedRooms"+i)&&document.getElementById("chkRefineBedRooms"+i).checked)
{SearchBedRooms+=":"+document.getElementById("chkRefineBedRooms"+i).value+":";}}
{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById(id).innerHTML="<img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?LocationList=True&PropertyCategory="+PropertyCategory+"&SearchZoneId="+HiddenZoneId.value+"&SearchCatId="+SearchCatId+"&SearchTypeId="+SearchTypeId+"&SearchBedRooms="+SearchBedRooms+"&SearchMinBdgt="+SearchMinBdgt+"&SearchMaxBdgt="+SearchMaxBdgt+"&SearchLocId="+SearchLocId;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{document.getElementById(id).innerHTML=strdata;}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}}
function ShowDynamicLocationList(id,CityId,DomainPath)
{var HiddenZoneId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenZoneId");var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");var PropertyCategory=document.getElementById("ctl00_ContentPlaceHolder1_HiddenPropertyCategory").value;var SearchCatId="0";var SearchTypeId="";var SearchBedRooms="";var SearchMinBdgt="";var SearchMaxBdgt="";var SearchLocId="";SearchLocId=HiddenLocId.value;if(document.getElementById("chkRefineCatId0")&&document.getElementById("chkRefineCatId0").checked&&document.getElementById("chkRefineCatId1")&&document.getElementById("chkRefineCatId1").checked)
SearchCatId="0";else if(document.getElementById("chkRefineCatId0")&&document.getElementById("chkRefineCatId0").checked)
SearchCatId="1";else if(document.getElementById("chkRefineCatId1")&&document.getElementById("chkRefineCatId1").checked)
SearchCatId="2";for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineTypeId"+i)&&document.getElementById("chkRefineTypeId"+i).checked)
{SearchTypeId+=":"+document.getElementById("chkRefineTypeId"+i).value+":";}}
for(var i=0;i<10;i++)
{if(document.getElementById("chkRefineBedRooms"+i)&&document.getElementById("chkRefineBedRooms"+i).checked)
{SearchBedRooms+=":"+document.getElementById("chkRefineBedRooms"+i).value+":";}}
{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById(id).innerHTML="<img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?DynamicLocationList=True&DynamicPropertyCategory="+PropertyCategory+"&DynamicPageZoneId="+HiddenZoneId.value+"&DynamicPageCatId="+SearchCatId+"&DynamicPageTypeId="+SearchTypeId+"&DynamicPageBedRooms="+SearchBedRooms+"&DynamicPageMinBdgt="+SearchMinBdgt+"&DynamicPageMaxBdgt="+SearchMaxBdgt+"&DynamicPageLocId="+SearchLocId;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{document.getElementById(id).innerHTML=strdata;}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}}
function ShowSelectLocation(Ele,text)
{var listSelectedLoc=document.getElementById("listSelectedLoc");var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");var selected=listSelectedLoc.innerHTML;var val=Ele.value;var chooseloc=document.getElementById("chooseloc");var removeloc=document.getElementById("removeloc");if(Ele.checked)
{if(HiddenLocId.value.indexOf(":"+val+":")==-1)
HiddenLocId.value=HiddenLocId.value+":"+val+":";if(selected=="")
{selected=text;}
else
{selected+=", "+text;}}
else
{HiddenLocId.value=HiddenLocId.value.replace(":"+val+":","");if(selected.indexOf(",")!=-1)
{if(selected.indexOf(", "+text)!=-1)
selected=selected.replace(", "+text,"");else if(selected.indexOf(text+",")!=-1)
selected=selected.replace(text+", ","");}
else
selected=selected.replace(text,"");}
listSelectedLoc.innerHTML=selected;if(selected!="")
{chooseloc.style.display="none";removeloc.style.display="";}
else
{chooseloc.style.display="";removeloc.style.display="none";}}
function ShowResidentialLocationList(id,CityId,DomainPath)
{var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById(id).innerHTML="<img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?ResidentialLocationList=True&CityId="+CityId+"&SearchLocId="+HiddenLocId.value;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{document.getElementById(id).innerHTML=strdata;}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function ShowResaleResiLocationList(id,CityId,DomainPath)
{var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById(id).innerHTML="<img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?ResaleResiLocationList=True&CityId="+CityId+"&SearchLocId="+HiddenLocId.value;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{document.getElementById(id).innerHTML=strdata;}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function checkNumber(Ele)
{var checkStr=Ele.value;var checkOK="0123456789";var allValid=true;var allNum="";for(i=0;i<checkStr.length;i++)
{ch=checkStr.charAt(i);for(j=0;j<checkOK.length;j++)
if(ch==checkOK.charAt(j))
break;if(j==checkOK.length)
{allValid=false;break;}
if(ch!=",")
allNum+=ch;}
return(allValid);}
function checkNewRows(isCheck)
{if(isCheck.split(":")[0]=="1")
{var table=document.getElementById('tbAddRows');var rowCount=table.rows.length;var str="";var areaType="";if(rowCount>=0)
{for(i=0;i<rowCount;i++)
{if(document.getElementById('txtArea'+i).value=="")
{alert('Please enter Area ');document.getElementById('txtArea'+i).focus();return false;}
else if(isNaN(document.getElementById('txtArea'+i).value))
{alert("Please enter only digit characters in the Area field.");document.getElementById('txtArea'+i).value="";document.getElementById('txtArea'+i).focus();return false;}
else if(areaType.indexOf(":"+document.getElementById('ddlBuilt'+i).value+":")!=-1)
{alert("Duplicate Area Types are not allowed.");document.getElementById('ddlBuilt'+i).focus();return false;}
if(document.getElementById('txtArea'+i).value!="")
{areaType+=":"+document.getElementById('ddlBuilt'+i).value+":";str=str+document.getElementById('txtArea'+i).value+"~"+document.getElementById('ddlArea'+i).value+"~"+document.getElementById('ddlArea'+i).options[document.getElementById('ddlArea'+i).selectedIndex].text+"~"+document.getElementById('ddlBuilt'+i).value+"~"+document.getElementById('ddlBuilt'+i).options[document.getElementById('ddlBuilt'+i).selectedIndex].text+"|";}}
document.getElementById('ctl00_ContentPlaceHolder1_HiddenArea').value=str;return true;}}
else
return true;}
function Conversion()
{var list1=document.getElementById('ctl00_ContentPlaceHolder1_ddlFrom');var list2=document.getElementById('ctl00_ContentPlaceHolder1_ddlTo');switch(list1.value)
{case"square meters":if(list2.value=="square meters")
{valueConverted=document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value;break;}
else if(list2.value=="square foot")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)*eval(10.7639104);break;}
else if(list2.value=="cents")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(40.5108);break;}
else if(list2.value=="Acres")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(4046.85);break;}
else if(list2.value=="square yards")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)*eval(1.1960);break;}
else if(list2.value=="hectare")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)*eval(10000);break;}
else if(list2.value=="grounds")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(18.15/4046.85);break;}
case"square yards":if(list2.value=="square yards")
{valueConverted=document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value;break;}
else if(list2.value=="square meter")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(1.1960);break;}
else if(list2.value=="cents")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(48.4);break;}
else if(list2.value=="hectare")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(10000/1.1960);break;}
else if(list2.value=="grounds")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(18.15/(4046.85*1.1960));break;}
else if(list2.value=="square foot")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)*eval(9);break;}
else if(list2.value=="Acres")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(4840);break;}
case"hectare":if(list2.value=="hectare")
{valueConverted=document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value;break;}
else if(list2.value=="square meter")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(10000);break;}
else if(list2.value=="square yards")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(10000/1.1960);break;}
else if(list2.value=="square foot")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)*eval(107639.1);break;}
else if(list2.value=="Acres")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(0.404686);break;}
else if(list2.value=="cents")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(40.5108/10000);break;}
else if(list2.value=="grounds")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(18.15/(4046.85*10000));break;}
case"Acres":if(list2.value=="Acres")
{valueConverted=document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value;break;}
else if(list2.value=="square meters")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)*eval(4046.85);break;}
else if(list2.value=="cents")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)*eval(100);break;}
else if(list2.value=="square yards")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)*eval(4840);break;}
else if(list2.value=="hectare")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)*eval(0.404686);break;}
else if(list2.value=="grounds")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)*eval(18.15);break;}
else if(list2.value=="square foot")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)*eval(43560);break;}
case"cents":if(list2.value=="cents")
{valueConverted=document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value;break;}
else if(list2.value=="square meters")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)*eval(40.5108);break;}
else if(list2.value=="square foot")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)*eval(435.6);break;}
else if(list2.value=="grounds")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(5.5);break;}
else if(list2.value=="Acres")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(100);break;}
else if(list2.value=="hectare")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(10000/40.5108);break;}
else if(list2.value=="square yards")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)*eval(48.4);break;}
case"square foot":if(list2.value=="square foot")
{valueConverted=document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value;break;}
else if(list2.value=="square meters")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(10.7639104);break;}
else if(list2.value=="cents")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(435.6);break;}
else if(list2.value=="square yards")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(1.1960/10.76);break;}
else if(list2.value=="Acres")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(43560);break;}
else if(list2.value=="grounds")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(2400);break;}
else if(list2.value=="hectare")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(107639.1);break;}
case"grounds":if(list2.value=="grounds")
{valueConverted=document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value;break;}
else if(list2.value=="cents")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)*eval(5.5);break;}
else if(list2.value=="square foot")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)*eval(2400);break;}
else if(list2.value=="square meters")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)*eval(4046.85/18.15);break;}
else if(list2.value=="square yards")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)*eval((4046.85*1.1960)/18.15);break;}
else if(list2.value=="Acres")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)/eval(18.15);break;}
else if(list2.value=="hectare")
{valueConverted=eval(document.getElementById('ctl00_ContentPlaceHolder1_txtConversion').value)*eval((4046.85*10000)/18.15);break;}}
document.getElementById('ctl00_ContentPlaceHolder1_txtAnswer').value=valueConverted;return false;}
function ShowCommProjectsLocationList(id,CityId,DomainPath)
{var HiddenCityId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenCityId");var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById(id).innerHTML="<img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?CommProjectsLocationList=True&CityId="+HiddenCityId.value+"&SearchLocId="+HiddenLocId.value;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{document.getElementById(id).innerHTML=strdata;}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function ShowResaleCommLocationList(id,CityId,DomainPath)
{var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById(id).innerHTML="<img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?ResaleCommLocationList=True&CityId="+CityId+"&SearchLocId="+HiddenLocId.value;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{document.getElementById(id).innerHTML=strdata;}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function ShowResaleCommEnquiryForm(DisId,RPID,DomainPath)
{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById(DisId).innerHTML="<img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?CommEnquiryForm=True&RPID="+RPID;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{if(document.getElementById(DisId))
document.getElementById(DisId).innerHTML=strdata.split("~")[0];SetExistingPostData();}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function ShowResaleResiEnquiryForm(DisId,RPID,DomainPath)
{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById(DisId).innerHTML="<img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?ResiEnquiryForm=True&RPID="+RPID;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{if(document.getElementById(DisId))
document.getElementById(DisId).innerHTML=strdata.split("~")[0];SetExistingPostData();}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function ShowResaleResiTellFriend(DisId,RPID,DomainPath)
{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById(DisId).innerHTML="<img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?TellFriend=True&RPID="+RPID;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{if(document.getElementById(DisId))
document.getElementById(DisId).innerHTML=strdata.split("~")[0];SetSenderDetails();}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function ShowResaleCommTellFriend(DisId,RPID,DomainPath)
{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById(DisId).innerHTML="<img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?CommTellFriend=True&RPID="+RPID;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{if(document.getElementById(DisId))
document.getElementById(DisId).innerHTML=strdata.split("~")[0];SetSenderDetails();}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function ShowProjectResiEnquiryForm(DisId,PID,DomainPath)
{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById(DisId).innerHTML="<img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?ProjectResiEnquiryForm=True&PID="+PID;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{if(document.getElementById(DisId))
document.getElementById(DisId).innerHTML=strdata.split("~")[0];SetExistingPostData();}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function ShowProjectResiTellFriend(DisId,PID,DomainPath)
{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById(DisId).innerHTML="<img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?ProjectTellFriend=True&PID="+PID;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{if(document.getElementById(DisId))
document.getElementById(DisId).innerHTML=strdata.split("~")[0];SetSenderDetails();}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function LoadRPPropType(Ele)
{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
var ddlPropertyType=document.getElementById("ctl00_ContentPlaceHolder1_ddlPropertyType");var spanPropertyCategory=document.getElementById("spanPropertyCategory");spanPropertyCategory.innerHTML="<img src='../ResaleImages/ajaxloader.gif' alt='' />";if(ddlPropertyType)
{ddlPropertyType.length=0;ListUtil.add(ddlPropertyType,"0","Select Property Type");var url="../MasterPages/UniProResaleAjax.aspx?SPPropertyCategory="+Ele.value;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{var str="";for(var i=0;i<strdata.split("~").length;i++)
{str=strdata.split("~")[i];ListUtil.add(ddlPropertyType,str.split("|")[0],str.split("|")[1]);}}
spanPropertyCategory.innerHTML=" ";}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}}
function LoadRPConditionalPropType(Ele)
{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
var ddlPropertyCategory=document.getElementById("ctl00_ContentPlaceHolder1_ddlPropertyCategory");if(ddlPropertyCategory)
{var url="../MasterPages/UniProResaleAjax.aspx?SPPropertyType="+Ele.value+"&SPPropertyCategory="+ddlPropertyCategory.value;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{SetRPConditionalPropType(strdata);}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}}
function SetRPConditionalPropType(strval)
{var strDis=strval.split("~")[0];var divBedrooms=document.getElementById("ctl00_ContentPlaceHolder1_divBedrooms");var divBathrooms=document.getElementById("ctl00_ContentPlaceHolder1_divBathrooms");var divBalconies=document.getElementById("ctl00_ContentPlaceHolder1_divBalconies");var divArea=document.getElementById("ctl00_ContentPlaceHolder1_divArea");var divConstStatus=document.getElementById("ctl00_ContentPlaceHolder1_divConstStatus");var divAdditional=document.getElementById("ctl00_ContentPlaceHolder1_divAdditional");var PropertyTypeControls=document.getElementById("ctl00_ContentPlaceHolder1_PropertyTypeControls");if(strDis.split("|")[0]=="0")
{divBedrooms.style.display="none";document.getElementById("divBathL").className="SFALabel";}
else
{divBedrooms.style.display="";document.getElementById("divBathL").className="SFNALabel";}
if(strDis.split("|")[1]=="0")
{divBathrooms.style.display="none";document.getElementById("divBalL").className="SFALabel";}
else
{divBathrooms.style.display="";document.getElementById("divBalL").className="SFNALabel";}
divBalconies.style.display=strDis.split("|")[2]=="0"?"none":"";divArea.style.display=strDis.split("|")[3].split(":")[0]=="0"?"none":"";if(document.getElementById("ctl00_ContentPlaceHolder1_SPHiddenAreaTypes"))
{document.getElementById("ctl00_ContentPlaceHolder1_SPHiddenAreaTypes").value=strDis.split("|")[3].substr(1,strDis.split("|")[3].length);if(document.getElementById("ctl00_ContentPlaceHolder1_SPHiddenAreaTypes").value!="")
{var AreaTypes=document.getElementById("ctl00_ContentPlaceHolder1_SPHiddenAreaTypes").value;var AreaTypeName=new Array("","Super Area","Built-up Area","Plot Area","Carpet Area");for(var p=0;p<3;p++)
{var ddlAreaType=document.getElementById("ddlAreaType"+p);if(ddlAreaType)
{ddlAreaType.length=0;var AreaTypeId=""
for(var s=0;s<AreaTypes.split("#").length;s++)
{AreaTypeId=AreaTypes.split("#")[s].replace(":","");ListUtil.add(ddlAreaType,AreaTypeId,AreaTypeName[eval(AreaTypeId)]);}}}}}
divConstStatus.style.display=strDis.split("|")[4]=="0"?"none":"";divAdditional.style.display=strDis.split("|")[6]=="0"?"none":"";PropertyTypeControls.value=strDis;}
function SPOnMouseOver(Ele)
{tblSymbol=document.getElementById("tblSymbolSearch");countRow=tblSymbol.rows.length;for(i=0;i<countRow;i++)
{symbolRow=tblSymbol.getElementsByTagName("tr")[i];if(Ele.id==symbolRow.id)
rowCount=i;if(symbolRow.className=="selected")
symbolRow.className="unselected";}
Ele.className="selected";}
function SPOnMouseClick(Ele)
{var txtKeywordSearch=document.getElementById("ctl00_ContentPlaceHolder1_txtLocality");var divKeywordSearchList=document.getElementById("ctl00_ContentPlaceHolder1_divLocList");var HiddenKeySearchId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");var rowId=Ele.id.split("|");HiddenKeySearchId.value=rowId[0];txtKeywordSearch.value=rowId[2];divKeywordSearchList.innerHTML="";divKeywordSearchList.style.display="none";}
function MM_showHideLayers(){var i,p,v,obj,args=MM_showHideLayers.arguments;for(i=0;i<(args.length-2);i+=3)
with(document)if(getElementById&&((obj=getElementById(args[i]))!=null)){v=args[i+2];if(obj.style){obj=obj.style;v=(v=='show')?'visible':(v=='hide')?'hidden':v;}
obj.visibility=v;}}
function ShowSearchHotLocation(disid,PropertyCategory,DomainPath)
{var xmlHttp=GetXmlHttpObject();if(xmlHttp==null)
{alert("Your browser does not support AJAX!");return;}
document.getElementById(disid).innerHTML="<div style='float:left; width:730px; padding-top:20px; text-align:center;' align='center'><img src='"+DomainPath+"Images/loadingAnimation.gif' alt=''/></div>";var url=DomainPath+"MasterPages/UniProResaleAjax.aspx?ShowHotLocation=True&PropertyCategory="+PropertyCategory;xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{var strdata=xmlHttp.responseText;if(strdata!="")
{if(document.getElementById(disid))
document.getElementById(disid).innerHTML=strdata;}}};xmlHttp.open("GET",url,true);xmlHttp.send(null);}
function WebForm_FireDefaultButton(event,target){if(event.keyCode==13){var src=event.srcElement||event.target;if(!src||(src.tagName.toLowerCase()!="textarea")){var defaultButton;{defaultButton=document.all[target];}
if(defaultButton&&typeof(defaultButton.click)!="undefined"){defaultButton.click();event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;}}}
return true;}
function ValidateRefineMinMaxBdgt()
{var ddlRefineMinBdgt=document.getElementById("ddlRefineMinBdgt");var ddlRefineMaxBdgt=document.getElementById("ddlRefineMaxBdgt");if(ddlRefineMinBdgt&&ddlRefineMaxBdgt&&ddlRefineMinBdgt.selectedIndex!=0&&ddlRefineMaxBdgt.selectedIndex!=0&&eval(ddlRefineMinBdgt.value)>=eval(ddlRefineMaxBdgt.value))
{alert("Please select proper range");ddlRefineMaxBdgt.selectedIndex=0;ddlRefineMaxBdgt.focus();return false;}}
function ActiveTab(id)
{document.getElementById("divMP"+id+"L").className="InnerTabOnL";document.getElementById("divMP"+id+"M").className="InnerTabOnM";document.getElementById("divMP"+id+"R").className="InnerTabOnR";}
function DeactiveTab(id)
{document.getElementById("divMP"+id+"L").className="InnerTabL";document.getElementById("divMP"+id+"M").className="InnerTabM";document.getElementById("divMP"+id+"R").className="InnerTabR";}
function PPShowSelected()
{var HiddenWant=document.getElementById("ctl00_ContentPlaceHolder1_HiddenWant");var HiddenSrNo=document.getElementById("ctl00_ContentPlaceHolder1_HiddenSrNo");var rdoSell=document.getElementById("ctl00_ContentPlaceHolder1_rdoSell");var rdoRent=document.getElementById("ctl00_ContentPlaceHolder1_rdoRent");var rdoCopLease=document.getElementById("ctl00_ContentPlaceHolder1_rdoCopLease");var rdoPG=document.getElementById("ctl00_ContentPlaceHolder1_rdoPG");if(HiddenSrNo.value!="0")
{if(HiddenWant.value=="Sell")
{PPGetBudgetRange(rdoSell);}
else if(HiddenWant.value=="Rent")
{PPGetBudgetRange(rdoRent);}
else if(HiddenWant.value=="CopLease")
{PPGetBudgetRange(rdoCopLease);}
else if(HiddenWant.value=="PG")
{PPGetBudgetRange(rdoPG);}}}
function PPGetPropertyType(Ele)
{PPLoadPropertyType(Ele.value);var trRes1=document.getElementById("ctl00_ContentPlaceHolder1_trRes1");var trRes2=document.getElementById("ctl00_ContentPlaceHolder1_trRes2");if(trRes1&&trRes2&&Ele.value=="1")
{trRes1.style.display="";trRes2.style.display="";}
else if(trRes1&&trRes2&&Ele.value=="2")
{trRes1.style.display="none";trRes2.style.display="none";}}
function PPShowPropertyType(Ele)
{var chkResiType=document.getElementById("ctl00_ContentPlaceHolder1_chkResiType");var chkCommType=document.getElementById("ctl00_ContentPlaceHolder1_chkCommType");if(Ele.value=="1")
{chkResiType.style.display="";chkCommType.style.display="none";}
else if(Ele.value=="2")
{chkResiType.style.display="none";chkCommType.style.display="";}
else
{chkResiType.style.display="none";chkCommType.style.display="none";}}
function PPGetCityMaster(Ele)
{if(Ele.value!="")
PPLoadCityMaster(Ele.value);else
{var EleCity;if(document.getElementById("ctl00_ContentPlaceHolder1_ddlCity"))
EleCity=document.getElementById("ctl00_ContentPlaceHolder1_ddlCity");else if(document.getElementById("ddlCity"))
EleCity=document.getElementById("ddlCity");EleCity.length=0;ListUtil.add(EleCity,"","Select City");}}
function PPGetLocationMaster(Ele)
{var EleState;var EleLocation;var txtCity=document.getElementById("ctl00_ContentPlaceHolder1_txtCity");var txtLocation=document.getElementById("ctl00_ContentPlaceHolder1_txtLocation");if(document.getElementById("ctl00_ContentPlaceHolder1_ddlLocation"))
EleLocation=document.getElementById("ctl00_ContentPlaceHolder1_ddlLocation");else if(document.getElementById("ddlLocation"))
EleLocation=document.getElementById("ddlLocation");EleLocation.style.display="";txtCity.style.display="none";txtLocation.style.display="none";if(Ele.value!=""&&Ele.value!="-1")
{if(document.getElementById("ctl00_ContentPlaceHolder1_ddlState"))
EleState=document.getElementById("ctl00_ContentPlaceHolder1_ddlState");else if(document.getElementById("ddlState"))
EleState=document.getElementById("ddlState");PPLoadLocationMaster(EleState.value,Ele.value);}
else if(Ele.value=="")
{EleLocation.length=0;ListUtil.add(EleLocation,"","Select Location");}
else if(Ele.value=="-1")
{EleLocation.style.display="none";txtCity.style.display="";txtLocation.style.display="";}}
function PPCheckLocation(Ele)
{var txtLocation=document.getElementById("ctl00_ContentPlaceHolder1_txtLocation");if(Ele.value!="-1")
{txtLocation.style.display="none";var EleState;var EleCity;if(document.getElementById("ctl00_ContentPlaceHolder1_ddlState"))
EleState=document.getElementById("ctl00_ContentPlaceHolder1_ddlState");else if(document.getElementById("ddlState"))
EleState=document.getElementById("ddlState");if(document.getElementById("ctl00_ContentPlaceHolder1_ddlCity"))
EleCity=document.getElementById("ctl00_ContentPlaceHolder1_ddlCity");else if(document.getElementById("ddlCity"))
EleCity=document.getElementById("ddlCity");PPLoadSubLocationMaster(EleState.value,EleCity.value,Ele.value)}
else if(Ele.value=="-1")
txtLocation.style.display="";}
function PPGetBudgetRange(Ele)
{var id=Ele.id;var txtPrice;var val="";if(id.indexOf("Sell")!=-1)
{txtPrice=document.getElementById("ctl00_ContentPlaceHolder1_txtPrice");if(txtPrice.value.indexOf("Enter")==-1)
val=CheckRange("1",txtPrice.value);else
val="";ShowPG("none");ShowSellRent("Sell","Rent");PPLoadBudgetRange(document.getElementById("ctl00_ContentPlaceHolder1_ddlPrice"),"1",val);}
else if(id.indexOf("Rent")!=-1)
{txtPrice=document.getElementById("ctl00_ContentPlaceHolder1_txtRent");if(txtPrice.value.indexOf("Enter")==-1)
val=CheckRange("2",txtPrice.value);else
val="";ShowPG("none");ShowSellRent("Rent","Sell");PPLoadBudgetRange(document.getElementById("ctl00_ContentPlaceHolder1_ddlRent"),"2",val);}
else if(id.indexOf("CopLease")!=-1)
{txtPrice=document.getElementById("ctl00_ContentPlaceHolder1_txtRent");if(txtPrice.value.indexOf("Enter")==-1)
val=CheckRange("3",txtPrice.value);else
val="";ShowPG("none");ShowSellRent("Rent","Sell");PPLoadBudgetRange(document.getElementById("ctl00_ContentPlaceHolder1_ddlRent"),"3",val);}
else if(id.indexOf("PG")!=-1)
{txtPrice=document.getElementById("ctl00_ContentPlaceHolder1_txtRent");if(txtPrice.value.indexOf("Enter")==-1)
val=CheckRange("2",txtPrice.value);else
val="";ShowPG("");ShowSellRent("Rent","Sell");PPLoadBudgetRange(document.getElementById("ctl00_ContentPlaceHolder1_ddlRent"),"2",val);}}
function SetPriceRange(Ele)
{var UserType;var ddlBudget;if(Ele.value!="")
{if(document.getElementById("ctl00_ContentPlaceHolder1_rdoSell").checked)
{UserType="1";ddlBudget=document.getElementById("ctl00_ContentPlaceHolder1_ddlPrice")}
else if(document.getElementById("ctl00_ContentPlaceHolder1_rdoRent").checked||document.getElementById("ctl00_ContentPlaceHolder1_rdoPG").checked)
{UserType="2";ddlBudget=document.getElementById("ctl00_ContentPlaceHolder1_ddlRent")}
else if(document.getElementById("ctl00_ContentPlaceHolder1_rdoCopLease").checked)
{UserType="3";ddlBudget=document.getElementById("ctl00_ContentPlaceHolder1_ddlRent")}
ddlBudget.value=CheckRange(UserType,Ele.value);}
else
{if(Ele.id.indexOf("Rent")!=-1)
{ddlBudget=document.getElementById("ctl00_ContentPlaceHolder1_ddlRent");Ele.value="Enter Monthly Rent";}
else if(Ele.id.indexOf("Price")!=-1)
{ddlBudget=document.getElementById("ctl00_ContentPlaceHolder1_ddlPrice");Ele.value="Enter Property Price";}
Ele.className="TextCss";ddlBudget.selectedIndex=0;}}
function CheckRange(type,price)
{if(type=="1")
{if(eval(price)<eval(500000))
return"1";else if(eval(price)>=eval(500000)&&eval(price)<=eval(1000000))
return"2";else if(eval(price)>=eval(1000000)&&eval(price)<=eval(1500000))
return"3";else if(eval(price)>=eval(1500000)&&eval(price)<=eval(2500000))
return"4";else if(eval(price)>=eval(2500000)&&eval(price)<=eval(5000000))
return"5";else if(eval(price)>=eval(5000000)&&eval(price)<=eval(7500000))
return"6";else if(eval(price)>=eval(7500000)&&eval(price)<=eval(10000000))
return"7";else if(eval(price)>=eval(10000000)&&eval(price)<=eval(12500000))
return"8";else if(eval(price)>=eval(12500000)&&eval(price)<=eval(15000000))
return"9";else if(eval(price)>=eval(15000000)&&eval(price)<=eval(20000000))
return"10";else if(eval(price)>=eval(20000000)&&eval(price)<=eval(40000000))
return"11";else if(eval(price)>=eval(40000000)&&eval(price)<=eval(70000000))
return"12";else if(eval(price)>=eval(70000000)&&eval(price)<=eval(100000000))
return"13";else if(eval(price)>=eval(100000000)&&eval(price)<=eval(150000000))
return"14";else if(eval(price)>=eval(150000000)&&eval(price)<=eval(200000000))
return"15";else if(eval(price)>=eval(200000000)&&eval(price)<=eval(250000000))
return"16";else if(eval(price)>=eval(250000000)&&eval(price)<=eval(300000000))
return"17";else if(eval(price)>=eval(300000000)&&eval(price)<=eval(350000000))
return"18";else if(eval(price)>=eval(350000000)&&eval(price)<=eval(500000000))
return"19";else if(eval(price)>=eval(500000000)&&eval(price)<=eval(1000000000))
return"20";else if(eval(price)>eval(1000000000))
return"21";}
else if(type=="2")
{if(eval(price)<eval(5000))
return"22";else if(eval(price)>=eval(5001)&&eval(price)<=eval(7500))
return"23";else if(eval(price)>=eval(7501)&&eval(price)<=eval(10000))
return"24";else if(eval(price)>=eval(10001)&&eval(price)<=eval(15000))
return"25";else if(eval(price)>=eval(15001)&&eval(price)<=eval(20000))
return"26";else if(eval(price)>=eval(20001)&&eval(price)<=eval(30000))
return"27";else if(eval(price)>=eval(30001)&&eval(price)<=eval(50000))
return"28";else if(eval(price)>=eval(50001)&&eval(price)<=eval(75000))
return"29";else if(eval(price)>=eval(75001)&&eval(price)<=eval(100000))
return"30";else if(eval(price)>=eval(100000)&&eval(price)<=eval(150000))
return"31";else if(eval(price)>=eval(150000)&&eval(price)<=eval(200000))
return"32";else if(eval(price)>=eval(200000)&&eval(price)<=eval(300000))
return"33";else if(eval(price)>=eval(300000)&&eval(price)<=eval(500000))
return"34";else if(eval(price)>=eval(500000)&&eval(price)<=eval(1000000))
return"35";else if(eval(price)>eval(1000000))
return"36";}
else if(type=="3")
{if(eval(price)<eval(50000))
return"37";else if(eval(price)>=eval(50001)&&eval(price)<=eval(75000))
return"38";else if(eval(price)>=eval(75001)&&eval(price)<=eval(100000))
return"39";else if(eval(price)>=eval(100000)&&eval(price)<=eval(150000))
return"40";else if(eval(price)>=eval(150000)&&eval(price)<=eval(200000))
return"41";else if(eval(price)>=eval(200000)&&eval(price)<=eval(300000))
return"42";else if(eval(price)>=eval(300000)&&eval(price)<=eval(500000))
return"43";else if(eval(price)>=eval(500000)&&eval(price)<=eval(1000000))
return"44";else if(eval(price)>eval(1000000))
return"45";}}
function PPAGetElementId(id)
{var eleID;switch(id)
{case"tblExtFeat":eleID=new Array("lblExtFeat","txtExtFeat");break;case"tblExtFac":eleID=new Array("txtExtFac");break;case"tblIntFeat":eleID=new Array("lblIntFeat","txtIntFeat");break;case"tblIntFac":eleID=new Array("txtIntFac");break;}
return eleID;}
function PPAGetElementText(id)
{var eleID;switch(id)
{case"tblExtFeat":eleID=new Array("Enter Label","Enter Description");break;case"tblExtFac":eleID=new Array("Enter External Facility");break;case"tblIntFeat":eleID=new Array("Enter Label","Enter Description");break;case"tblIntFac":eleID=new Array("Enter Internal Facility");break;}
return eleID;}
function PPAAddRows(id)
{var tbl=document.getElementById(id);var lastRow=tbl.rows.length;var iteration=lastRow;var row=tbl.insertRow(lastRow);var eleID=PPAGetElementId(id);var eleText=PPAGetElementText(id);for(i=0;i<eleID.length;i++)
{var cell=row.insertCell(i);var el=document.createElement("input");el.name=eleID[i]+iteration;el.id=eleID[i]+iteration;if(i==0)
{if(el.id.indexOf("Feat")!=-1)
cell.style.width="250px";cell.style.paddingLeft="20px";}
el.onblur=new Function("javascript:ShowText(this,'"+eleText[i]+"')");el.onfocus=new Function("javascript:HideText(this,'"+eleText[i]+"')");el.value=eleText[i];el.type='text';el.className='TextCss';el.maxLength=50;cell.style.backgroundColor='#ffffff';cell.style.textAlign="left";cell.appendChild(el);}}
function PPARemoveRows(id)
{var tbl=document.getElementById(id);var lastRow=tbl.rows.length;if(lastRow>0)tbl.deleteRow(lastRow-1);}
function PPAttGetFileType(type)
{var eleOption;switch(type)
{case"Picture":eleOption=new Array("Front View","Side View","Balcony","Bathroom","Kitchen","Dinning Room","Bed Room","Master Bed Room","Study Room","Library","Drawing Room","Garden","Sunset view","Trainning Room","Meeting Room","Main Entrace","Terrace");break;case"FloorPlan":eleOption=new Array("Floor Plan","3D Layout","Elevation","Aerial View","Location Map");break;case"Video":eleOption=new Array("Walkthrough","Inside Video","Outside Video");break;case"Document":eleOption=new Array("Brochure","Price List","Specifications");break;}
return eleOption;}
function PPAttGetElementId(id)
{var eleID;switch(id)
{case"tblPicture":eleID=new Array("ddlPicture","spanPicture");break;case"tblFloorPlan":eleID=new Array("ddlFloorPlan","spanFloorPlan");break;case"tblVideo":eleID=new Array("ddlVideo","txtVideo");break;case"tblDocument":eleID=new Array("ddlDocument","spanDocument");break;}
return eleID;}
function PPAttGetElementType(id)
{var eleType;switch(id)
{case"tblPicture":eleType=new Array("select","span");break;case"tblFloorPlan":eleType=new Array("select","span");break;case"tblVideo":eleType=new Array("select","input");break;case"tblDocument":eleType=new Array("select","span");break;}
return eleType;}
function PPAttGetElementText(id)
{var eleID;switch(id)
{case"tblPicture":eleID=new Array("","Upload File");break;case"tblFloorPlan":eleID=new Array("","Upload File");break;case"tblVideo":eleID=new Array("","Upload File");break;case"tblDocument":eleID=new Array("","Upload File");break;}
return eleID;}
function PPAttCheckValue(tbl)
{var lastRow=tbl.rows.length;var retVal=true;switch(tbl.id)
{case"tblPicture":if(document.getElementById("spanPicture"+lastRow).innerHTML=="Upload File")
retVal=false;break;case"tblFloorPlan":if(document.getElementById("spanFloorPlan"+lastRow).innerHTML=="Upload File")
retVal=false;break;case"tblVideo":if(document.getElementById("txtVideo"+lastRow).value.toLowerCase()=="http://")
retVal=false;break;case"tblDocument":if(document.getElementById("spanDocument"+lastRow).innerHTML=="Upload File")
retVal=false;break;}
return retVal;}
function PPAttAddRows(id)
{var tbl=document.getElementById(id);if(PPAttCheckValue(tbl))
{var lastRow=tbl.rows.length;if(lastRow==10)
{alert("You can add 10 files only");return false;}
var iteration=lastRow+1;var row=tbl.insertRow(lastRow);var rdoPic=document.getElementById("ctl00_ContentPlaceHolder1_rdoPic");var rdoFloor=document.getElementById("ctl00_ContentPlaceHolder1_rdoFloor");var rdoVideo=document.getElementById("ctl00_ContentPlaceHolder1_rdoVideo");var rdoDoc=document.getElementById("ctl00_ContentPlaceHolder1_rdoDoc")
var eleFileType;if(rdoPic.checked)
eleFileType="Picture";else if(rdoFloor.checked)
eleFileType="FloorPlan";else if(rdoVideo.checked)
eleFileType="Video";else if(rdoDoc.checked)
eleFileType="Document";var eleType=PPAttGetElementType(id);var eleID=PPAttGetElementId(id);var eleText=PPAttGetElementText(id);var eleOption=PPAttGetFileType(eleFileType);for(i=0;i<eleID.length;i++)
{var cell=row.insertCell(i);var el=document.createElement(eleType[i]);el.name=eleID[i]+iteration;el.id=eleID[i]+iteration;if(eleType[i]=="span")
{el.innerHTML=eleText[i];el.className='Link';el.style.cursor="pointer";el.onclick=new Function("javascript:ShowFileUpload('"+eleID[i]+iteration+"','"+eleText[i]+"','-250','-200')");cell.style.backgroundColor='#ffffff';cell.style.textAlign="left";}
else if(eleType[i]=="input")
{el.type='text';el.className='Text';el.value='http://';el.onblur=new Function("javascript:PPAttCheckURL(this)");cell.style.backgroundColor='#ffffff';cell.style.textAlign="left";}
else if(eleType[i]=="select")
{el.length=0;for(p=0;p<eleOption.length;p++)
{ListUtil.add(el,""+eval(p+1)+"",eleOption[p]);}
ListUtil.add(el,"-1","Other");el.className="DropDownCss";cell.style.width="250px";cell.style.paddingLeft="20px";}
cell.appendChild(el);}}
else
{alert("Please add value");}}
function PPAttRemoveRows(id)
{var tbl=document.getElementById(id);var lastRow=tbl.rows.length;if(lastRow>1)tbl.deleteRow(lastRow-1);}
function PPAttShowAttchment(id)
{document.getElementById("ctl00_ContentPlaceHolder1_trPicture").style.display="none";document.getElementById("ctl00_ContentPlaceHolder1_trFloorPlan").style.display="none";document.getElementById("ctl00_ContentPlaceHolder1_trVideo").style.display="none";document.getElementById("ctl00_ContentPlaceHolder1_trDocument").style.display="none";document.getElementById("ctl00_ContentPlaceHolder1_tr"+id).style.display="";var ddlCaption=document.getElementById("ctl00_ContentPlaceHolder1_ddlCaption");ddlCaption.length=0;var eleOption=PPAttGetFileType(id);for(p=0;p<eleOption.length;p++)
{ListUtil.add(ddlCaption,""+eval(p+1)+"",eleOption[p]);}
ListUtil.add(ddlCaption,"-1","Other");if(id.indexOf("Picture")!=-1)
{document.getElementById("tdFile").innerHTML="File (800 X 480)";for(i=1;i<5;i++)
{if(document.getElementById("trImage"+i))
document.getElementById("trImage"+i).style.display="";}}
else
{document.getElementById("tdFile").innerHTML="File";for(i=1;i<5;i++)
{if(document.getElementById("trImage"+i))
document.getElementById("trImage"+i).style.display="none";}}}
function PPAttCheckURL(Ele)
{if(Ele.value.toLowerCase().indexOf("http://")==-1)
{alert("URL path should be start with http://");Ele.value="http://";Ele.focus();}}
function PPAttSaveCap()
{var rdoPic=document.getElementById("ctl00_ContentPlaceHolder1_rdoPic")
var rdoFloor=document.getElementById("ctl00_ContentPlaceHolder1_rdoFloor")
var rdoVideo=document.getElementById("ctl00_ContentPlaceHolder1_rdoVideo")
var rdoDoc=document.getElementById("ctl00_ContentPlaceHolder1_rdoDoc")
var FileUpload=document.getElementById("ctl00_ContentPlaceHolder1_FileUpload");var FileUpload1=document.getElementById("ctl00_ContentPlaceHolder1_FileUpload1");var FileUpload2=document.getElementById("ctl00_ContentPlaceHolder1_FileUpload2");var FileUpload3=document.getElementById("ctl00_ContentPlaceHolder1_FileUpload3");var FileUpload4=document.getElementById("ctl00_ContentPlaceHolder1_FileUpload4");var txtURL=document.getElementById("ctl00_ContentPlaceHolder1_txtURL");var ddlCaption=document.getElementById("ctl00_ContentPlaceHolder1_ddlCaption");var HiddenCaption=document.getElementById("ctl00_ContentPlaceHolder1_HiddenCaption");var FileName=FileUpload.value;var FileName1=FileUpload1.value;var FileName2=FileUpload2.value;var FileName3=FileUpload3.value;var FileName4=FileUpload4.value;var URLPath=txtURL.value;if(FileUpload&&FileName=="")
return AlertMsg(FileUpload,"attach file");else if(rdoPic&&FileUpload&&rdoPic.checked&&(FileName.toLowerCase().indexOf(".bmp")==-1&&FileName.toLowerCase().indexOf(".gif")==-1&&FileName.toLowerCase().indexOf(".png")==-1&&FileName.toLowerCase().indexOf(".jpeg")==-1&&FileName.toLowerCase().indexOf(".jpg")==-1))
return AlertMsg(FileUpload,"upload file, has extension .bmp | .gif | .png | .jpeg | .jpg only");else if(rdoPic.checked&&FileUpload1&&FileName1=="")
return AlertMsg(FileUpload1,"attach file");else if(rdoPic&&FileUpload1&&rdoPic.checked&&(FileName1.toLowerCase().indexOf(".bmp")==-1&&FileName1.toLowerCase().indexOf(".gif")==-1&&FileName1.toLowerCase().indexOf(".png")==-1&&FileName1.toLowerCase().indexOf(".jpeg")==-1&&FileName1.toLowerCase().indexOf(".jpg")==-1))
return AlertMsg(FileUpload1,"upload file, has extension .bmp | .gif | .png | .jpeg | .jpg only");else if(rdoPic.checked&&FileUpload2&&FileName2=="")
return AlertMsg(FileUpload2,"attach file");else if(rdoPic&&FileUpload2&&rdoPic.checked&&(FileName2.toLowerCase().indexOf(".bmp")==-1&&FileName2.toLowerCase().indexOf(".gif")==-1&&FileName2.toLowerCase().indexOf(".png")==-1&&FileName2.toLowerCase().indexOf(".jpeg")==-1&&FileName2.toLowerCase().indexOf(".jpg")==-1))
return AlertMsg(FileUpload2,"upload file, has extension .bmp | .gif | .png | .jpeg | .jpg only");else if(rdoPic.checked&&FileUpload3&&FileName3=="")
return AlertMsg(FileUpload3,"attach file");else if(rdoPic&&FileUpload3&&rdoPic.checked&&(FileName3.toLowerCase().indexOf(".bmp")==-1&&FileName3.toLowerCase().indexOf(".gif")==-1&&FileName3.toLowerCase().indexOf(".png")==-1&&FileName3.toLowerCase().indexOf(".jpeg")==-1&&FileName3.toLowerCase().indexOf(".jpg")==-1))
return AlertMsg(FileUpload3,"upload file, has extension .bmp | .gif | .png | .jpeg | .jpg only");else if(rdoPic.checked&&FileUpload4&&FileName4=="")
return AlertMsg(FileUpload4,"attach file");else if(rdoPic&&FileUpload4&&rdoPic.checked&&(FileName4.toLowerCase().indexOf(".bmp")==-1&&FileName4.toLowerCase().indexOf(".gif")==-1&&FileName4.toLowerCase().indexOf(".png")==-1&&FileName4.toLowerCase().indexOf(".jpeg")==-1&&FileName4.toLowerCase().indexOf(".jpg")==-1))
return AlertMsg(FileUpload4,"upload file, has extension .bmp | .gif | .png | .jpeg | .jpg only");else if(rdoDoc&&FileUpload&&rdoDoc.checked&&FileName.indexOf(".pdf")==-1)
return AlertMsg(FileUpload,"upload file, has extension .pdf only");HiddenCaption.value=ddlCaption.value;}
function PPAttStoreAttchments()
{var PictureCap=document.getElementById("ctl00_ContentPlaceHolder1_PictureCap");var Picture=document.getElementById("ctl00_ContentPlaceHolder1_Picture");var FloorPlanCap=document.getElementById("ctl00_ContentPlaceHolder1_FloorPlanCap");var FloorPlan=document.getElementById("ctl00_ContentPlaceHolder1_FloorPlan");var VideoCap=document.getElementById("ctl00_ContentPlaceHolder1_VideoCap");var Video=document.getElementById("ctl00_ContentPlaceHolder1_Video");var DocumentCap=document.getElementById("ctl00_ContentPlaceHolder1_DocumentCap");var Document=document.getElementById("ctl00_ContentPlaceHolder1_Document");var ddlPictureCap,spanPicture;var ddlFloorPlanCap,spanFloorPlan;var ddlVideoCap,txtVideo;var ddlDocumentCap,spanDocument;PictureCap.value="";Picture.value="";FloorPlanCap.value="";FloorPlan.value="";VideoCap.value="";Video.value="";DocumentCap.value="";Document.value="";for(i=1;i<=10;i++)
{if(document.getElementById("ddlPicture"+i))
{PictureCap.value+="|"+document.getElementById("ddlPicture"+i).value;Picture.value+="|"+document.getElementById("spanPicture"+i).value;}
if(document.getElementById("ddlFloorPlan"+i))
{FloorPlanCap.value+="|"+document.getElementById("ddlFloorPlan"+i).value;FloorPlan.value+="|"+document.getElementById("spanFloorPlan"+i).value;}
if(document.getElementById("ddlVideo"+i))
{VideoCap.value+="|"+document.getElementById("ddlVideo"+i).value;Video.value+="|"+document.getElementById("txtVideo"+i).value;}
if(document.getElementById("ddlDocument"+i))
{DocumentCap.value+="|"+document.getElementById("ddlDocument"+i).value;Document.value+="|"+document.getElementById("spanDocument"+i).value;}}}
function ShowHomeLoanData(id)
{for(i=0;i<5;i++)
{if(document.getElementById("divHL"+i+"L"))
{document.getElementById("divHL"+i+"L").className="InnerTabL";document.getElementById("divHL"+i+"M").className="InnerTabM";document.getElementById("divHL"+i+"R").className="InnerTabR";document.getElementById("div"+i).style.display="none";}}
document.getElementById("divHL"+id+"L").className="InnerTabOnL";document.getElementById("divHL"+id+"M").className="InnerTabOnM";document.getElementById("divHL"+id+"R").className="InnerTabOnR";document.getElementById("div"+id).style.display="";}
var num=0;var amt=0;var per=0;var months=0;var nls="";var rr="\r";var b="                               ";var d="-----------------------------"
+"----------------------------------";var s="Rs. ";function iA()
{this.length=iA.arguments.length;for(var i=0;i<this.length;i++)
{this[i]=iA.arguments[i];}}
var pwr=new iA(10);var dec=new iA(16);pwr[0]=1;for(var i=0;i<9;i++){pwr[i+1]=pwr[i]*10;}
dec[0]=.1;dec[1]=.01;dec[2]=.001;dec[3]=.0001;dec[4]=.00001;dec[5]=.000001;dec[6]=.0000001;dec[7]=.00000001;dec[8]=.000000001;dec[9]=.0000000001;dec[10]=.00000000001;dec[11]=.000000000001;dec[12]=.0000000000001;dec[13]=.00000000000001;dec[14]=.000000000000001;dec[15]=.0000000000000001;var ns="01234567890";var cr="";var str="";function stn()
{num=0;pos=str.indexOf(".");sfx="";if(pos>-1)
{sfx=str.substring(pos+1,str.length);str=str.substring(0,pos);}
strl=str.length;for(var i=strl-1;i>-1;i--)
{cr=str.substring(i,i+1);pos=ns.indexOf(cr);num+=pos*pwr[strl-i-1];}
if(sfx!=""&&sfx.length>dp)
{pos=ns.indexOf(sfx.charAt(dp+1));if(pos>4)
{pos=ns.indexOf(sfx.charAt(dp));sfx=sfx.substring(0,dp-1)+(pos+1);}}
if(sfx!="")
{for(var i=0;i<dp;i++)
{cr=sfx.substring(i,i+1);pos=ns.indexOf(cr);num+=pos*dec[i];}}}
function GetAmortization()
{str=document.getElementById("txtAmt").value;fmtIt();bl=str.length+3;dp=2;stn();amt=num;str=document.getElementById("txtAnnualInt").value;dp=4;stn();per=num;str=document.getElementById("txtMonths").value;dp=0;stn();months=num;if(months<1||months>999||per<.0001||per>99||amt<1||amt>pwr[9])
{alrt();}
else
{ls="";isnnum=1;i=per/12/100;fpv=0;for(var j=0;j<months;j++)
isnnum=isnnum*(1+i);tmp=(amt*isnnum*i)/(isnnum-1);fpv+=tmp;fcalc=((months*fpv)-amt);prtSched();}}
function prtSched()
{var result_div=document.getElementById("divResult");fpv+=.01;str=""
str+=fpv;fmtIt();dp=2;stn();fpv=num;pct=per/12/100;if(bl<14)
{bl=14;}
result_htm="<table width=\"100%\" border='0' cellpadding='0' cellspacing='0'>"+"<tr>"+"<td>"+"<table width=\"80%\" border=0 align=\"center\">"+"<tr>"+"<td colspan=2>Amortization Schedule:</td>"+"<td colspan=3><b> "+document.getElementById("txtMonths").value+"</b> months to Repay <b>"+s+document.getElementById("txtAmt").value+"</b> At: <b>"+document.getElementById("txtAnnualInt").value+"%</b></td>"+"</tr>"+"</table>"+"</td>"+"</tr>"+"<tr>"+"<td>"+"<table width=\"100%\" border=0 align=\"center\" style='background-color:#000000;' cellspacing='1' cellpadding='2' >"+"<tr >"+"<td style='background-color:#ddd7f0;width:12%;'><b><center>Payment Number</center></b></td>"+"<td style='background-color:#ddd7f0;width:22%'><b><center>Payment Amount <br/>(Rs.)</center></b></td>"+"<td style='background-color:#ddd7f0;width:22%'><b><center>Interest Amount <br/>(Rs.)</center></b></td>"+"<td style='background-color:#ddd7f0;width:22%'><b><center>Principal Reduction <br/>(Rs.)</center></b></td>"+"<td style='background-color:#ddd7f0;width:22%'><b><center>Balance Due <br/>(Rs.)</center></b></td>"+"</tr>";for(var j=0;j<months;j++)
{ntr=(amt*pct);str="";str+=ntr;fmtIt();ntr1=s+str;prp=fpv-ntr;if(prp>amt)
{prp=amt;}
str="";str+=prp;fmtIt();prp1=s+str;amt-=prp;str="";str+=amt;fmtIt();amt1=str;if(fpv>(ntr+prp))
{fpv=ntr+prp;}
str="";str+=fpv;fmtIt();fpv1=str;str="";str+=(j+1)+".";result_htm+="<tr>"+"<td style='background-color:#ffffff; width:12%; text-align:center;' >"+str+"</td>"+"<td style='background-color:#ffffff; width:22%; text-align:right; padding-right:5px;' >"+fpv1+"</td>"+"<td style='background-color:#ffffff; width:22%; text-align:right; padding-right:5px;' >"+ntr1+"</td>"+"<td style='background-color:#ffffff; width:22%; text-align:right; padding-right:5px;' >"+prp1+"</td>"+"<td style='background-color:#ffffff; width:22%; text-align:right; padding-right:5px;' >"+amt1+"</td>"+"</tr>";}
result_htm+="</table></td></tr></table><br><br><span class=\"smalltext\" * Interest calculated at 1/12th of annual interest rate on the remaining principal amount. (Rounding errors possible)</span>";result_htm+="<div style='float:right; width:100%; text-align:right;'><a href=\"#\" class='Link'><b>Top</b></a></div>";result_div.innerHTML=result_htm;result_div.className="";}
function fmtIt()
{pos=str.indexOf(".");if(pos==0)
{str="0"+str;pos++;}
if(pos<0)
{str+=".00";pos=str.indexOf(".");}
str+="0000";str=str.substring(0,pos+4);cr=str.charAt(str.length-1);pos=ns.indexOf(cr);str=str.substring(0,str.length-1);if(pos>5)
{for(var k=str.length-1;k>-1;k--)
{cr=str.charAt(k);posn=ns.indexOf(cr);if(posn<0)
{k--;}
else
{str=str.substring(0,k)+ns.substring(posn+1,posn+2)
+str.substring(k+1,str.length);if(posn!=9)
{k=-1;}}}}}
function alrt()
{alert("You couldn't know. Months must be from"+" 1 to 999, Loan amount from 1 to "+pwr[9]+" and Interest from .001 to 99%");}
function ResetAmortization()
{document.getElementById("txtMonths").value="";document.getElementById("txtAmt").value="";document.getElementById("txtAnnualInt").value="";document.getElementById("divResult").innerHTML="";}
function CalculateEMI()
{var redBal;if(document.getElementById("rdoMonth").checked)
redBal="Month";else if(document.getElementById("rdoAnnual").checked)
redBal="Annual";var LoanAmout=document.getElementById("txtLoanAmt").value;for(i=0;i<LoanAmout.split(',').length;i++)
LoanAmout=LoanAmout.replace(",","");for(i=0;i<LoanAmout.split(',').length;i++)
LoanAmout=LoanAmout.replace(",","");if(document.getElementById("txtLoanAmt").value==""&&document.getElementById("txtLoanPeriod").value=="")
{alert("Please enter a number against 'Loan Amount and Period'");return false;}
else if((isNaN(LoanAmout)==true)||(LoanAmout==""))
{alert("Please enter a number against 'Loan Amount' ");return false;}
else if((isNaN(document.getElementById("txtLoanPeriod").value)==true)||(document.getElementById("txtLoanPeriod").value=="")||(document.getElementById("txtLoanPeriod").value<1))
{alert("Please enter a valid number against 'Loan Period' ");return false;}
else if((isNaN(document.getElementById("txtInt").value)==true)||(document.getElementById("txtInt").value==""))
{alert("Please enter a number against 'Interest Rate' ");return false;}
else
{var loanAMT=LoanAmout;var loanPeriod=document.getElementById("txtLoanPeriod").value;var intRate=(document.getElementById("txtInt").value)/100;if(redBal=="Annual")
{var CalRa=Math.pow((1+intRate),(parseInt(loanPeriod)))
var varEMI=(parseFloat(loanAMT)/((1-(1/(CalRa)))/(intRate/12)))
document.getElementById("txtEMI").value=Math.round(varEMI,2);InsertComm(document.getElementById("txtEMI"))}
else
{var CalRa=Math.pow((1+(intRate/12)),(12*parseInt(loanPeriod)))
var varEMI=(parseFloat(loanAMT)/((1-(1/(CalRa)))/(intRate/12)))
document.getElementById("txtEMI").value=Math.round(varEMI,2);InsertComm(document.getElementById("txtEMI"))}
return true;}}
function ResetEMI()
{document.getElementById("rdoMonth").checked=true;document.getElementById("txtLoanAmt").value="";document.getElementById("txtLoanPeriod").value="";document.getElementById("txtInt").value="";document.getElementById("txtEMI").value="";}
function ShowNRISecData(id)
{for(i=0;i<5;i++)
{if(document.getElementById("divNS"+i+"L"))
{document.getElementById("divNS"+i+"L").className="InnerTabL";document.getElementById("divNS"+i+"M").className="InnerTabM";document.getElementById("divNS"+i+"R").className="InnerTabR";document.getElementById("div"+i).style.display="none";}}
document.getElementById("divNS"+id+"L").className="InnerTabOnL";document.getElementById("divNS"+id+"M").className="InnerTabOnM";document.getElementById("divNS"+id+"R").className="InnerTabOnR";document.getElementById("div"+id).style.display="";}
function ActivateMM(Ele)
{Ele.style.backgroundImage="url(ImagesNew/mouse_hover.gif)";Ele.style.cursor="pointer";}
function DeactivateMM(Ele)
{Ele.style.backgroundImage="none";Ele.style.cursor="default";}
function ActivateIMM(Ele)
{if(Ele.id.indexOf("divMM0")==-1)
{Ele.style.backgroundImage="url(../ImagesNew/mouse_hover.gif)";Ele.style.cursor="pointer";}
else
{document.getElementById("imgDivMM0").src="../ImagesNew/home_topmenu.gif";Ele.style.cursor="pointer";}}
function DeactivateIMM(Ele)
{if(Ele.id.indexOf("divMM0")==-1)
{Ele.style.backgroundImage="none";Ele.style.cursor="default";}
else
{document.getElementById("imgDivMM0").src="../ImagesNew/home.gif";Ele.style.cursor="default";}}
function NISetResCom(id)
{var divRes=document.getElementById("divRes");var divCom=document.getElementById("divCom");var ddlBedrooms=document.getElementById("ddlBedrooms");var rdoBuy=document.getElementById("rdoBuy");var rdoPG=document.getElementById("rdoPG");var HiddenCategory=document.getElementById("HiddenCategory");if(id=="1")
{divRes.style.cursor="default";divRes.style.backgroundColor="#ececec";divRes.onclick="";divCom.style.cursor="pointer";divCom.style.backgroundColor="#528f06";divCom.onclick=new Function("javascript:NISetResCom('2')");ddlBedrooms.disabled=false;rdoPG.disabled=false;}
else if(id=="2")
{divRes.style.cursor="pointer";divRes.style.backgroundColor="#528f06";divRes.onclick=new Function("javascript:NISetResCom('1')");divCom.style.cursor="default";divCom.style.backgroundColor="#ececec";divCom.onclick="";ddlBedrooms.disabled=true;rdoPG.disabled=true;}
ddlBedrooms.selectedIndex=0;rdoBuy.checked=true;HiddenCategory.value=id;NIFillPropertyTypeDDL(id);}
function NIFillStateDDL()
{document.getElementById("HiddenSetDropDown").value="ddlState";document.getElementById("HiddenMessage").value="Select State / UT";GetDropDownData("GetState=GetState");}
function NIFillPropertyTypeDDL(id)
{document.getElementById("HiddenSetDropDown").value="ddlType";document.getElementById("HiddenMessage").value="Select Property Type";GetDropDownData("WithCatId="+id);}
function NIFillBudgetDDL(id)
{document.getElementById("HiddenSetDropDown").value="ddlBudget";document.getElementById("HiddenMessage").value="Select Range";GetDropDownData("UserType="+id);}
function NIFillCityDDL(Ele)
{document.getElementById("HiddenSetDropDown").value="ddlCity";document.getElementById("HiddenMessage").value="Select City";GetDropDownData("StateId="+Ele.value);}
function RFFillCityDDL(Ele)
{document.getElementById("ctl00_ContentPlaceHolder1_HiddenSetDropDown").value="ddlCity";document.getElementById("ctl00_ContentPlaceHolder1_HiddenMessage").value="Select City";document.getElementById("ctl00_ContentPlaceHolder1_HiddenDropDownEnd").value="Other";GetMasterPageDropDownData("StateId="+Ele.value);}
function RFShowOtherCity(Ele)
{if(Ele.value=="-1")
document.getElementById("txtCity").style.display="";else
document.getElementById("txtCity").style.display="none";}
function ShowHideDivData(id)
{var imgId=document.getElementById("img"+id);var imgSrc=imgId.src;var imgNewSrc="";var divId=document.getElementById("div"+id);var divHeight="30px";if(id.toLowerCase()=="news")
divHeight="194px";if(imgSrc.toLowerCase().indexOf("arrow_down")!=-1)
{imgNewSrc=imgSrc.replace("arrow_down","arrow_side");imgId.src=imgNewSrc;divId.style.display="none";if(document.getElementById("div"+id+"Main"))
document.getElementById("div"+id+"Main").style.height="30px";}
else if(imgSrc.toLowerCase().indexOf("arrow_side")!=-1)
{imgNewSrc=imgSrc.replace("arrow_side","arrow_down");imgId.src=imgNewSrc;divId.style.display="";if(document.getElementById("div"+id+"Main"))
document.getElementById("div"+id+"Main").style.height=divHeight;}}
function NIValidateSearch()
{var HiddenCategory=document.getElementById("HiddenCategory");var rdoBuy=document.getElementById("rdoBuy");var rdoRent=document.getElementById("rdoRent");var rdoPG=document.getElementById("rdoPG");var ddlType=document.getElementById("ddlType");var ddlBedrooms=document.getElementById("ddlBedrooms");var ddlState=document.getElementById("ddlState");var ddlCity=document.getElementById("ddlCity");var ddlBudget=document.getElementById("ddlBudget");var rdoAny=document.getElementById("rdoAny");var rdoBuilder=document.getElementById("rdoBuilder");var rdoBroker=document.getElementById("rdoBroker");var rdoOwner=document.getElementById("rdoOwner");var HiddenValue=document.getElementById("HiddenValue");if(ddlType&&ddlType.value=="")
return AlertMsg(ddlType,"select Property Type");else
{HiddenValue.value=HiddenCategory.value;if(rdoBuy.checked)
HiddenValue.value+=":sell";else if(rdoRent.checked)
HiddenValue.value+=":rent";else if(rdoPG.checked)
HiddenValue.value+=":pg";HiddenValue.value+=":"+ddlType.value;HiddenValue.value+=":"+ddlBedrooms.value;HiddenValue.value+=":"+ddlState.value;HiddenValue.value+=":"+ddlCity.value;HiddenValue.value+=":"+ddlBudget.value;if(rdoAny.checked)
HiddenValue.value+=":";else if(rdoBuilder.checked)
HiddenValue.value+=":builder";else if(rdoBroker.checked)
HiddenValue.value+=":agent";else if(rdoOwner.checked)
HiddenValue.value+=":individual";__doPostBack('btnExecute','');}}
function NIValidateProp()
{var txtPropID=document.getElementById("txtPropID");var HiddenPropID=document.getElementById("HiddenPropID");if(txtPropID&&txtPropID.value=="")
return AlertMsg(txtPropID,"enter Property ID");else
{HiddenPropID.value=txtPropID.value;__doPostBack('btnExecute','');}}
function __doPostBack(eventTarget,eventArgument)
{var theform=document.forms['aspnetForm'];if(!theForm)
theForm=document.aspnetForm;theform.__EVENTTARGET.value=eventTarget;theform.__EVENTARGUMENT.value=eventArgument;theform.submit();}
function AddToWatchList(val)
{document.getElementById("ctl00_ContentPlaceHolder1_HiddenWatchId").value=val;__doPostBack1('ctl00$ContentPlaceHolder1$btnSearch','');}
function RemoveFromWatchList(val)
{document.getElementById("ctl00_ContentPlaceHolder1_HiddenRemoveWatchId").value=val;__doPostBack1('ctl00$ContentPlaceHolder1$btnSearch','');}
function SetAsDefaultImage(val)
{document.getElementById("ctl00_ContentPlaceHolder1_HiddenSetImageId").value=val;__doPostBack1('ctl00$ContentPlaceHolder1$btnUpload','');}
function RemoveImage(val)
{document.getElementById("ctl00_ContentPlaceHolder1_HiddenRemoveImageId").value=val;__doPostBack1('ctl00$ContentPlaceHolder1$btnUpload','');}
function __doPostBack1(eventTarget,eventArgument)
{var theform=document.aspnetForm;theform.__EVENTTARGET.value=eventTarget;theform.__EVENTARGUMENT.value=eventArgument;theform.submit();}
function NIChangeStyle(Ele)
{Ele.style.opacity="1.0";Ele.style.filter="alpha(opacity=100)"}
function NIBackStyle(Ele)
{Ele.style.opacity="0.3";Ele.style.filter="alpha(opacity=30)"}
function ShowDivDisMessage(Ele)
{var pleft,ptop;var message=Ele.getAttribute("message");if(message!=null&&message!="")
{var eleWidth=Ele.offsetWidth;if(typeof(Ele.offsetParent)!='undefined'){for(var posX=0,posY=0;Ele;Ele=Ele.offsetParent){posX+=Ele.offsetLeft;posY+=Ele.offsetTop;}
pleft=posX;ptop=posY}else{pleft=Ele.x;ptop=Ele.y}
var divDisMessage=document.getElementById("divDisMessage");divDisMessage.style.display="";if((parseInt(pleft)+parseInt(10)+parseInt(eleWidth))<800)
divDisMessage.style.left=parseInt(pleft)+parseInt(10)+parseInt(eleWidth)+"px";else
divDisMessage.style.left=parseInt(pleft)-(parseInt(10)+parseInt(divDisMessage.offsetWidth))+"px";divDisMessage.style.top=parseInt(ptop)+"px";if(message!=null)
divDisMessage.innerHTML=message;else
{divDisMessage.innerHTML=" "}}}
function HideDivDisMessage()
{if(document.getElementById("divDisMessage"))
{var divDisMessage=document.getElementById("divDisMessage");divDisMessage.innerHTML="";divDisMessage.style.display="none";}}
function GetPageElements()
{var eleID=new Array("ctl00_txtLNUserName","ctl00_txtLNPassword","ctl00_txtFUserName","ctl00_ContentPlaceHolder1_txtLogin","ctl00_ContentPlaceHolder1_txtPassword","ctl00_ContentPlaceHolder1_txtConfPassword","ctl00_ContentPlaceHolder1_ddlTitle","ctl00_ContentPlaceHolder1_txtFName","ctl00_ContentPlaceHolder1_txtMName","ctl00_ContentPlaceHolder1_txtLName","ctl00_ContentPlaceHolder1_txtMobile","ctl00_ContentPlaceHolder1_Captcha1_txtCaptcha","ctl00_ContentPlaceHolder1_txtLandline","ctl00_ContentPlaceHolder1_txtAddress","ctl00_ContentPlaceHolder1_txtDOB","ctl00_ContentPlaceHolder1_txtPincode","ctl00_ContentPlaceHolder1_ddlCategory","ctl00_ContentPlaceHolder1_ddlType","ctl00_ContentPlaceHolder1_ddlCountry","ctl00_ContentPlaceHolder1_ddlState","ctl00_ContentPlaceHolder1_ddlCity","ctl00_ContentPlaceHolder1_ddlLocation","ctl00_ContentPlaceHolder1_txtPropertyTitle","ctl00_ContentPlaceHolder1_ddlPropAge","ctl00_ContentPlaceHolder1_ddlBedrooms","ctl00_ContentPlaceHolder1_ddlBathroom","ctl00_ContentPlaceHolder1_txtArea","ctl00_ContentPlaceHolder1_txtPrice","ctl00_ContentPlaceHolder1_ddlPrice","ctl00_ContentPlaceHolder1_ddlOwnership","ctl00_ContentPlaceHolder1_txtRent","ctl00_ContentPlaceHolder1_ddlRent","ctl00_ContentPlaceHolder1_txtLocation","ctl00_ContentPlaceHolder1_txtTotFloors","ctl00_ContentPlaceHolder1_ddlPropFloor","ctl00_ContentPlaceHolder1_txtCarPark","ctl00_ContentPlaceHolder1_ddlElectricity","ctl00_ContentPlaceHolder1_ddlWaterSupply","ctl00_ContentPlaceHolder1_ddlFencing","linkAddBooking","A1","A3","A5","ctl00_ContentPlaceHolder1_txtLankmark","ctl00_ContentPlaceHolder1_txtSchool","ctl00_ContentPlaceHolder1_txtHospital","ctl00_ContentPlaceHolder1_txtAirport","ctl00_ContentPlaceHolder1_txtRailwayStation","ctl00_txtEnquiryName","ctl00_txtEnquiryEmail","ctl00_txtEnquiryMobile","ctl00_txtQuery","wysiwygctl00_ContentPlaceHolder1_txtComment")
return eleID;}
function GetPageElementMessage()
{var eleID=new Array("Enter the Email ID given at the time of regestration.","Enter the password given at the time of regestration.","Please enter your email address here, we will send your password through email","Enter your email address (e.g myname@gmail.com).Your  email will be your User ID.","Please enter a password of min. 6 characters","Re-type the password","Please select your title","Please enter your first name. e.g Vijay","Please enter your middle name. e.g Kumar","Please enter your last name. e.g Singh","Please enter your mobile number for free SMS alerts & faster response from interested parties.","Enter the characters in the image here.If the code is not proper click the image to get a new code.","Enter your phone number with area code (e.g 0120-4038111)","Enter address here.","Enter your date of birth","Enter pin code","Select the category of your property","Select the property type","Select Country","Select State","Select the city where your property is located.If you do not find your city in the list then scroll down & select 'Other' option & enter city name in the textbox that appears in the right","Select the locality where your property is located.If you do not find your locality in the list then scroll down & select 'Other' option & enter locality name in the textbox that appears in the right","Describe your property in one line e.g Luxurious villa near to metro station or Prime commercial place in Pune ","Select the age of the property","Select the number of bedrooms in your property.","Select the number of bathrooms in your property","Enter the total area of your property in sq. fts.","Enter the property price (for sale). If you do not wish to specify an exact amount you can select a range from the dropdown box on the right.","Enter the approxmate price range of your property","Select the type of ownership of your property","Enter the property price (for rent). If you do not wish to specify an exact amount you can select a range from the dropdown box on the right","Enter the approxmate price range of your property","Enter location here","Enter the total number of floors in the Building","Select the floor on which your property is located","Enter no. of car parking available","Select type of electricity available","Select type of water supply available","Select type of fencing","To add more features Click Here","To add more external facilities click here","To add more internal features click here","To add more internal facilities click here","Enter Prominent landmark nearyby your property","Enter school name nearby your property","Enter hospital nearby your property","Enter Distance of Airport in Kms from your property","Enter Distance of prominent railway station in Kms. from your property","Enter your Name","Enter your Email-ID","Enter Your Mobile Number","Enter your query here","Describe your property in detail. You can use the formatting buttons in the toolbar to format your description.");return eleID;}
function mouseEventHandler(mEvent)
{if(mEvent.srcElement)
{showPopup(mEvent,mEvent.srcElement);}
else if(mEvent.target)
{showPopup(mEvent,mEvent.target);}}
function showPopup(myEvent,myElement)
{if(myElement.id)
ShowDivDisMessage(myElement)}
function AssignDisMessage()
{var EleId=GetPageElements();var EleMess=GetPageElementMessage();var Ele;var stronblur,stronfocus;for(i=0;i<EleId.length;i++)
{if(document.getElementById(EleId[i]))
{Ele=document.getElementById(EleId[i]);Ele.setAttribute("message",EleMess[i]);stronblur=Ele.getAttribute("onblur");stronfocus=Ele.getAttribute("onfocus");if(stronblur==null)
Ele.setAttribute("onblur","HideDivDisMessage()");if(stronfocus==null)
Ele.setAttribute("onfocus","ShowDivDisMessage(this)");if(Ele.addEventListener)
{Ele.addEventListener('mouseout',HideDivDisMessage,false);}
else if(Ele.attachEvent)
{Ele.attachEvent('onmouseout',HideDivDisMessage);}}}}
function SearchSortBy(val)
{document.getElementById("ctl00_ContentPlaceHolder1_HiddenFieldSort").value=val;}
function GetSearchData()
{var ddlCategory=document.getElementById("ctl00_ContentPlaceHolder1_ddlCategory")
var ddlType=document.getElementById("ctl00_ContentPlaceHolder1_ddlType")
var ddlBudget=document.getElementById("ctl00_ContentPlaceHolder1_ddlBudget")
var ddlBedrooms=document.getElementById("ctl00_ContentPlaceHolder1_ddlBedrooms")
var ddlState=document.getElementById("ctl00_ContentPlaceHolder1_ddlState")
var ddlCity=document.getElementById("ctl00_ContentPlaceHolder1_ddlCity")
var lstLocation=document.getElementById("ctl00_ContentPlaceHolder1_lstLocation")
SetHiddenValue(ddlCategory,'HiddenCategory')
SetHiddenValue(ddlType,'HiddenPropertyType')
SetHiddenValue(ddlBudget,'HiddenBudget');SetHiddenValue(ddlBedrooms,'HiddenBedrooms');SetHiddenValue(ddlState,'HiddenStateId')
SetHiddenValue(ddlCity,'HiddenCityId');GetSelectedLocations(lstLocation);}
function SearchOnmouserOver(Ele)
{Ele.src=Ele.src.replace(".gif","D.gif");}
function SearchOnmouserOut(Ele)
{Ele.src=Ele.src.replace("D.gif",".gif");}
function ShowFullView()
{document.getElementById("trFullView").style.display="";document.getElementById("trSlideShow").style.display="none";}
function ShowSlideShow()
{document.getElementById("trSlideShow").style.display="";document.getElementById("trFullView").style.display="none";document.getElementById("trSlideOptions").style.display="";}
function SlideBack()
{Selected=eval(Selected)-eval(1);MoveSlideShow();}
function SlideNext()
{Selected=eval(Selected)+eval(1);MoveSlideShow();}
function MoveSlideShow()
{document.getElementById("divSlideBackCaption").style.display="";document.getElementById("imgSlidePrev").style.display="";document.getElementById("divSlideBack").style.display="";document.getElementById("divSlideNextCaption").style.display="";document.getElementById("imgSlideNext").style.display="";document.getElementById("divSlideNext").style.display="";if(eval(Selected)>0)
{document.getElementById("imgSlidePrev").src=imagesPreloaded[eval(Selected)-eval(1)].src;document.getElementById("divSlideBackCaption").innerHTML=imagesCaption[eval(Selected)-eval(1)];}
else
{document.getElementById("divSlideBackCaption").style.display="none";document.getElementById("imgSlidePrev").style.display="none";document.getElementById("divSlideBack").style.display="none";}
document.getElementById("imgSlideFull").src=imagesPreloaded[eval(Selected)].src;document.getElementById("linkSlideFull").href=imagesPreloaded[eval(Selected)].src;document.getElementById("divSlideFullCaption").innerHTML=imagesCaption[eval(Selected)];if(eval(Selected)+eval(1)<eval(imagesPreloaded.length))
{document.getElementById("imgSlideNext").src=imagesPreloaded[eval(Selected)+eval(1)].src;document.getElementById("divSlideNextCaption").innerHTML=imagesCaption[eval(Selected)+eval(1)];}
else
{document.getElementById("divSlideNextCaption").style.display="none";document.getElementById("imgSlideNext").style.display="none";document.getElementById("divSlideNext").style.display="none";}}
var MyImages;var imagesPreloaded;var imagesCaption;var Selected;function ShowHideBuilder(ind,bld)
{if(document.getElementById("trIndividual"))
document.getElementById("trIndividual").style.display=ind;if(document.getElementById("trBuilder"))
document.getElementById("trBuilder").style.display=bld;}
function GetElementType(id)
{var eleType;switch(id)
{case"tblFloorPlans":eleType=new Array("input","input","input","a");break;case"tblFloorLayouts":eleType=new Array("input","a");break;case"tblSpecifications":eleType=new Array("input","input");break;case"tblAmenities":eleType=new Array("input");break;case"tblBooking":eleType=new Array("input");break;case"tblPhoto":eleType=new Array("a");break;case"tblVideo":eleType=new Array("a");break;case"tblReferFriend":eleType=new Array("input","input");}
return eleType;}
function GetElementText(id)
{var eleID;switch(id)
{case"tblFloorPlans":eleID=new Array("","","","Add Layout");break;case"tblFloorLayouts":eleID=new Array("","Add Layout");break;case"tblSpecifications":eleID=new Array("","");break;case"tblAmenities":eleID=new Array("");break;case"tblBooking":eleID=new Array("");break;case"tblPhoto":eleID=new Array("Add Photo");break;case"tblVideo":eleID=new Array("Add Video");break;case"tblReferFriend":eleID=new Array("Recipient Name","Recipient Email");break;}
return eleID;}
function GetElementId(id)
{var eleID;switch(id)
{case"tblFloorPlans":eleID=new Array("txtType","txtSize","txtPrice","linkLayout");break;case"tblFloorLayouts":eleID=new Array("txtLabel","linkLayout");break;case"tblSpecifications":eleID=new Array("txtSpecification","txtDescription");break;case"tblAmenities":eleID=new Array("txtSent");break;case"tblBooking":eleID=new Array("txtBooking");break;case"tblPhoto":eleID=new Array("linkPhoto");break;case"tblVideo":eleID=new Array("linkVideo");break;case"tblReferFriend":eleID=new Array("txtRecName","txtRecEmail");break;}
return eleID;}
function GetElementAlign(id)
{var eleID;switch(id)
{case"tblFloorPlans":eleID=new Array("center","center","center","center");break;case"tblFloorLayouts":eleID=new Array("center","center");break;case"tblSpecifications":eleID=new Array("center","center");break;case"tblAmenities":eleID=new Array("left");break;case"tblBooking":eleID=new Array("left");break;case"tblPhoto":eleID=new Array("left");break;case"tblVideo":eleID=new Array("left");break;case"tblReferFriend":eleID=new Array("left","left");break;}
return eleID;}
function AddRows(id)
{var tbl=document.getElementById(id);var lastRow=tbl.rows.length;var iteration=lastRow;var row=tbl.insertRow(lastRow);var eleType=GetElementType(id);var eleID=GetElementId(id);var eleAlign=GetElementAlign(id);var eleText=GetElementText(id);for(i=0;i<eleType.length;i++)
{var cell=row.insertCell(i);var el=document.createElement(eleType[i]);el.name=eleID[i]+iteration;el.id=eleID[i]+iteration;if(eleType[i]=="a")
{el.innerHTML=eleText[i];el.className='LinkCss';if(eleID[i].indexOf("linkLayout")!=-1)
el.href="javascript:StoreUploadId('"+eleID[i]+iteration+"');";else if(eleID[i].indexOf("linkPhoto")!=-1)
el.href="javascript:ShowUpload('"+eleID[i]+iteration+"','"+eleText[i]+"','0','-170');";else if(eleID[i].indexOf("linkVideo")!=-1)
el.href="javascript:ShowUpload('"+eleID[i]+iteration+"','"+eleText[i]+"','-450','-170');";cell.style.backgroundColor='#ffffff';cell.style.textAlign=eleAlign[i];}
else
{el.style.width='95%';el.type='text';el.className='Text';cell.style.backgroundColor='#ffffff';cell.style.textAlign=eleAlign[i];}
cell.appendChild(el);if(eleID[i].indexOf("linkLayout")!=-1)
{var img=document.createElement("img");img.name="img"+iteration;img.id="img"+iteration;img.src="../imagesnew/deleteSmall.gif";img.onclick="dropdowncontent.removeattach('linkLayout"+iteration+"','Add Layout')";img.onclick=function(){dropdowncontent.removeattach("linkLayout"+iteration,"Add Layout");};cell.appendChild(img);}}}
function RemoveRows(id)
{var tbl=document.getElementById(id);var lastRow=tbl.rows.length;if(lastRow>2)tbl.deleteRow(lastRow-1);}
function ReferAddRows(id,strwidth)
{var tbl=document.getElementById(id);var lastRow=tbl.rows.length;var iteration=lastRow+1;var row=tbl.insertRow(lastRow);var eleType=new Array("input","input");var eleID=new Array("txtRecName","txtRecEmail");var eleAlign=new Array("left","left");var eleText=new Array("Recipient Name","Recipient Email");for(i=0;i<eleType.length;i++)
{var cell=row.insertCell(i);var el=document.createElement(eleType[i]);el.name=eleID[i]+iteration;el.id=eleID[i]+iteration;el.style.width=strwidth;el.value=eleText[i];el.type='text';el.className='TextCss';cell.style.backgroundColor='#ffffff';cell.style.textAlign=eleAlign[i];cell.style.paddingTop='8px';if(i==0)
{el.onblur=function()
{ShowText(this,'Recipient Name')}
el.onfocus=function()
{HideText(this,'Recipient Name')}
cell.style.width='50%';}
if(i==1)
{el.onblur=function()
{ShowText(this,'Recipient Email')}
el.onfocus=function()
{HideText(this,'Recipient Email')}
cell.style.paddingLeft='4px';}
cell.appendChild(el);}}
function ReferRemoveRows(id)
{var tbl=document.getElementById(id);var lastRow=tbl.rows.length;if(lastRow>1)tbl.deleteRow(lastRow-1);}
function GetValues()
{var CheckText=document.getElementsByTagName("input");var CheckLink=document.getElementsByTagName("a");var CheckId;var txtType=document.getElementById("ctl00_ContentPlaceHolder1_Hidden1");var txtSize=document.getElementById("ctl00_ContentPlaceHolder1_Hidden2");var txtPrice=document.getElementById("ctl00_ContentPlaceHolder1_Hidden3");var txtFlats=document.getElementById("ctl00_ContentPlaceHolder1_Hidden4");var linkLayout=document.getElementById("ctl00_ContentPlaceHolder1_Hidden5");var txtSpecification=document.getElementById("ctl00_ContentPlaceHolder1_Hidden6");var txtDescription=document.getElementById("ctl00_ContentPlaceHolder1_Hidden7");var txtSent=document.getElementById("ctl00_ContentPlaceHolder1_Hidden8");var txtBooking=document.getElementById("ctl00_ContentPlaceHolder1_Hidden9");var linkPhoto=document.getElementById("ctl00_ContentPlaceHolder1_Hidden10");var linkVideo=document.getElementById("ctl00_ContentPlaceHolder1_Hidden11");txtType.value="";txtSize.value="";txtPrice.value="";txtFlats.value="";linkLayout.value="";txtSpecification.value="";txtDescription.value="";txtSent.value="";txtBooking.value="";linkPhoto.value="";linkVideo.value="";for(i=0;i<CheckLink.length;i++)
{CheckId=CheckLink[i].id;if(CheckId.indexOf("linkLayout")!=-1&&document.getElementById(CheckId))
linkLayout.value+="|"+document.getElementById(CheckId).innerHTML;if(CheckId.indexOf("linkPhoto")!=-1&&document.getElementById(CheckId))
linkPhoto.value+="|"+document.getElementById(CheckId).innerHTML;if(CheckId.indexOf("linkVideo")!=-1&&document.getElementById(CheckId))
linkVideo.value+="|"+document.getElementById(CheckId).innerHTML;}
for(i=0;i<CheckText.length;i++)
{CheckId=CheckText[i].id;if(CheckId.indexOf("txtType")!=-1&&document.getElementById(CheckId))
txtType.value+="|"+document.getElementById(CheckId).value;if(CheckId.indexOf("txtSize")!=-1&&document.getElementById(CheckId))
txtSize.value+="|"+document.getElementById(CheckId).value;if(CheckId.indexOf("txtPrice")!=-1&&document.getElementById(CheckId))
txtPrice.value+="|"+document.getElementById(CheckId).value;if(CheckId.indexOf("txtFlats")!=-1&&document.getElementById(CheckId))
txtFlats.value+="|"+document.getElementById(CheckId).value;if(CheckId.indexOf("txtSpecification")!=-1&&document.getElementById(CheckId))
txtSpecification.value+="|"+document.getElementById(CheckId).value;if(CheckId.indexOf("txtDescription")!=-1&&document.getElementById(CheckId))
txtDescription.value+="|"+document.getElementById(CheckId).value;if(CheckId.indexOf("txtSent")!=-1&&document.getElementById(CheckId))
txtSent.value+="|"+document.getElementById(CheckId).value;if(CheckId.indexOf("txtBooking")!=-1&&document.getElementById(CheckId))
txtBooking.value+="|"+document.getElementById(CheckId).value;}}
function SetValue(id,Ele)
{document.getElementById("ctl00_ContentPlaceHolder1_"+id).value=Ele.value;}
function StoreUploadId(id)
{document.getElementById("HiddenUploadID").value=id;if(document.getElementById(id).innerHTML.toLowerCase()!="add layout")
{document.getElementById("linkUpload").innerHTML=document.getElementById(id).innerHTML;document.getElementById("linkUpload").href=document.getElementById(id).innerHTML;}
ShowLogin('divLoginTable');}
function RestoreFile()
{if(document.getElementById("linkUpload").innerHTML!="")
{document.getElementById(document.getElementById("HiddenUploadID").value).innerHTML=document.getElementById("linkUpload").innerHTML;document.getElementById("linkUpload").innerHTML="";document.getElementById("linkUpload").href="";HideLogin('divLoginTable');}}
function ShowHideLoc(id)
{var CityRow=document.getElementById("td"+id);var CityInner=CityRow.innerHTML;if(CityInner.substr(0,2).indexOf("+")!=-1)
{CityRow.innerHTML=CityInner.replace(CityInner.substr(0,2)," - ");for(i=0;i<100;i++)
{if(document.getElementById("tr"+id+"_"+i))
document.getElementById("tr"+id+"_"+i).style.display="";else
break;}}
else if(CityInner.substr(0,2).indexOf("-")!=-1)
{CityRow.innerHTML=CityInner.replace(CityInner.substr(0,2)," + ");for(i=0;i<100;i++)
{if(document.getElementById("tr"+id+"_"+i))
document.getElementById("tr"+id+"_"+i).style.display="none";else
break;}}}
function HighlightProjectBorder(Ele,index)
{Ele.style.border="solid 1px #7050f6";if(document.getElementById("linkClickView"+index))
document.getElementById("linkClickView"+index).style.color="#00a637";}
function OriginalProjectBorder(Ele,index)
{Ele.style.border="solid 1px #dcdcdc";if(document.getElementById("linkClickView"+index))
document.getElementById("linkClickView"+index).style.color="#ffffff";}
function ChangesMainTabOver()
{document.getElementById("linkTab").className="tabMDivO";document.getElementById("tabDivL").className="TabLDivO";document.getElementById("tabDivM").className="TabMDivO";document.getElementById("tabDivR").className="TabRDivO";}
function ChangesMainTabOut()
{document.getElementById("linkTab").className="tabMDivN";document.getElementById("tabDivL").className="TabLDivN";document.getElementById("tabDivM").className="TabMDivN";document.getElementById("tabDivR").className="TabRDivN";}
function ChangesMainTabOverDemo(id)
{document.getElementById("linkTab"+id).className="tabMDivO";document.getElementById("tabDivL"+id).className="TabLDivO";document.getElementById("tabDivM"+id).className="TabMDivO";document.getElementById("tabDivR"+id).className="TabRDivO";}
function ChangesMainTabOutDemo(id)
{document.getElementById("linkTab"+id).className="tabMDivN";document.getElementById("tabDivL"+id).className="TabLDivN";document.getElementById("tabDivM"+id).className="TabMDivN";document.getElementById("tabDivR"+id).className="TabRDivN";}
function ChangesPartnerTabOver(id)
{document.getElementById("linkTab"+id).className="tabPartMDivO";document.getElementById("tabDiv"+id+"L").className="TabPartLDivO";document.getElementById("tabDiv"+id+"M").className="TabPartMDivO";document.getElementById("tabDiv"+id+"R").className="TabPartRDivO";}
function ChangesPartnerTabOut(id)
{document.getElementById("linkTab"+id).className="tabPartMDivN";document.getElementById("tabDiv"+id+"L").className="TabPartLDivN";document.getElementById("tabDiv"+id+"M").className="TabPartMDivN";document.getElementById("tabDiv"+id+"R").className="TabPartRDivN";}
function ChangesRefineSearchTabOver()
{document.getElementById("linkRSTab").className="tabRSMDivO";document.getElementById("tabRSDivL").className="TabRSLDiv";document.getElementById("tabRSDivM").className="TabRSMDiv";document.getElementById("tabRSDivR").className="TabRSRDiv";}
function ChangesRefineSearchTabOut()
{document.getElementById("linkRSTab").className="tabRSMDivN";document.getElementById("tabRSDivL").className="TabRSLDivN";document.getElementById("tabRSDivM").className="TabRSMDivN";document.getElementById("tabRSDivR").className="TabRSRDivN";}
document.onkeydown=HandleEscKey;function HandleEscKey(e)
{var keycode;if(window.event)
{keycode=window.event.keyCode;}
else if(e)
{keycode=e.which;}
if(keycode==27)
{if(document.getElementById("divEnquiry"))
HideLogin('divEnquiry');if(document.getElementById("divEnlargeImage"))
HideLogin('divEnlargeImage');}}
function GoogleLeadCode()
{if(document.getElementById("GoogleLead"))
document.getElementById("GoogleLead").value="";document.write("<script type=\"text/javascript\">");document.write("/* <![CDATA[ */");document.write("var google_conversion_id = 1001182262;");document.write("var google_conversion_language = \"en\";");document.write("var google_conversion_format = \"2\";");document.write("var google_conversion_color = \"ffffff\";");document.write("var google_conversion_label = \"XlU1CNqc5wEQtqiz3QM\"; var google_conversion_value = 0;");document.write("/* ]]> */");document.write("</script>");document.write("<script type=\"text/javascript\"  ");document.write("src=\"http://www.googleadservices.com/pagead/conversion.js\">");document.write("</script>");document.write("<noscript>");document.write("<div style=\"display:inline;\">");document.write("<img height=\"1\" width=\"1\" style=\"border-style:none;\" alt=\"\"  ");document.write("src=\"http://www.googleadservices.com/pagead/conversion/1001182262/?label=XlU1CNqc5wEQtqiz3QM&guid=ON&script=0\"/>");document.write("</div>");document.write("</noscript>");document.write("<script type=\"text/javascript\">");document.write("window.location=window.location.href;");document.write("</script>");}
function HideSearchMore()
{document.getElementById("divSearchMore").style.display="none";}
function ShowSearchMore()
{document.getElementById("divSearchMore").style.display="";}
function HideSearchTypeMore()
{document.getElementById("divSearchTypeMore").style.display="none";}
function ShowSearchTypeMore()
{document.getElementById("divSearchTypeMore").style.display="";}
var timerBanner
function findPos(obj)
{var curleft=curtop=0;if(obj.offsetParent){do{curleft+=obj.offsetLeft;curtop+=obj.offsetTop;}while(obj=obj.offsetParent);}
return[curleft,curtop];}
function LoadFlash()
{var PrjFls=document.getElementById("divProjectFlash");if(PrjFls)
{if(PrjFls.style.left=='')
{PrjFls.style.top="385px";PrjFls.style.display="";}}
return false;}
function getFlashMovieObject(movieName)
{if(navigator.appName.indexOf("Microsoft Internet")==-1)
{if(document.embeds&&document.embeds[movieName])
return document.embeds[movieName];}
else if(window.document[movieName])
{return window.document[movieName];}
else
{return document.getElementById(movieName);}}
function ShowProjectReplay()
{clearTimeout(timerBanner)
timerBanner=setTimeout("ShowHiddenFlash()",10000);LoadFlash();var flashMovie=getFlashMovieObject("prjswf");if(document.getElementById('divProjectFlash'))
document.getElementById('divProjectFlash').style.display="";if(flashMovie)
{flashMovie.Rewind();flashMovie.Play();}}
function ShowHiddenFlash()
{if(document.getElementById('divProjectFlash'))
document.getElementById('divProjectFlash').style.display="none";}
function RedirectOtherCity()
{if(document.getElementById("ddlOtherCity")&&document.getElementById("ddlOtherCity").value!="")
{window.location=document.getElementById("ddlOtherCity").value;}}
function ChangeToEnqSel()
{if(document.getElementById("linkEnqUnSel"))
document.getElementById("linkEnqUnSel").style.color="#1c9a49";if(document.getElementById("ctl00_ContentPlaceHolder1_tdEnqTop"))
document.getElementById("ctl00_ContentPlaceHolder1_tdEnqTop").className="EnqTop1";if(document.getElementById("ctl00_ContentPlaceHolder1_tdEnqTell"))
document.getElementById("ctl00_ContentPlaceHolder1_tdEnqTell").className="EnqTell1";}
function ChangeToEnqUnSel()
{if(document.getElementById("linkEnqUnSel"))
document.getElementById("linkEnqUnSel").style.color="#000000";if(document.getElementById("ctl00_ContentPlaceHolder1_tdEnqTop"))
document.getElementById("ctl00_ContentPlaceHolder1_tdEnqTop").className="EnqTop2";if(document.getElementById("ctl00_ContentPlaceHolder1_tdEnqTell"))
document.getElementById("ctl00_ContentPlaceHolder1_tdEnqTell").className="EnqTell2";}
function RestoreRefineSearchCookie()
{alert(getEnqCookie("UniProRefineSearch"))
alert(getEnqCookie("UniProKeySearch"))
setEnqCookie("UniProRefineSearch",getEnqCookie("UniProRefineSearch1"),1);setEnqCookie("UniProKeySearch",getEnqCookie("UniProKeySearch1"),1);}
function RefineCitySearch(load)
{deleteEnqCookie("UniProRefineSearch");deleteEnqCookie("UniProKeySearch");if(load!="")
ShowRefineCitySearch();}
function ShowRefineCitySearch()
{var LocId="";var Bedrooms="";var Bedrooms1="";var MinBdgt="";var MaxBdgt="";var Cond1="";var PropertyCategory="";var CityId="";var HiddenLocId="";var SearchShowLocations="";var SearchShowBedrooms="";var strShowBdgt="";var TypeId=""
var PropertyType=""
var SearchShowTypes="";for(i=1;i<50;i++)
{if(document.getElementById("chkSearchLoc"+i))
{if(document.getElementById("chkSearchLoc"+i).checked)
if(LocId=="")
{LocId+=document.getElementById("chkSearchLoc"+i).value;SearchShowLocations+=document.getElementById("chkSearchLoc"+i).name}
else
{LocId+=","+document.getElementById("chkSearchLoc"+i).value;SearchShowLocations+=", "+document.getElementById("chkSearchLoc"+i).name}}
else
break;}
if(LocId!="")
LocId=" and lm.LocId in ("+LocId+") ";for(j=1;j<20;j++)
{if(document.getElementById("chkSearchType"+j))
{if(document.getElementById("chkSearchType"+j).checked)
if(TypeId=="")
{TypeId+=document.getElementById("chkSearchType"+j).value;SearchShowTypes+=document.getElementById("chkSearchType"+j).name}
else
{TypeId+=","+document.getElementById("chkSearchType"+j).value;SearchShowTypes+=", "+document.getElementById("chkSearchType"+j).name}}
else
break;}
if(TypeId!="")
{PropertyType=" and (";for(p=0;p<TypeId.split(",").length;p++)
{if(p==TypeId.split(",").length-1)
{PropertyType+=" PropertyType like ^%|"+TypeId.split(",")[p]+"|%^ ";}
else
{PropertyType+=" PropertyType like ^%|"+TypeId.split(",")[p]+"|%^  or ";}}
PropertyType+=")";}
for(i=1;i<10;i++)
{if(document.getElementById("chkSearchBed"+i))
{if(document.getElementById("chkSearchBed"+i).checked)
if(Bedrooms=="")
{Bedrooms+=document.getElementById("chkSearchBed"+i).value;SearchShowBedrooms+=document.getElementById("chkSearchBed"+i).name}
else
{Bedrooms+=","+document.getElementById("chkSearchBed"+i).value;SearchShowBedrooms+=", "+document.getElementById("chkSearchBed"+i).name}}
else
break;}
var isBed=false;if(TypeId=="9")
{Bedrooms="";isBed=true;}
for(i=1;i<10;i++)
{if(document.getElementById("chkSearchBed"+i))
document.getElementById("chkSearchBed"+i).disabled=isBed;}
if(Bedrooms!="")
{Cond1=" bedrooms in ("+Bedrooms+") ";if(Bedrooms.indexOf("5")!=-1)
Bedrooms=" and (bedrooms in ("+Bedrooms+") or bedrooms>4) ";else
Bedrooms=" and bedrooms in ("+Bedrooms+") ";}
if(SearchShowLocations=="")
SearchShowLocations=" All";if(SearchShowTypes=="")
SearchShowTypes=" All";if(SearchShowBedrooms=="")
SearchShowBedrooms=" All";if(SearchShowLocations=="")
SearchShowLocations=" All";var ShowMinBdgt="";var ShowMaxBdgt="";if(document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMin")&&document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMin").selectedIndex!=0)
{MinBdgt=document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMin").value
ShowMinBdgt=document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMin").options[document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMin").selectedIndex].text;}
if(document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMax")&&document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMax").selectedIndex!=0)
{MaxBdgt=document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMax").value
ShowMaxBdgt=document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMax").options[document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMax").selectedIndex].text;}
if(eval(MinBdgt)>=eval(MaxBdgt))
{alert("Please select proper range");return;}
if(MinBdgt!=""&&MaxBdgt=="")
strShowBdgt="More than "+ShowMinBdgt;else if(MinBdgt==""&&MaxBdgt!="")
strShowBdgt="Less than "+ShowMaxBdgt;else if(MinBdgt!=""&&MaxBdgt!="")
strShowBdgt=ShowMinBdgt+" - "+ShowMaxBdgt;else
strShowBdgt="All";if(MinBdgt!="")
{if(Cond1!="")
Cond1+=" and price>="+MinBdgt;else
Cond1+=" price>="+MinBdgt;MinBdgt=" and minprice>="+MinBdgt;}
if(MaxBdgt!="")
{if(Cond1!="")
Cond1+=" and price<="+MaxBdgt;else
Cond1+=" price<="+MaxBdgt;MaxBdgt=" and maxprice<="+MaxBdgt;}
if(Cond1!="")
Cond1=": where "+Cond1;if(document.getElementById("ctl00_ContentPlaceHolder1_HiddenPropertyCategory")&&document.getElementById("ctl00_ContentPlaceHolder1_HiddenPropertyCategory").value!="")
PropertyCategory=document.getElementById("ctl00_ContentPlaceHolder1_HiddenPropertyCategory").value;if(document.getElementById("ctl00_ContentPlaceHolder1_HiddenCityId")&&document.getElementById("ctl00_ContentPlaceHolder1_HiddenCityId").value!="")
CityId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenCityId").value;if(document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId")&&document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId").value!="")
HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId").value;if(PropertyCategory!="")
PropertyCategory=" PropertyCategory="+PropertyCategory;else
PropertyCategory=" PropertyCategory=1";if(CityId!="")
CityId=" and cm.CityId="+CityId;if(HiddenLocId!="")
HiddenLocId=" and lm.LocId="+HiddenLocId;var Condition=LocId+" "+PropertyType+" "+Bedrooms+" "+MinBdgt+" "+MaxBdgt+" "+Cond1;var cookieCodition=getEnqCookie("UniProRefineSearch");if(LocId==""&&PropertyType==""&&Bedrooms==""&&MinBdgt==""&&MaxBdgt==""&&Cond1==""&&cookieCodition!="")
Condition=cookieCodition;deleteEnqCookie("UniProKeySearch");setEnqCookie("UniProRefineSearch",Condition,1);dropdowncontent.ajaxconnect("MasterPages/UniProAjax.aspx?Condition= where "+PropertyCategory+" and pm.Status=1 and bm.Status=1 "+CityId+" "+HiddenLocId+" "+Condition+" &PageNo=1&PageSize=6","ctl00_ContentPlaceHolder1_tdDisPaging1|ctl00_ContentPlaceHolder1_tdDisPaging2|ctl00_ContentPlaceHolder1_tdProjects");if(document.getElementById("spanShowLoc"))
document.getElementById("spanShowLoc").innerHTML=SearchShowLocations;if(document.getElementById("spanShowType"))
document.getElementById("spanShowType").innerHTML=SearchShowTypes;if(document.getElementById("spanShowBdgt"))
document.getElementById("spanShowBdgt").innerHTML=strShowBdgt;if(document.getElementById("spanShowBed"))
document.getElementById("spanShowBed").innerHTML=SearchShowBedrooms;}
function ResetRefineCitySearch()
{var PropertyCategory="";var CityId="";var LocId="";for(i=1;i<50;i++)
{if(document.getElementById("chkSearchLoc"+i))
document.getElementById("chkSearchLoc"+i).checked=false;else
break;}
for(i=1;i<20;i++)
{if(document.getElementById("chkSearchType"+i))
document.getElementById("chkSearchType"+i).checked=false;else
break;}
for(i=1;i<10;i++)
if(document.getElementById("chkSearchBed"+i))
document.getElementById("chkSearchBed"+i).checked=false;if(document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMin"))
document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMin").selectedIndex=0
if(document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMax"))
document.getElementById("ctl00_ContentPlaceHolder1_ddlBdgtMax").selectedIndex=0
if(document.getElementById("ctl00_ContentPlaceHolder1_HiddenPropertyCategory")&&document.getElementById("ctl00_ContentPlaceHolder1_HiddenPropertyCategory").value!="")
PropertyCategory=document.getElementById("ctl00_ContentPlaceHolder1_HiddenPropertyCategory").value;if(document.getElementById("ctl00_ContentPlaceHolder1_HiddenCityId")&&document.getElementById("ctl00_ContentPlaceHolder1_HiddenCityId").value!="")
CityId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenCityId").value;if(document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId")&&document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId").value!="")
LocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId").value;if(PropertyCategory!="")
PropertyCategory=" PropertyCategory="+PropertyCategory;else
PropertyCategory=" PropertyCategory=1";if(CityId!="")
CityId=" and cm.CityId="+CityId;if(LocId!="")
LocId=" and lm.LocId="+LocId;dropdowncontent.ajaxconnect("MasterPages/UniProAjax.aspx?Condition= where "+PropertyCategory+" and pm.Status=1 and bm.Status=1 "+CityId+" "+LocId+" &PageNo=1&PageSize=6","ctl00_ContentPlaceHolder1_tdDisPaging1|ctl00_ContentPlaceHolder1_tdDisPaging2|ctl00_ContentPlaceHolder1_tdProjects");if(document.getElementById("spanShowLoc"))
document.getElementById("spanShowLoc").innerHTML="All";if(document.getElementById("spanShowType"))
document.getElementById("spanShowType").innerHTML="All";if(document.getElementById("spanShowBdgt"))
document.getElementById("spanShowBdgt").innerHTML="All";if(document.getElementById("spanShowBed"))
document.getElementById("spanShowBed").innerHTML="All";}
function ShowHideRefineKeyword(showid,hideid)
{if(document.getElementById("tr"+hideid))
document.getElementById("tr"+hideid).style.display="none";if(document.getElementById("tr"+showid))
document.getElementById("tr"+showid).style.display="";if(document.getElementById("td"+showid))
{document.getElementById("td"+showid).style.backgroundColor="#ffffff"
document.getElementById("td"+showid).style.color="#00a539"
document.getElementById("td"+showid).style.cursor="default";}
if(document.getElementById("td"+hideid))
{document.getElementById("td"+hideid).style.backgroundColor="#00a539"
document.getElementById("td"+hideid).style.color="#ffffff"
document.getElementById("td"+hideid).style.cursor="pointer";}
dropdowncontent.ajaxconnect("MasterPages/UniProAjax.aspx?"+showid+"Search=True","tdRefineSearchTab");if(document.getElementById("tr"+showid+"Search"))
document.getElementById("tr"+showid+"Search").style.display="";if(document.getElementById("tr"+hideid+"Search"))
document.getElementById("tr"+hideid+"Search").style.display="none";}
function ShowKeyWordSearchResult()
{var Condition="";if(document.getElementById("HiddenKeySearch"))
Condition=document.getElementById("HiddenKeySearch").value;var cookieCond=getEnqCookie("UniProKeySearch");if(Condition==""&&cookieCond!="")
Condition=cookieCond;deleteEnqCookie("UniProRefineSearch");setEnqCookie("UniProKeySearch",Condition,1);dropdowncontent.ajaxconnect("MasterPages/UniProAjax.aspx?Condition= "+Condition+" &PageNo=1&PageSize=6","ctl00_ContentPlaceHolder1_tdDisPaging1|ctl00_ContentPlaceHolder1_tdDisPaging2|ctl00_ContentPlaceHolder1_tdProjects");var SearchVal="";if(document.getElementById("ctl00_ContentPlaceHolder1_KeywordSearchDropDown1_txtKeywordSearch").value.toLowerCase()=="name of builder or project")
SearchVal="All";else
SearchVal=document.getElementById("ctl00_ContentPlaceHolder1_KeywordSearchDropDown1_txtKeywordSearch").value;if(document.getElementById("ctl00_ContentPlaceHolder1_tdKeywordSearchResults"))
document.getElementById("ctl00_ContentPlaceHolder1_tdKeywordSearchResults").innerHTML="Showing results for: <span class='SearchLabel' style='padding-left: 15px;'>"+SearchVal+"</span>";}
function ShowHideProspect(Ele,id)
{if(Ele.innerHTML.indexOf("+")!=-1)
{Ele.innerHTML="[- Details]";if(document.getElementById("trProspect"+id))
document.getElementById("trProspect"+id).style.display="";}
else
{Ele.innerHTML="[+ Details]";if(document.getElementById("trProspect"+id))
document.getElementById("trProspect"+id).style.display="none";}}
function CheckNumValidate(Ele)
{
    var invalid="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`-=[]\\;\',./~!@#$%^&*()_+{}|:\"<>?";
    var isExist=false;
    if(Ele.value!="")
    {
        var eleVal=Ele.value;
        
        for(i=0;i<eleVal.split(',').length;i++)
        eleVal=eleVal.replace(",","");
        for(i=0;i<eleVal.split(',').length;i++)
        eleVal=eleVal.replace(",",""); 
        
        for(i=0;i<eleVal.length;i++)
        {
            if(invalid.indexOf(eleVal.substr(i,1))!=-1)
            {
                isExist=true;
                break;
            }
        }
}        
    return !isExist;
}
function RevisedInsertComm(val)
    {var strCurr=String(val);var retCurr="";
    for(c=0;c<strCurr.split(",").length;c++)
    strCurr=strCurr.replace(",","");
    for(c=0;c<strCurr.split(",").length;c++)
    strCurr=strCurr.replace(",","");i=0;for(p=0;p<strCurr.length;p++)
    {i++;if(i==4)
    retCurr=","+retCurr;if(i==6)
    retCurr=","+retCurr;if(i==8)
    retCurr=","+retCurr;if(i==10)
    retCurr=","+retCurr;retCurr=strCurr.substr(strCurr.length-i,1)+retCurr;}
    return retCurr;}
function RevisedOnMouseOver(Ele, SearchId)
{
Ele.className='selected';
}
function RevisedOnMouseOut(Ele, SearchId)
{
Ele.className='unselected';
}
function HideKeySearch(Ele)
{
    Ele.value="";
}
function ShowKeySearch(Ele)
{
    Ele.value="Keyword Search";
    if(document.getElementById("divReviedKeySearch"))
    {
        if(document.getElementById("divReviedKeySearch").innerHTML.indexOf("No Match Found")!=-1)
            document.getElementById("divReviedKeySearch").innerHTML="";
    }
}
function RevisedKeySearchOnMouseClick(Ele, DomainPath, SearchType, PropertyCategory, CityId)
{
    document.getElementById("divReviedKeySearch").innerHTML="";
    var SerchRowId=Ele.id;
//        alert(SerchRowId.split("|")[0])
    if(SearchType.toLowerCase()=="project" && PropertyCategory=="1")
        LoadRevisedResidentialKeySearch(DomainPath,SerchRowId.split("|")[0]);
    else if(SearchType.toLowerCase()=="property" && PropertyCategory=="1")
        LoadRevisedResaleKeySearch(DomainPath,SerchRowId.split("|")[0]);
    else if(SearchType.toLowerCase()=="project" && PropertyCategory=="2")
        LoadRevisedCommercialKeySearch(DomainPath,SerchRowId.split("|")[0]);
    else if(SearchType.toLowerCase()=="property" && PropertyCategory=="2")
        LoadRevisedCommResaleKeySearch(DomainPath,SerchRowId.split("|")[0]);
    else if(SearchType.toLowerCase()=="dynamic" && PropertyCategory=="1")
        LoadRevisedDynamicKeySearch(DomainPath,SerchRowId.split("|")[0]);

}
function SetPropertyTabPos()
{
    for(var i=0;i<99;i++)
    {   
        if(document.getElementById("imgScrollTab"+i) && document.getElementById("divScrollTab"+i))
        {  
            var offset =$(document.getElementById("imgScrollTab"+i)).offset();            
            document.getElementById("divScrollTab"+i).style.top = parseInt(offset.top + $(document.getElementById("imgScrollTab"+i)).height()-25)+ "px";
            document.getElementById("divScrollTab"+i).style.left = parseInt(offset.left + $(document.getElementById("imgScrollTab"+i)).width()-70)+ "px";           
        }
    }
}

//$(window).resize(function() {
//SetPropertyTabPos();
//});
function ShowRequestEBrochure(DisId, PID, DomainPath)
{
    var xmlHttp=GetXmlHttpObject();
    if(xmlHttp==null)
    {
        alert("Your browser does not support AJAX!");
        return;
    }
    document.getElementById(DisId).innerHTML="<img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/>";
    var url=DomainPath+"MasterPages/AjaxUnicon.aspx?RequestEBrochure=True&PID="+PID;
    xmlHttp.onreadystatechange=function()
    {
        if(xmlHttp.readyState==4)
        {
            var strdata=xmlHttp.responseText;
            if(strdata!="")
            {
                if(document.getElementById(DisId))
                {
                    document.getElementById(DisId).innerHTML=strdata;
                    if(document.getElementById("txtRequestEBroName"))
                        document.getElementById("txtRequestEBroName").focus();
//                    document.getElementById(DisId).style.backgroundImage="url("+DomainPath+"images/Black.gif)"; 
                    document.getElementById(DisId).style.borderStyle="none";
                    document.getElementById(DisId).style.backgroundColor="Transparent";

                }
            }
        }
    };
    xmlHttp.open("GET",url,true);
    xmlHttp.send(null);
}
function SendRequestedEBrochure(DisId, PID, DomainPath)
{
    var txtRequestEBroName = document.getElementById("txtRequestEBroName");
    var txtRequestEBroEmail = document.getElementById("txtRequestEBroEmail");
    
    if(txtRequestEBroName.value=="")
    {
        alert("Please enter name");
        txtRequestEBroName.focus();
        return false;
    }
    else if (!CheckCOCharacter(txtRequestEBroName))
    {
        alert("Please enter alphabets only");
        txtRequestEBroName.focus();
        return false;
    }
    else if(txtRequestEBroEmail.value=="")
    {
        alert("Please enter email");
        txtRequestEBroEmail.focus();
        return false;
    }
    else if(!Homeecheck(txtRequestEBroEmail.value))
    {
        txtRequestEBroEmail.focus();
        txtRequestEBroEmail.select();
        return false;
    }
    else
    {
        var xmlHttp=GetXmlHttpObject();
        if(xmlHttp==null)
        {
            alert("Your browser does not support AJAX!");
            return;
        }
        document.getElementById(DisId).innerHTML="<img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/>";
        var url=DomainPath+"MasterPages/AjaxUnicon.aspx?SendEBrochure=True&EBrochureName="+txtRequestEBroName.value+"&EBrochureEmail="+txtRequestEBroEmail.value+"&PID="+PID;
    //    alert(url)
        xmlHttp.onreadystatechange=function()
        {
            if(xmlHttp.readyState==4)
            {
                var strdata=xmlHttp.responseText;
                if(strdata!="")
                {
    //                if(document.getElementById(DisId))
    //                    document.getElementById(DisId).innerHTML=strdata.split("~")[0];
                       var thanksmsg=strdata;
                    ShowModelWindow("divEnquiry","PostReqThanksMessage",PID,thanksmsg)
                }
            }
        };
        xmlHttp.open("GET",url,true);
        xmlHttp.send(null);
    }
}
function ShowContactOwner(DisId, RPID, DomainPath)
{
    var xmlHttp=GetXmlHttpObject();
    if(xmlHttp==null)
    {
        alert("Your browser does not support AJAX!");
        return;
    }
    document.getElementById(DisId).innerHTML="<img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/>";
    var url=DomainPath+"MasterPages/AjaxUnicon.aspx?ContactOwner=True&RPID="+RPID;
    xmlHttp.onreadystatechange=function()
    {
        if(xmlHttp.readyState==4)
        {
            var strdata=xmlHttp.responseText;
            if(strdata!="")
            {
                if(document.getElementById(DisId))
                {
                    var Content = strdata.split("$");
                    if(Content.length>1)
                   {
                        HideLogin(DisId);
                       var divCO = document.getElementById("divCO"+RPID);
                       if(divCO)
                       {
                        divCO.style.display="";
                        divCO.innerHTML=Content[0];
                        
                        var divRPDetailsTabs = document.getElementById("divRPDetailsTabs");
	                    if(divCO && divRPDetailsTabs)
	                    {
	                            var offset =$(divRPDetailsTabs).offset();
                                divCO.style.width = $(divRPDetailsTabs).width()+10 + "px";
                                divCO.style.top = offset.top + 30 + "px";
	                            divCO.style.left = offset.left + "px";
	                    }
                       }
                   }
                   else
                   {
                    document.getElementById(DisId).innerHTML=Content[0];
                    if(document.getElementById("txtContactOwnerName"))
                        document.getElementById("txtContactOwnerName").focus();
                    }  
                    document.getElementById(DisId).style.borderStyle="none";
                    document.getElementById(DisId).style.backgroundColor="Transparent";                      
                }
            }
        }
    };
    xmlHttp.open("GET",url,true);
    xmlHttp.send(null);
}
function CheckCOCharacter(Ele)
{
    var invalid="0123456789`-=[]\\;\',./~!@#$%^&*()_+{}|:\"<>?";
    var isExist=false;
    if(Ele.value!="")
    {
        var eleVal=Ele.value;
        
        for(i=0;i<eleVal.split(',').length;i++)
        eleVal=eleVal.replace(",","");
        for(i=0;i<eleVal.split(',').length;i++)
        eleVal=eleVal.replace(",",""); 
        
        for(i=0;i<eleVal.length;i++)
        {
            if(invalid.indexOf(eleVal.substr(i,1))!=-1)
            {
                isExist=true;
                break;
            }
        }
}        
    return !isExist;
}
function DisplayResaleContactOwner(DisId, RPID, DomainPath)
{
    var txtContactOwnerName = document.getElementById("txtContactOwnerName");
    var txtContactOwnerEmail = document.getElementById("txtContactOwnerEmail");
    var txtContactOwnerPhone = document.getElementById("txtContactOwnerPhone");
    
    

    if(txtContactOwnerName.value=="")
    {
        alert("Please enter name");
        txtContactOwnerName.focus();
        return false;
    }
    else if (!CheckCOCharacter(txtContactOwnerName))
    {
        alert("Please enter alphabets only");
        txtContactOwnerName.focus();
        return false;
    }
    else if(txtContactOwnerEmail.value=="")
    {
        alert("Please enter email");
        txtContactOwnerEmail.focus();
        return false;
    }
    else if(!Homeecheck(txtContactOwnerEmail.value))
    {
        txtContactOwnerEmail.focus();
        txtContactOwnerEmail.select();
        return false;
    }
    else if(txtContactOwnerPhone.value=="")
    {
        alert("Please enter phone no.");
        txtContactOwnerPhone.focus();
        return false;
    }
    else if(!CheckNumValidate(txtContactOwnerPhone))
    {
        alert("Please enter number only");
        txtContactOwnerPhone.focus();
        return false;
    }
    else if(txtContactOwnerPhone.value.length!=10)
    {
        alert("Please enter proper mobile number");
        txtContactOwnerPhone.focus();
        return false;
    }
    else
    {
        var xmlHttp=GetXmlHttpObject();
        if(xmlHttp==null)
        {
            alert("Your browser does not support AJAX!");
            return;
        }
        document.getElementById(DisId).innerHTML="<img src='"+DomainPath+"images/loadingAnimation.gif' alt=''/>";
        var url=DomainPath+"MasterPages/AjaxUnicon.aspx?ContactOwnerDetails=True&ContactOwnerName="+txtContactOwnerName.value+"&ContactOwnerEmail="+txtContactOwnerEmail.value+"&ContactOwnerPhone="+txtContactOwnerPhone.value+"&RPID="+RPID;
    //    alert(url)
        xmlHttp.onreadystatechange=function()
        {
            if(xmlHttp.readyState==4)
            {
                var strdata=xmlHttp.responseText;
                if(strdata!="")
                {
    //                if(document.getElementById(DisId))
    //                    document.getElementById(DisId).innerHTML=strdata.split("~")[0];
                       var thanksmsg=strdata;
                       HideLogin(DisId);
                       var divCO = document.getElementById("divCO"+RPID);
                       if(divCO)
                       {
                        divCO.style.display="";
                        divCO.innerHTML=strdata.split("$")[0];
                        
                        var divRPDetailsTabs = document.getElementById("divRPDetailsTabs");
	                    if(divCO && divRPDetailsTabs)
	                    {
	                            var offset =$(divRPDetailsTabs).offset();
                                divCO.style.width = $(divRPDetailsTabs).width()+10 + "px";
                                divCO.style.top = offset.top + 30 + "px";
	                            divCO.style.left = offset.left + "px";
	                    }
                       }
                }
            }
        };
        xmlHttp.open("GET",url,true);
        xmlHttp.send(null);
    }
}
function HideCODetails(RPID)
{
    if(document.getElementById("divCO"+RPID))
    {
        document.getElementById("divCO"+RPID).innerHTML="";
        document.getElementById("divCO"+RPID).style.display="none";
    }        
}
function SetRevisedRefineOptionsQS(DomainPath,SetRefine)
{
    var HiddenQSProjProp=document.getElementById("ctl00_ContentPlaceHolder1_HiddenQSProjProp");
    var HiddenQSBed=document.getElementById("ctl00_ContentPlaceHolder1_HiddenQSBed");
    var HiddenQSPropType=document.getElementById("ctl00_ContentPlaceHolder1_HiddenQSPropType");
    var HiddenQSMinBdgt=document.getElementById("ctl00_ContentPlaceHolder1_HiddenQSMinBdgt");
    var HiddenQSMaxBdgt=document.getElementById("ctl00_ContentPlaceHolder1_HiddenQSMaxBdgt");
    var HiddenQSLoc=document.getElementById("ctl00_ContentPlaceHolder1_HiddenQSLoc");
    var HiddenLocId=document.getElementById("ctl00_ContentPlaceHolder1_HiddenLocId");
    var listSelectedLoc=document.getElementById("listSelectedLoc");
    var chkRefineCatId0=document.getElementById("chkRefineCatId0");
    var chkRefineCatId1=document.getElementById("chkRefineCatId1");
    var Bedrooms="";
    var PropType="";
    if(HiddenQSProjProp && chkRefineCatId0 && chkRefineCatId1)
    {
        if(HiddenQSProjProp.value=="0")
        {
            chkRefineCatId0.checked=true;
            chkRefineCatId1.checked=true;
        }
        else if(HiddenQSProjProp.value=="1")
        {
            chkRefineCatId0.checked=true;
            chkRefineCatId1.checked=false;
        }
        else if(HiddenQSProjProp.value=="2")
        {
            chkRefineCatId0.checked=false;
            chkRefineCatId1.checked=true;
        }
    }
    if(HiddenQSPropType&&HiddenQSPropType.value!="")
    {
        PropType=HiddenQSPropType.value;
        for(var i=0;i<10;i++)
        {
            if(document.getElementById("chkRefineTypeId"+i))
            {
                if(PropType.indexOf(":"+document.getElementById("chkRefineTypeId"+i).value+":")!=-1)
                {
                    document.getElementById("chkRefineTypeId"+i).checked=true;
                }
            }
        }
    }
    if(HiddenQSBed&&HiddenQSBed.value!="")
    {
        Bedrooms=HiddenQSBed.value;
        for(var i=0;i<10;i++)
        {
            if(document.getElementById("chkRefineBedRooms"+i))
            {
                if(Bedrooms.indexOf(":"+document.getElementById("chkRefineBedRooms"+i).value+":")!=-1)
                {
                    document.getElementById("chkRefineBedRooms"+i).checked=true;
                }
            }
        }
    }
    if(HiddenQSMinBdgt&&document.getElementById("ddlRefineMinBdgt"))
    {
        if(HiddenQSMinBdgt.value!="")
            document.getElementById("ddlRefineMinBdgt").value=HiddenQSMinBdgt.value;
    }
    if(HiddenQSMaxBdgt&&document.getElementById("ddlRefineMaxBdgt"))
    {
        if(HiddenQSMaxBdgt.value!="")
            document.getElementById("ddlRefineMaxBdgt").value=HiddenQSMaxBdgt.value;
    }
    if(HiddenQSLoc&&HiddenLocId&&listSelectedLoc)
    {
        if(HiddenQSLoc.value!="")
        {
            document.getElementById("chooseloc").style.display="none";
            document.getElementById("removeloc").style.display="";
            listSelectedLoc.innerHTML=HiddenQSLoc.value;
        }
    }
    var HiddenPropPage=document.getElementById("ctl00_ContentPlaceHolder1_HiddenPropPage");
    var PageNo="1";
    if(HiddenPropPage)
        PageNo=HiddenPropPage.value;
    if(SetRefine=="ResiCityProperty")
        ShowResaleRefineResults(DomainPath,PageNo);
    else if(SetRefine=="ResiCityProject")
        ShowProjectRefineResults(DomainPath,PageNo);
    else if(SetRefine=="CommRefineProject")
        ShowCommProjectRefineResults(DomainPath,PageNo);
    else if(SetRefine=="CommRefineProperty")
        ShowResaleCommRefineResults(DomainPath,PageNo);
    else if(SetRefine=="DynamicPage")
        ShowRevisedDynamicPageRefineResults(DomainPath,1,0);
}
