	var alphabets ="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; var numbers ="0123456789"; var ns = (navigator.appName.indexOf("Netscape") != -1); var d = document; var n=navigator.appName; var ie=(n=="Microsoft Internet Explorer"); var ipPropertyTypeArr=null; function $ip(){ var elements = new Array(); for (var i = 0; i < arguments.length; i++) { var element = arguments[i]; if(typeof element == 'string') element = d.getElementById(element); if(arguments.length == 1) return element; elements.push(element); } return elements; } var ip = { loadingStr : "<img src=\"http://imgs.indiaproperty.com/loading.gif\" alt=\"\" width=\"16\" height=\"16\" class=\"AlignM\" hspace=\"3\" /><b>Loading... Please wait...</b>", url:"", str:"", strLen : 0, OpenPopUp : function(url,left,top,width,height,title,scroll,resize){ if(!left) left=100; if(!top) top=100; if(!width) width=450; if(!height) height=400; scroll=(height>=700 || scroll)?"yes":"no"; if(!resize) resize="no"; title = (title=="" || !title) ? "IndiaProperty" : title; newWindow = window.open(url,title,'height='+height+',width='+width+',left='+left+',top='+top+',taskbar=no,linkbar=no,resizable='+resize+',scrollbars='+scroll); newWindow.focus(); }, loading : function(Str){ return '<img src="http://imgs.indiaproperty.com/loading.gif" alt="" width="16" height="16" class="AlignM" hspace="3" />' + Str; }, loadingLB: function(Str,w){ if(!w) w = "auto"; else w = w + "px"; return '<div style="float:left; display:block; background-color:#fff; width:'+ w +';"><div class="lBox_dotB"><div class="lBox_dotR"><div class="lBox_dotT"><div class="lBox_dotL"><div class="lBox_bRC"><div class="lBox_bLC"><div class="lBox_tRC"><div class="lBox_tLC"><div style="padding:20px;"><img src="http://imgs.indiaproperty.com/loading.gif" alt="" width="16" height="16" class="AlignM" hspace="3" />' + Str + '</div></div></div></div></div></div></div></div></div><br clear="all" />'; }, confirmActive : false, confirmFocusTimer : null, confirmStatus : null, confirmLBDivObj : null, lbActive : false,lbObject : null,lbFocusTimer : null,lbType : "alert", lbDivObj : null, simpleAlertActive : false,simpleAlertObject : null,simpleAlertFocusTimer : null, simpleAlertDivObj : null, lbContent: function(Str,w,onCloseF){ if(!onCloseF || onCloseF==null) onCloseF = "ip.exitLB()"; if(!w) w = "auto"; else w = w + "px"; return '<div style="float:left; display:block; background-color:#fff; width:'+ w +';"><div class="lBox_dotB"><div class="lBox_dotR"><div class="lBox_dotT"><div class="lBox_dotL"><div class="lBox_bRC"><div class="lBox_bLC"><div class="lBox_tRC"><div class="lBox_tLC" style="padding:20px;"><div style="float:right;" id="divGlobalClose"><a href="javascript:void(0)" class="closeX" onclick="javascript:'+ onCloseF +';">&nbsp;</a></div><br clear="all" />' + Str + '</div></div></div></div></div></div></div></div></div><br clear="all" />'; }, lbAlert: function(Str,w,AlertType,onCloseF){ if(!w) w = "300"; else w = w + "px"; if(!onCloseF || onCloseF==null) onCloseF = "ip.exitLB()"; return '<div style="float:left; display:block; background-color:#fff; width:'+ w +';"><div class="lBox_dotB"><div class="lBox_dotR"><div class="lBox_dotT"><div class="lBox_dotL"><div class="lBox_bRC"><div class="lBox_bLC"><div class="lBox_tRC"><div class="lBox_tLC" style="padding:20px 20px 0px;"> ' + '<div style="background:url(\'http://imgs.indiaproperty.com/icons/alert_lb.gif\') no-repeat 0% 30%; color:#4B4B4B; line-height:17px; font-family:Arial; font-weight:normal; padding:20px 20px 20px 50px;"><span id="divLBGlobalMsg">' + Str + '</span><br /><div style="text-align:right; padding-top:10px;" id="divGlobalClose"><a href="javascript:void(0);" onclick="javascript:'+ onCloseF +';" class="button" style="pointer:cursor;" id="lbAlertCloseBtn">Close</a></div>' + ' </div></div></div></div></div></div></div></div></div></div><br clear="all" />'; }, simpleAlert : function(Str,w,AlertType,onCloseF){ if(!w) w = "300"; else w = w + "px"; if(!onCloseF || onCloseF==null) onCloseF='ip.exitSimpleAlert()'; return '<div id="DivAlertLB" style="float:left; display:block; background-color:#fff; width:'+ w +';"><div class="lBox_dotB"><div class="lBox_dotR"><div class="lBox_dotT"><div class="lBox_dotL"><div class="lBox_bRC"><div class="lBox_bLC"><div class="lBox_tRC"><div class="lBox_tLC" style="padding:20px 20px 0px;"> ' + '<div style="background:url(\'http://imgs.indiaproperty.com/icons/alert_lb.gif\') no-repeat 0% 30%; color:#4B4B4B; line-height:17px; font-family:Arial; font-weight:normal; padding:20px 20px 20px 50px;">' + Str + '<br /><div style="text-align:right; padding-top:10px;" id="divGlobalClose"><a href="javascript:void(0);" onclick="javascript:'+ onCloseF +';" class="button" style="pointer:cursor;" id="lbAlertCloseBtn">Close</a></div>' + ' </div></div></div></div></div></div></div></div></div></div><br clear="all" />'; }, makeCenterLB : function(){ if(ip.confirmActive)lbA.setCenterPos(this.confirmLBDivObj); if(ip.simpleAlertActive){ lb.setCenterPos(this.lbDivObj); lbA.setCenterPos(this.simpleAlertDivObj); } if(ip.lbActive)lb.setCenterPos(this.lbDivObj); }, startLB: function(Obj,Str,w,AlertType,onCloseF,url,focusObj){ if(!w) w=300; try{ if(lb==null || typeof(lb)=="undefined"){ lb = new ipLightBox('divLightBox','',"",250);} lb.init(); clearTimeout(this.lbFocusTimer); this.lbActive = true; this.lbType = AlertType; this.lbObject = Obj; var divObj = $ip("divLBcontent"); this.lbDivObj = divObj; divObj.innerHTML = ip.loadingLB("Loading info... Please wait...",280); divObj.style.display =""; this.makeCenter(divObj,w,200); /*divObj.onclick = function(){ip.exitLB(divObj,Obj);}*/ switch(AlertType){ case "aJax": var aJax = new getHTTPObject(); url = (url.indexOf("http://")!=-1) ?  url : String(ip.host() + url); aJax.open("get",url,true); aJax.onreadystatechange = function(){ if(aJax.readyState==4){ var res = aJax.responseText; if(res=="") res=ip.errMsg; ip.makeCenter(divObj,500,300); divObj.innerHTML = ip.lbContent(res,500); ip.makeCenter(divObj); try{ if(typeof(focusObj)=="string"){ if(focusObj.indexOf(".")!=-1){eval(focusObj+".focus();");}else{$ip(focusObj).focus();} }else{ if(focusObj!=null || focusObj!=""){$ip(focusObj).focus();} } }catch(e){ip.traceErr(e,"startLB");} } }; aJax.send(null); ip.sleep(function(){ if( String(divObj.innerHTML).indexOf("Please wait...")!=-1){ divObj.innerHTML =  ip.lbAlert("Unable to access this service currently, Please try again later.<br />",w,AlertType,onCloseF); } },40000); break; case "message": divObj.innerHTML = ip.lbContent(Str,w); ip.makeCenter(divObj,divObj.offsetWidth,divObj.offsetHeight); break; default: divObj.innerHTML = ip.lbAlert(Str,w,AlertType,onCloseF); ip.sleep(function(){try{$ip("lbAlertCloseBtn").focus();}catch(e){ip.traceErr(e,"startLB","ip_common.js");}},"2000"); break; } this.startKeyDetect(this.getKey); }catch(e){ip.traceErr(e,"startLB","ipcommon");} }, startAlert: function(Obj,Str,w,AlertType,onCloseF,url,focusObj){ if(!w) w=300; try{ if(lbA==null || typeof(lbA)=="undefined"){lbA = new ipLightBox('divLBAlertWindow','',"",250);} this.simpleAlertActive = true; this.simpleAlertObject = Obj; lbA.init(); clearTimeout(this.simpleAlertFocusTimer); var divObj = $ip("divLBAlert"); this.simpleAlertDivObj = divObj; divObj.style.display =""; divObj.innerHTML = ip.loadingLB("Loading info... Please wait...",280); this.makeCenter(divObj,w,200); /*divObj.onclick = function(){ip.exitLB(divObj,Obj);}*/ switch(AlertType){ case "aJax": var aJax = new getHTTPObject(); var url = ip.host() + url; aJax.open("get",url,true); aJax.onreadystatechange = function(){ if(aJax.readyState==4){ var res = aJax.responseText; if(res=="") res="Unable to access this service currently, Please try again later.<br />"; ip.makeCenter(divObj,500,300); divObj.innerHTML = ip.lbContent(res,500); window.setTimeout(function(){ if(focusObj!=null || focusObj!=""){ try{$ip(focusObj).focus();}catch(e){ip.traceErr(e,"startLB");} } },2000); } }; aJax.send(null); ip.sleep(function(){ if( String(divObj.innerHTML).indexOf("Please wait...")!=-1){ divObj.innerHTML = "Unable to access this service currently, Please try again later.<br />"; } },20000); break; default: divObj.innerHTML = ip.simpleAlert(Str,w,AlertType,onCloseF); break; } }catch(e){ip.traceErr(e,"startAlert","ipcommon");} }, Confirm: function(Str,w,confirmOptions){ if(!w) w=300; try{ if(lbA==null || typeof(lbA)=="undefined"){lbA = new ipLightBox('divLBAlertWindow','',"",250);} lbA.init(); this.confirmStatus = null; this.confirmActive = true; clearTimeout(this.confirmFocusTimer); var divObj = $ip("divLBAlert"); divObj.style.display =""; this.makeCenter(divObj,w,200); divObj.innerHTML = ip.lbConfirm(Str,w,confirmOptions); this.startKeyDetect(this.getKey); }catch(e){ip.traceErr(e,"ip.confirm","ipcommon");} }, lbConfirm : function(Str,w,confirmOptions){ var imgW = parseInt(w / 10); if(!w) w = "300"; else w = w + "px"; var arr = confirmOptions.split("|"); if(arr.length<=1) arr = ["Yes","No"]; return '<div style="float:left; display:block; background-color:#fff; width:'+ w +';"><div class="lBox_dotB"><div class="lBox_dotR"><div class="lBox_dotT"><div class="lBox_dotL"><div class="lBox_bRC"><div class="lBox_bLC"><div class="lBox_tRC"><div class="lBox_tLC" style="padding:20px 20px 0px;"> ' + '<div style="background:url(\'http://imgs.indiaproperty.com/icons/alert_q.gif\') no-repeat 0% 30%; color:#4B4B4B; line-height:17px; font-family:Arial; font-weight:normal; padding:20px 20px 20px 50px;">' + Str + '<br /><div style="text-align:center; padding-top:10px;"><input type="button" class="button" onclick="javascript:ip.exitConfirm(null,1);" value="'+ ip.toTitleCase(arr[0]) +'"  id="lbAlertYesBtn" /><img src="http://imgs.indiaproperty.com/trans.gif" width="'+ imgW +'" height="1" alt="" /><input type="button" class="button" onclick="javascript:ip.exitConfirm(null,0);" value="'+ ip.toTitleCase(arr[1]) +'" id="lbAlertNoBtn"/></div>' + ' </div></div></div></div></div></div></div></div></div></div><br clear="all" />'; }, exitLB : function(fromObj,Obj){ if(!fromObj) fromObj=$ip("divLBcontent"); this.lbActive = false; if(!Obj) Obj=this.lbObject; this.lbObject = null; lb.exit(); fromObj.style.display="none"; fromObj.innerHTML =""; this.stopEvent(d.onkeyup); this.lbFocusTimer = window.setTimeout(function(){try{Obj.focus();}catch(e){try{Obj[0].focus();}catch(e1){}};},1000); }, exitSimpleAlert : function(fromObj,Obj){ if(!fromObj) fromObj=$ip("divLBAlert"); lbA.exit(); this.simpleAlertActive= false; if(!Obj) Obj=this.simpleAlertObject; this.simpleAlertObject= null; fromObj.style.display="none"; fromObj.innerHTML =""; this.simpleAlertFocusTimer = window.setTimeout(function(){try{Obj.focus();}catch(e){try{Obj[0].focus();}catch(e1){}};},1000); }, exitConfirm: function(fromObj,confirmStatus){ if(!fromObj) fromObj=$ip("divLBAlert"); this.confirmActive= false; lbA.exit(); fromObj.style.display="none"; fromObj.innerHTML =""; this.confirmFocusTimer = window.setTimeout(function(){try{Obj.focus();}catch(e){try{Obj[0].focus();}catch(e1){}};},1000); this.confirmStatus=confirmStatus; }, toTitleCase : function(String){ this.Str = String; this.Str=this.Str.replace(/  /g," "); this.Str = this.Str.toLowerCase(); Arr = this.Str.split(" "); for (var i=0; i<Arr.length; i++){ Arr[i] = Arr[i].substr(0,1).toUpperCase() + Arr[i].substr(1,Arr[i].length); } this.Str = ""; for (var i=0; i<Arr.length; i++){ this.Str = (i==0) ? Arr[i] : this.Str + " " + Arr[i]; } return this.Str; }, OpenPage:function(url){window.location=url;}, Ask:function(str){return confirm(str) ? true : false;}, showtcpopup : function(){ this.url = ip.host() + "/index.php?option=site&page=termsandcondition&notemplate=yes"; this.OpenPopUp(this.url,0,0,615,600,"TermsAndCondition","yes"); }, populate : function(Obj,frm,bflag,isBuyer,addAny){ var a=0; var bStr=""; if(!frm) frm=d.quicksearch; if(this.isObject(Obj)){ try{a=Obj.options[Obj.selectedIndex].value;}catch(e){a =Obj.value;} }else{a=Obj;} if(!bflag) bStr="individualhouse"; else bStr="bungalow"; if(a=="buy" || a=="sell" || a=="sale" || a=="0"){ arr = new Array('0','Property Type','allresidential','All Residential','apartment_individualapartment','Apartment', 'bungalow_individualhouse','Independent House/Villa', 'apartment_builderfloor','Builder Floor', 'bungalow_farmhouse','Farm House', 'allcommercial','All Commercial', 'retail_retailshowroomshop','Retail Showroom/Shop', 'officespace_commercialbuilding','Commercial Building', 'officespace_officecomplex','Office Complex', 'officespace_itsoftwaretechnologypark','IT/ Software Technology Park', 'specialeconomiczone','All SEZ', 'sez_commercialbuilding','Commercial Building', 'sez_industrialestate','Industrial Estate', 'sez_itsoftwaretechnologypark','IT/ Software Technology Park', 'allland','All Land / Plots', 'land_residentialuse','Residential Land', 'land_commercialuse','Commercial Land', 'land_industrialuse','Industrial Land', 'land_agriculturaluse','Agricultural Land', 'land_farmhouseplots','Farm House Land' ); }else if(a=="rent"){ arr =  new Array('0','Property Type','allresidential','All Residential','apartment_individualapartment','Apartment', 'bungalow_individualhouse','Independent House/Villa','apartment_servicedapartment','Serviced Apartment', 'bungalow_farmhouse','Farm House', 'allcommercial','All Commercial', 'retail_retailshowroomshop','Retail Showroom/Shop', 'officespace_commercialbuilding','Commercial Building', 'officespace_officecomplex','Office Complex', 'officespace_itsoftwaretechnologypark','IT/ Software Technology Park', 'specialeconomiczone','All SEZ', 'sez_commercialbuilding','Commercial Building', 'sez_industrialestate','Industrial Estate', 'sez_itsoftwaretechnologypark','IT/ Software Technology Park', 'allland','All Land / Plots', 'land_residentialuse','Residential Land', 'land_commercialuse','Commercial Land', 'land_industrialuse','Industrial Land', 'land_agriculturaluse','Agricultural Land', 'land_farmhouseplots','Farm House Land'); }else if(a=="rentzone"){ arr =  new Array('0','Property Type','allresidential','All Residential','apartment_individualapartment','Apartment', 'bungalow_individualhouse','Independent House/Villa','apartment_servicedapartment','Serviced Apartment', 'bungalow_farmhouse','Farm House', 'allcommercial','All Commercial', 'retail_retailshowroomshop','Retail Showroom/Shop', 'officespace_commercialbuilding','Commercial Building', 'officespace_officecomplex','Office Complex', 'officespace_itsoftwaretechnologypark','IT/ Software Technology Park'); }else if(a=="accommodation"){ arr =  new Array('0','Property Type','apartment_individualapartment','Apartment', 'bungalow_individualhouse','Independent House/Villa');/*,'any','Any'*/ }else{ arr = new Array('0','Property Type','allresidential','Residential','apartment_individualapartment','Apartment', 'bungalow_individualhouse','Independent House/Villa', 'apartment_builderfloor','Builder Floor', 'bungalow_farmhouse','Farm House'); } if(isBuyer){arr = new Array('0','Property Type','apartment','Apartment',bStr,'Independent house','retail','Retail space','officespace','Office space','land','Land','specialeconomiczone','SEZ (Special Economic Zone)');} if(addAny){arr.push('any'); arr.push('Any');} var ObjPropertyCat = frm.property; for(i=0;i<ObjPropertyCat.length;i++) ObjPropertyCat.options[i]=null; ObjPropertyCat.options.length = 0; for(i=0;i<arr.length;i+=2){ ObjPropertyCat.options[i/2] = new Option(arr[i+1],arr[i]); if(arr[i].toLowerCase().indexOf("all")==0 || arr[i].toLowerCase().indexOf("any")==0 || arr[i].toLowerCase().indexOf("specialeconomiczone")==0){ObjPropertyCat.options[i/2].className = "optionbg";} } }, getPropertyTypeArr:function(trans,propertyArr,Obj,addOptionsPrefix,addOptionsSuffix){ var arr=new Array(); var tempArr=new Array(); switch(trans){ case "rent": tempArr = propertyArr.rent; break; case "pg": try{tempArr = propertyArr.pg;}catch(e){ip.traceErr(e,"getPropertyTypeArr");tempArr=propertyArr.sell;} break; default: tempArr = propertyArr.sell; break; } if(addOptionsPrefix && addOptionsPrefix!="") arr.push(addOptionsPrefix); for (var i=0; i<tempArr.length; i++) for (var j=0; j<tempArr[i].length; j++) arr.push(tempArr[i][j]); if(addOptionsSuffix && addOptionsSuffix!="") arr.push(addOptionsSuffix); for(i=0;i<Obj.length;i++) Obj.options[i]=null; Obj.options.length = 0; for(i=0;i<arr.length;i++){ optArr = arr[i].split("|"); Obj.options[i] = new Option(optArr[1],optArr[0]); if(optArr[0].toLowerCase().indexOf("all")==0 || optArr[0].toLowerCase().indexOf("any")==0 || optArr[0].toLowerCase().indexOf("specialeconomiczone")==0){Obj.options[i].className = "optionbg";} } }, genProperty: function(trans,frm,bflag,isBuyer){ this.populate(trans,frm,bflag,isBuyer); }, throwErr :function(Obj,Msg,ErrType,DivId){ if(!ErrType) alert(Msg); else if(ErrType==1){ var DivObj = ($ip(DivId)) ? $ip(DivId) : new Object; DivObj.innerHTML = Msg; DivObj.style.display=""; }else{ if(this.lbActive){ try{if(this.Trim($ip("divLBGlobalMsg").innerHTML)==Msg) return false;}catch(e){this.traceErr(e,"throwErr","ip_common");} this.startAlert(Obj,Msg,300,'alert'); } else this.startLB(Obj,Msg); return false; } if(!Obj) return false; try{Obj.focus();}catch(e){try{Obj[0].focus();}catch(e1){}} return false; }, throwSuccess:function(Obj,Msg,ErrType,DivId){ if(!ErrType) return true; else if(ErrType==1){ var DivObj = ($ip(DivId)) ? $ip(DivId) : new Object; DivObj.innerHTML = ""; DivObj.style.display="none"; }else{ /* Exit All LightBox Eff*/ } return true; }, infiniteCharInString : function(string,Allchar){ for(var i=0; i<Allchar.length; i++) { arr = string.split(Allchar.charAt(i)); if( (parseInt(arr.length) - 1)>1) return false; } return true; }, print : function(Str){ try{ if(document.getElementById("divDebug")){ with(document.getElementById("divDebug")){ style.padding = "10px"; style.display = "none"; innerHTML+='<br /><span style="color:#'+Math.floor(Math.random() * 999999)+'">' + Str+'</span>'; } }else{window.setTimeout(function(){ip.print(Str)},3000);} }catch(e){this.traceErr(e,'ip.print','common');} }, host : function(){ try{ if(location.href==null || location.href=="" || location.href.indexOf("indiaproperty")==-1){ return "http://www.indiaproperty.com"; } var startDotCom = location.href.indexOf(".com"); startDotCom = startDotCom + 4; return (location.href.substring(0,startDotCom).indexOf("indiaproperty.com")) ? location.href.substring(0,startDotCom) : "http://www.indiaproperty.com"; }catch(e){return "http://www.indiaproperty.com";} }, LTrim : function(Str){ var i = 0; var j = Str.length - 1; if (Str== null){return (false);} for (i = 0; i < Str.length; i++){ if (Str.substr(i, 1) != ' ' && Str.substr(i, 1) != '\t') break; } if (i <= j) return (Str.substr(i, (j+1)-i)); else return (''); }, RTrim : function(Str){ var i = 0; var j = Str.length - 1; if(Str == null)return (false); for(j = Str.length - 1; j >= 0; j--){ if (Str.substr(j, 1) != ' ' && Str.substr(j, 1) != '\t') break; } if (i <= j) return (Str.substr(i, (j+1)-i)); else return (''); }, Trim : function(Str){ if (Str == null) return (false); return this.RTrim(this.LTrim(Str)); }, IsValidEmail : function(Str){ var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; return (filter.test(Str)) ? true : false; }, traceErr : function(e,from,jsFile,NoPrintStatus){ if(!NoPrintStatus) ip.print("<b><i>Func : " + from + "</i></b>, "+ e.name +" : " + e.message + ", Desc = "+ e.description + ", JS : " + jsFile + ", LineNumber : " + e.lineNumber); }, sleep : function(func,time){ window.setTimeout(func,time); }, setTimer : function(func,time){ window.setInterval(func,time); }, area_calc:function(){ url="/index.php?option=calculator&page=plotareaconverter&notemplate=yes"; this.startLB(null,null,null,"aJax",null,url,"sqft"); }, calc:function(page){ url="/index.php?option=calculator&page="+page+"&notemplate=yes"; var Obj = (page=="emi") ? "emi_amount" : "affordamt"; this.startLB(null,null,null,"aJax",null,url,Obj); }, getKey : function(e){ if( !e ) { if( window.event ) { e = window.event; } else { return 0; } } if( typeof( e.keyCode ) == 'number'  ) { e = e.keyCode; } else if( typeof( e.which ) == 'number' ) { e = e.which; } else if( typeof( e.charCode ) == 'number'  ) { e = e.charCode; } else { return 0; } var rKey = parseInt(e); if(ip.confirmActive){ if(rKey==27 || rKey==32){/*esc || enter (is problem) || space */ ip.exitConfirm($ip('divLBAlert'),0); return false; } } if(ip.simpleAlertActive){ if(rKey==27 || rKey==32){/*esc || enter (is problem) || space */ ip.exitSimpleAlert($ip('divLBAlert'),ip.simpleAlertObject); return false; } } if(ip.lbActive){ if(rKey==27 || (rKey==32 && ip.lbType!="aJax") ){/*esc || enter (is problem) || space */ ip.exitLB($ip('divLBcontent'),ip.lbObject); return false; } } return [e,String.fromCharCode( e )]; }, startKeyDetect : function(f){ /* Netscape 4 Need this IF Condition */ if(d.captureEvents && Event.KEYUP ) d.captureEvents( Event.KEYUP ); if(!f) return; else d.onkeyup = f; }, stopEvent : function(e){ try{ e.returnValue = false; e.cancelBubble = true; if(e.stopPropagation) e.stopPropagation(); /*Event.stop(e);*/ }catch(e){ip.traceErr(e,"stop event","comon")} }, getPageScroll : function(){ var scrOfX = 0, scrOfY = 0; if( typeof( window.pageYOffset ) == 'number' ) { scrOfY = window.pageYOffset; scrOfX = window.pageXOffset; } else if( d.body && ( d.body.scrollLeft || d.body.scrollTop ) ) { scrOfY = d.body.scrollTop; scrOfX = d.body.scrollLeft; } else if( d.documentElement && ( d.documentElement.scrollLeft || d.documentElement.scrollTop ) ) { scrOfY = d.documentElement.scrollTop; scrOfX = d.documentElement.scrollLeft; } return [ scrOfX, scrOfY ]; }, getCenterXY : function(w,h){ var x=0,y=0; x = (this.getPageSize()[2] - w) / 2; y = (this.getPageScroll()[1] + ((this.getPageSize()[3] - h) / 2)); return [x,y]; }, makeCenter : function(Obj,w,h){ if(!w || w==0 || w==null){w=Obj.offsetWidth;} if(!h || h==0 || h==null){h=Obj.offsetHeight;} var xy = this.getCenterXY(w,h); ip.print("xy = " + xy); with(Obj.style){ left = (xy[0]) + "px"; top= (xy[1]) + "px"; } }, getScrollWidth : function(){ var w = window.pageXOffset || d.body.scrollLeft || d.documentElement.scrollLeft; return w ? w : 0; }, getScrollHeight : function (){ var h = window.pageYOffset || d.body.scrollTop || d.documentElement.scrollTop; return h ? h : 0; }, getPos: function(inputElement) { var coords =  new Object(); coords.x = 0; coords.y = 0; try { targetElement = inputElement; if(targetElement.x && targetElement.y) { coords.x = targetElement.x; coords.y = targetElement.y; } else { if(targetElement.offsetParent) { coords.x += targetElement.offsetLeft; coords.y += targetElement.offsetTop; while(targetElement = targetElement.offsetParent) { coords.x += targetElement.offsetLeft; coords.y += targetElement.offsetTop; } } else { /*/alert("Could not find any reference for coordinate positioning.");*/ } } return coords; } catch(e){ ip.traceErr(e,"getPos","ipCommon"); return coords; } }, getPageSize : function(){ var xScroll, yScroll; if (window.innerHeight && window.scrollMaxY) { xScroll = d.body.scrollWidth; yScroll = window.innerHeight + window.scrollMaxY; } else if (d.body.scrollHeight > d.body.offsetHeight){ /* all but Explorer Mac*/ xScroll = d.body.scrollWidth; yScroll = d.body.scrollHeight; } else { /* Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari*/ xScroll = d.body.offsetWidth; yScroll = d.body.offsetHeight; } var windowWidth, windowHeight; if (self.innerHeight) {	/* all except Explorer*/ windowWidth = self.innerWidth; windowHeight = self.innerHeight; } else if (d.documentElement && d.documentElement.clientHeight) { /* Explorer 6 Strict Mode*/ windowWidth = d.documentElement.clientWidth; windowHeight = d.documentElement.clientHeight; } else if (d.body) { windowWidth = d.body.clientWidth; windowHeight = d.body.clientHeight; } /* for small pages with total height less then height of the viewport*/ if(yScroll < windowHeight){ pageHeight = windowHeight; } else { pageHeight = yScroll; } /* for small pages with total width less then width of the viewport*/ if(xScroll < windowWidth){pageWidth = windowWidth;} else {pageWidth = xScroll;} arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight); return arrayPageSize; }, isObject : function(Obj){return (!Obj || Obj==null || Obj=="undefined" || typeof(Obj)=="string") ? false : true;} }; var Preloader = { callbacks: [], images: [], loadedImages: [], imagesLoaded: 0, add: function(image){ if (typeof image == 'string') this.images.push(image); if (typeof image == 'array' || typeof image == 'object'){for (var i=0; i< image.length; i++){this.images.push(image[i]);}} }, onFinish: function(func){ if (typeof func == 'function') this.callbacks.push(func); if (typeof func == 'array' || typeof func == 'object'){for (var i=0; i< func.length; i++){this.callbacks.push(func[i]);}} }, load: function(){ for(var i=0; i<this.images.length; i++){ this.loadedImages[i]= new Image(); this.loadedImages[i].onload = function(){Preloader.checkFinished.apply(Preloader);}; this.loadedImages[i].src = this.images[i]; } }, checkFinished: function(){ this.imagesLoaded++; if(this.imagesLoaded == this.images.length){this.fireFinish();} }, fireFinish: function(){ for (var i=0; i<this.callbacks.length; i++){this.callbacks[i]();} this.images = []; this.loadedImages = []; this.imagesLoaded = 0; this.callbacks = []; } }; function StartPreLoader(ImageSrc,ImageId,LoadingDivId){ Preloader.add(ImageSrc); var finishFunc = function(){ if($ip(LoadingDivId)){$ip(LoadingDivId).style.display = 'none';} if($ip(ImageId)){$ip(ImageId).src =ImageSrc;} }; Preloader.onFinish(finishFunc); Preloader.load(); } function IsMandatory(obj, obj_type,	Msg,	ErrType, DivId){ if (obj_type == "text" || obj_type == "password" || obj_type == "textarea" || obj_type == "file"){ if(obj_type != "file") obj.value = ip.Trim(obj.value); var objValue; objValue = obj.value.replace(/\s+$/,""); if (objValue.length == 0){return ip.throwErr(obj,Msg,ErrType,DivId);}else{return ip.throwSuccess(obj, Msg, ErrType, DivId);} }else if (obj_type == "select"){ if(obj.selectedIndex==-1 || obj.options[obj.selectedIndex].value=="0" || obj.options[obj.selectedIndex].value=="00" || obj.options[obj.selectedIndex].value=="" || (obj.options[obj.selectedIndex].value=="any" && obj.name=="state") ) return ip.throwErr(obj,Msg,ErrType,DivId); else{return ip.throwSuccess(obj, Msg, ErrType, DivId);} }else if (obj_type == "radio" || obj_type == "checkbox"){ if (!obj[0] && obj){ if (!obj.checked){return ip.throwErr(obj,Msg,ErrType,DivId);}else {return ip.throwSuccess(obj, Msg, ErrType, DivId);} }else{ for (i=0; i < obj.length; i++){ if(obj[i].checked){return ip.throwSuccess(obj, Msg, ErrType, DivId);}} return ip.throwErr(obj[0],Msg,ErrType,DivId); } }else{return ip.throwErr(obj,Msg,ErrType,DivId);} } function IsFoundCharacters(ObjVal, str){ for( var i= 0; i< ObjVal.length; i++ ){ var m = false; for( var j= 0; j< str.length; j++){ if( ObjVal.charAt(i) == str.charAt(j) || String(ObjVal.charCodeAt(i))==String(10) || String(ObjVal.charCodeAt(i))==String(13)) m = true; } if(!m) return false; } return true; } function IsValidCharacters(Value, AllChars, AtleastChars){ /*AllChars = AllChars.replace(/\n/g,"");*/ if(IsFoundCharacters(Value,AllChars) && AtleastOneChar(Value,AtleastChars) && IsFoundCharacters(Value.substr(0,1),AtleastChars) ) return true; else return false; } function AtleastOneChar(Expression,ValidateChar){ ValidateChar = (ValidateChar=="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") ? /[^a-zA-Z]/g : ValidateChar; ValidateChar = (ValidateChar=="0123456789") ? /[^0-9]/g : ValidateChar; var charString = Expression.replace(ValidateChar, ""); if(charString.length < 1){return false;} return true; } function IsMin(Str,Len){return (Str.length<Len) ? true : false;} function IsMax(Str,Len){return (Str.length>Len) ? true : false;} var ArrText = new Array("Delhi / NCR (All)","Delhi NCR (All)","Mumbai (All)","Bangalore (All)","Chennai (All)","Hyderabad (All)","Ahmedabad (All)","International Cities","Any City","Other Cities","Kolkata (All)","Kochi (All)","Pune (All)"); var ArrNew = new Array("Delhi","Delhi","Mumbai","Bangalore","Chennai","Hyderabad","Ahmedabad","AbuDhabi","Any","Others","Kolkata","Kochi","Pune"); function propertiesByArray(e){ var propByArr=""; for (var i=0; i<e.length; i++){ propByArr = propByArr + ( (e[i].checked) ? ((propByArr=="") ? "" : "|") + e[i].value  : ""); } return propByArr; } function checkquicksearchbox(frm){ if(!frm) frm = d.quicksearch; try{if(!IsMandatory(frm.transaction,"select","Please Select Transaction Type",2)) return false;}catch(e){} if(!IsMandatory(frm.property,"select","Please Select Property type",2)) return false; if(!IsMandatory(frm.city,"select","Please Select City",2))  return false; tempcity = frm.city.options[frm.city.selectedIndex].text; for(var i=0; i<ArrText.length; i++) {if(tempcity==ArrText[i]) tempcity=ArrNew[i];} tempcity=tempcity.replace(" ","+"); var qry = ip.host()+"/search/" +  frm.transaction.value + "/" + frm.property.options[frm.property.selectedIndex].value + "-in/"; try{ var usertypeArr = frm.elements["strusertype[]"]; var newpath = "/"; var propByArr=propertiesByArray(usertypeArr); var ipCookie = new ip_cookie(); ipCookie.setCookie("propertyBy",propByArr,"","","",newpath); }catch(e){ ip.traceErr(e); } window.location.href = qry + tempcity + ".html"; return false; } function searchPropertiesBy(frm,CurrentObj){ /*	0 - All ,	1-Ind,	2-Builder,	3-Agents */ /* 0 - ind, 1-Agents, 2- builder, 3- All */ var Status = CurrentObj.checked; var objArr = frm.elements["strusertype[]"]; if(CurrentObj==objArr[3] && Status){ for (var i=0; i<objArr.length; i++) {objArr[i].checked=false;} CurrentObj.checked = true; }else if(objArr[0].checked && objArr[1].checked && objArr[2].checked){ for (var i=0; i<objArr.length; i++) {objArr[i].checked=false;} objArr[3].checked =true; }else{ objArr[3].checked =false; } } function ip_cookie(){ this.cookieString = ""; }; ip_cookie.prototype.setCookie = function(cName,val, exp_y, exp_m, exp_d, path, domain, secure){ this.cookieString = cName + "=" + val; if(exp_y){ var expires = new Date ( exp_y, exp_m, exp_d ); this.cookieString += "; expires=" + expires.toGMTString(); } if(path)this.cookieString += "; path=" + path; if (domain) this.cookieString += "; domain=" + domain; else this.cookieString += "; domain=.indiaproperty.com"; if(secure) this.cookieString += "; secure"; document.cookie = this.cookieString; }; ip_cookie.prototype.getCookie = function(name){ if(document.cookie.length>0){ /*alert("Current Cookies" + document.cookie);*/ c_start=document.cookie.indexOf(name + "="); if (c_start!=-1){ c_start=c_start + 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 ""; }; var tempArr=new Array(); var html=""; function onSaleRent(Obj,frm){ if(!frm) frm=d.quicksearch; var SR = [$ip("tranS"), $ip("tranR"), ($ip("tranPG") || new Object())]; try{ if(Obj.className == "radioN"){ Obj.className == "radioY"; frm.transaction.value=Obj.title; SR[0].className = (Obj.title=="sale") ? "radioY" : "radioN"; SR[1].className = (Obj.title=="rent") ? "radioY" : "radioN"; SR[2].className = (Obj.title=="accommodation") ? "radioY" : "radioN"; } }catch(e){ip.traceErr(e,"onSaleRent","ip_common");} ip.getPropertyTypeArr(frm.transaction.value,ipPropertyTypeArr,frm.property,"0|Property Type"); } function ip_radioGroup(frm,radioName,styles){ this.frm = frm; this.radioName=radioName; this.styles=(!styles) ? {active:"radioY_13",deactive:"radioN_13"} : styles; this.currentRadioTitle=null; this.currentRadio=null; }; ip_radioGroup.prototype.onChangeRadio = function(e){ if(!ip.isObject(e)){ip.print("e is not an Object");return;} if(this.currentRadioTitle==e.title) return; var hiddenObj = this.frm.elements[e.rel]; if(!ip.isObject(hiddenObj)) return; if(this.currentRadio!=null)this.currentRadio.className=this.styles.deactive; this.currentRadioTitle=e.title; this.currentRadio=e; hiddenObj.value = e.title; e.className = this.styles.active; }; function ipNextPrev(arrList,divID){ this.curLayer=0; this.divObj = $ip(divID); this.arrList = arrList; try{this.goTo();}catch(e){ip.traceErr(e,"ipPrevNext","ip_layers.js");} }; ipNextPrev.prototype.goTo = function(Method){ if(this.curLayer==0 && Method=="prev") this.curLayer=this.arrList.length; if(this.curLayer==parseInt(this.arrList.length) - 1 && Method=="next") this.curLayer=-1; if(Method=="next"){++this.curLayer;}else if(Method=="prev"){--this.curLayer;} this.divObj.innerHTML = this.arrList[this.curLayer][0]; }; var hidenObjs= new Array(); function ipLightBox(divID, method, msg, width, height, url){ this.mainDivObj = (typeof($ip(divID))=="object") ? $ip(divID) : ( $ip("divLightBox") ) ? $ip("divLightBox") : null; this.method = method || "message"; this.msg = msg; this.failureMessage = "Sorry! Initialization failed."; this.url = url; this.width = width; this.height = height; switch(method){ case "ajax": break; default: break; } }; ipLightBox.prototype.init = function(){ this.mainDivObj = (this.mainDivObj==null || this.mainDivObj=="undefined") ? $ip("divLightBox") : this.mainDivObj; if(ie && ip.simpleAlertActive==false) hideLayerObjects(); with(this.mainDivObj.style){ display = ""; position = "absolute"; left = "0px"; top = "0px"; width = ((ip.getPageSize()[0]>1020) ? ip.getPageSize()[0] - 25 : ip.getPageSize()[0]) + "px"; height = ip.getPageSize()[1] + "px"; }; }; ipLightBox.prototype.exit= function(){ try{ this.mainDivObj.style.display="none"; if(ie && ip.simpleAlertActive==false) showHiddenLayerObjects(); }catch(e){} }; ipLightBox.prototype.startEffect= function(){ }; ipLightBox.prototype.setCenterPos= function(Obj){ip.makeCenter(Obj);}; function hideLayerObjects(conditionObjs){ var overlayObjs = ["select","embed","iframe"]; for (var i=0; i<overlayObjs.length; i++) { var objArr = d.getElementsByTagName(overlayObjs[i]); for (var j=0; j<objArr.length; j++) { if(objArr[j].style.display=="none") hidenObjs[hidenObjs.length] = objArr[j]; objArr[j].style.display = "none"; } } } function showHiddenLayerObjects(){ var overlayObjs = ["select","embed","iframe"]; for (var i=0; i<overlayObjs.length; i++) { var objArr = d.getElementsByTagName(overlayObjs[i]); for (var j=0; j<objArr.length; j++) { objArr[j].style.display = ""; } } for (var i=0; i<hidenObjs.length; i++) {hidenObjs[i].style.display="none";} } function getHTTPObject(){ try {return new XMLHttpRequest();}catch(e){} try {return new ActiveXObject("Msxml2.XMLHTTP");}catch(e){} try {return new ActiveXObject("Microsoft.XMLHTTP");}catch(e){} return ip.throwErr(null,"Your Browser doesn't support the XML HTTP Request!",2); } /*function setPropertyBytes(){ var date = new Date(); var sReq = new getHTTPObject(); var url = ip.host() + "/probyarticles.php?rndm="+date.getTime(); sReq.open("get",url,true); sReq.onreadystatechange = function(){ if(sReq.readyState==4){ $ip("div_propertybytes").innerHTML =sReq.responseText; } }; sReq.send(null); }*/ function validateID(frm){ var first2letter = frm.listingid.value.substr(0,2); var next6letter = frm.listingid.value.substr(2,6); if(!IsMandatory(frm.listingid,"text","Please enter a Property ID",2,"Div_listingid")) return false; if(IsMin(frm.listingid.value,8)) return ip.throwErr(frm.listingid,"Please enter a valid IndiaProperty ID eg:IP123456",2,"Div_listingid"); if( (first2letter.toLowerCase() == "ip" || first2letter.toLowerCase() == "ib" || first2letter.toLowerCase() == "ia" || first2letter.toLowerCase() == "bl" || first2letter.toLowerCase() == "pl")){ if(!IsFoundCharacters(next6letter,"1234567890")) return ip.throwErr(frm.listingid,"Please enter a valid IndiaProperty ID eg:IP123456",2,"Div_listingid"); }else return ip.throwErr(frm.listingid,"Please enter a valid IndiaProperty ID eg:IP123456",2,"Div_listingid"); ip.OpenPage(ip.host() + "/index.php?option=search&page=searchbyidresult&listingid="+frm.listingid.value); ip.exitLB(); return false; } /* Post Your Requirement  Form*/ function checkpostrequirement(frm){ if(!frm) frm = d.checkpostrequirement; try{if(!IsMandatory(frm.trans,"select","Please Select Transaction Type",2)) return false;}catch(e){} frm.posttype.value = (frm.trans[0].checked) ? frm.trans[0].value : frm.trans[1].value; if(!IsMandatory(frm.home_prop,"select","Please Select Property type",2)) return false; if(!IsMandatory(frm.city,"select","Please Select City",2))  return false; if(!IsMandatory(frm.newstrmobile,"text","Please enter a mobile number.",2)) return false; if(frm.newstrmobile.value=="Enter Mobile No") return ip.throwErr(frm.newstrmobile,"Please enter a mobile number.",2); if(!IsValidCharacters(frm.newstrmobile.value, numbers , numbers)) return ip.throwErr(frm.newstrmobile,"Please use only numerals.",2); if( String(frm.newstrmobile.value).substr(0,1)!="9" || String(frm.newstrmobile.value).substr(0,2)=="91") return ip.throwErr(frm.newstrmobile,"Your mobile number should start with digit '9'. Do not Prefix '+', '0', '91'. ",2); if(String(frm.newstrmobile.value).length!=10) return ip.throwErr(frm.newstrmobile,"Your mobile number should be 10 digits.",2); frm.action = "/index.php?option=listing&page=" +((frm.trans[0].checked) ? "createbuylisting" : "createrentinlisting"); return true; } /* End Post Your Requirement  Form*/ var preImgs = ["http://imgs.indiaproperty.com/bg/ipheadbg.gif","http://imgs.indiaproperty.com/curves/lbox_b_lc.gif","http://imgs.indiaproperty.com/curves/lbox_b_rc.gif","http://imgs.indiaproperty.com/curves/lbox_lc.gif", "http://imgs.indiaproperty.com/curves/lbox_rc.gif","http://imgs.indiaproperty.com/dots/lbox_dot_l.gif","http://imgs.indiaproperty.com/dots/lbox_dot_b.gif", "http://imgs.indiaproperty.com/curves/h_blc.gif","http://imgs.indiaproperty.com/curves/h_brc.gif","http://imgs.indiaproperty.com/curves/h_lc.gif", "http://imgs.indiaproperty.com/curves/h_rc.gif","http://imgs.indiaproperty.com/bg/h_n_bg.gif","http://imgs.indiaproperty.com/curves/h_n_lc.gif", "http://imgs.indiaproperty.com/curves/h_n_rc.gif","http://imgs.indiaproperty.com/bg/h_n_a_bg.gif","http://imgs.indiaproperty.com/dots/h_n_dot.gif", "http://imgs.indiaproperty.com/dots/dot2_79A4CE.gif","http://imgs.indiaproperty.com/curves/box_bg.gif","http://imgs.indiaproperty.com/curves/box_rc.gif", "http://imgs.indiaproperty.com/curves/box_lc.gif","http://imgs.indiaproperty.com/bg/buttonbg.gif","http://imgs.indiaproperty.com/home_google_alexa_comscore.gif", "http://imgs.indiaproperty.com/home_pcworld.gif","http://imgs.indiaproperty.com/home_yahoo.gif","http://imgs.indiaproperty.com/home_testimonials.gif", "http://imgs.indiaproperty.com/buttons/closex.gif"]; StartPreLoader(preImgs); var lb = null; var lbA = null; window.onload = function(){ lb = new ipLightBox('divLightBox','',"",250); lbA = new ipLightBox('divLBAlertWindow','',"",250); }; window.onscroll = function(){ip.makeCenterLB();}; d.onscroll = function(){ip.makeCenterLB();}; /*window.onresize = function(){ip.makeCenterLB();}; d.onresize = function(){ip.makeCenterLB();};*/ /* Premium Users Scroller */ var displayWaitMessage=true;	/* Display a please wait message while images are loading? */ var activeImage = false; var imageGalleryLeftPos = false; var imageGalleryWidth = false; var imageGalleryObj = false; var maxGalleryXPos = false; var slideSpeed = 0; var imageGalleryCaptions = new Array(); function startSlide(e) {	if(document.all)e = event; var id = this.id; this.getElementsByTagName('IMG')[0].src = 'http://imgs.indiaproperty.com/' + this.id + '_over.gif';	if(this.id=='arrow_right'){ slideSpeedMultiply = Math.floor((e.clientX - this.offsetLeft) / 5); slideSpeed = -1*slideSpeedMultiply; slideSpeed = Math.max(-10,slideSpeed); }else{			slideSpeedMultiply = 10 - Math.floor((e.clientX - this.offsetLeft) / 5); slideSpeed = 1*slideSpeedMultiply; slideSpeed = Math.min(10,slideSpeed); if(slideSpeed<0)slideSpeed=10; } } function releaseSlide() {	var id = this.id; this.getElementsByTagName('IMG')[0].src = 'http://imgs.indiaproperty.com/' + this.id + '.gif'; slideSpeed=0; } function gallerySlide() { if(slideSpeed!=0){ var leftPos = imageGalleryObj.offsetLeft; leftPos = leftPos/1 + slideSpeed; if(leftPos>maxGalleryXPos){ leftPos = maxGalleryXPos; slideSpeed = 0; } if(leftPos<minGalleryXPos){ leftPos = minGalleryXPos; slideSpeed=0; } imageGalleryObj.style.left = leftPos + 'px'; } setTimeout('gallerySlide()',100); } function initSlideShow() { document.getElementById('arrow_left').onmousemove = startSlide; document.getElementById('arrow_left').onmouseout = releaseSlide; document.getElementById('arrow_right').onmousemove = startSlide; document.getElementById('arrow_right').onmouseout = releaseSlide; imageGalleryObj = document.getElementById('theImages'); imageGalleryLeftPos = imageGalleryObj.offsetLeft; imageGalleryWidth = document.getElementById('galleryContainer').offsetWidth - 80; maxGalleryXPos = imageGalleryObj.offsetLeft; /* alert(document.getElementById('slideEnd').offsetLeft); */ /*  alert((document.getElementById('theImages').offsetLeft)); */ minGalleryXPos = imageGalleryWidth - (document.getElementById('slideEnd').offsetLeft - 40); /* minGalleryXPos = imageGalleryWidth -800; */ gallerySlide(); } function hideWaitMessageAndShowCaption(imageIndex) { document.getElementById('waitMessage').style.display='none';	document.getElementById('largeImageCaption').innerHTML = imageGalleryCaptions[imageIndex]; document.getElementById('largeImageCaption').style.display='block'; }
function placeListingPop(divid, posx, posy){
	var divObj=document.getElementById(divid);
	with(divObj.style){
	position="absolute";
	display = "block";
	left = posx + "px";
	top= posy + "px";
	}
}
function removeListingPop(obj){
	var xpos = ip.getPos(obj).x;
	var ypos=ip.getPos(obj).y + 15;
	document.getElementById('div_'+xpos+ypos).style.display="none";
}
function listingpopvisible(target, divid, contentdiv){
	if(document.getElementById(contentdiv).innerHTML=="" || document.getElementById(contentdiv).innerHTML=="Loading.."){
		document.getElementById(divid).style.display="block";
		document.getElementById(contentdiv).style.innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;Loading..";
		getdata(target, contentdiv);
	}
	else{
		document.getElementById(divid).style.display="block";
	}
}
var XMLHttpRequestObject=false;
 if (window.XMLHttpRequest)
 {
	XMLHttpRequestObject=new XMLHttpRequest();
 }
 else if (window.ActiveXObject)
 {
	XMLHttpRequestObject=new ActiveXObject("Microsoft.XMLHTTP");
 }
 function makethisvisible(objid){
	document.getElementById(objid).style.display="block";
 }
 function hidethis(objid){
	document.getElementById(objid).style.display="none";
 }
function getdata(dataSource, divID){
	document.getElementById(divID).innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;Loading..";
	if (XMLHttpRequestObject)
		{
		var obj=document.getElementById(divID);
		XMLHttpRequestObject.open("GET", dataSource);
		XMLHttpRequestObject.onreadystatechange=function()
		{
			if (XMLHttpRequestObject.readyState==4)
			{
				obj.innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;Loading..";
				obj.innerHTML=XMLHttpRequestObject.responseText;
			}
		}
	XMLHttpRequestObject.send(null);
	}
}
function createDiv(obj, target){
	var date= new Date();
	var time=date.getTime();
	var xpos = ip.getPos(obj).x;
	var ypos=ip.getPos(obj).y + 15;
	var par=document.getElementById('popupcontainer');
	var element=document.createElement('div');
	target=target+"&ysd="+time;
	if (document.getElementById('div_'+xpos+ypos))
	{
		listingpopvisible(target, 'div_'+xpos+ypos, +xpos+'a'+ypos+'listPopContent');
	}
	else{
		element.setAttribute('id', 'div_'+xpos+ypos);
		element.setAttribute('class', 'listingpopcontainer');
		par.appendChild(element);
		document.getElementById(element.id).style.position="absolute";
		document.getElementById('div_'+xpos+ypos).innerHTML='<div onmouseover=makethisvisible("div_'+xpos+ypos+'") onmouseout=hidethis("div_'+xpos+ypos+'") style="width:220px; float:left; background-color:#fff;"><div class="pop_topcurve"></div><div style="border-left:1px solid #1d965d; border-right:1px solid #1d965d; background-color:#fff;"  id="'+xpos+'a'+ypos+'listPopContent" class="listPopContent" style="text-align:left;">Loading..</div><div class="pop_botcurve"></div></div>';
		placeListingPop(element.id, xpos, ypos);
		getdata(target, +xpos+'a'+ypos+'listPopContent');
	}
}
