function gcRT(){this.connkey="";this.rtActive=0;};gcRT.prototype.changePos=function(params){};gcRT.prototype.setConnKey=function(key){this.rtActive=1;this.connkey=key;};gcRT.prototype.connectRT=function(url,callback){if(window.ActiveXObject){transferDoc=new ActiveXObject("htmlfile");transferDoc.open();transferDoc.write("<html><script>document.domain='"+document.domain+"';</script></html>");transferDoc.write('<iframe src="'+url+'" style=\"border: 1px #000000 solid;\"></iframe>');transferDoc.parentWindow.GC_Obj=GC_Obj;transferDoc.close();var ifrDiv=transferDoc.createElement("div");transferDoc.body.appendChild(ifrDiv);}else{ifr=document.createElement('iframe');ifr.id='gc_iframe';ifr.name='gc_iframe_name';ifr.onload=function(){GC_Obj.rtObj=new gcRT();GC_Obj.rtObj.connectRT(GC_Obj.rt_conn+'/',null);window.setTimeout(function(){GC_Obj.rtObj.loadKill();},2000);};ifr.src=url;document.domain='twibez.com';document.body.appendChild(ifr);}};gcRT.prototype.escapeHTML=function(str){var div=document.createElement('div');var text=document.createTextNode(str);div.appendChild(text);return div.innerHTML;};gcRT.prototype.rtAddPoint=function(id,lat,lng,ft,f1,f2){if(GC_Obj.rtNoPoints==1&&(GC_GMapObj.getBounds().contains(new GLatLng(lat,lng)))){var ar=ft.split('|');var ac=(90.0/Math.pow(2,GC_GMapObj.getZoom()))/2.0;var af=GC_GMapObj.getCurrentMapType().getProjection();var ah=af.fromLatLngToPixel(new GLatLng(lat,lng),GC_GMapObj.getZoom());var aj=af.fromPixelToLatLng(new GPoint(Math.floor(ah.x/64)*64,Math.floor(ah.y/64)*64),GC_GMapObj.getZoom());var pt5=af.fromPixelToLatLng(new GPoint(((Math.floor(ah.x/64)*64)+64),((Math.floor(ah.y/64)*64)+64)),GC_GMapObj.getZoom());var pt4Lat=aj.lat().toFixed(8);var pt4Lng=((aj.lng()+(ac*2))).toFixed(8);var ptNElat=aj.lat().toFixed(8);var ptNElng=aj.lng().toFixed(8);var ptSWlat=pt5.lat().toFixed(8);var ptSWlng=pt5.lng().toFixed(8);for(i=0;i<GC_Obj.aa.length;i++){var p_mp=GC_Obj.aa[i];if(p_mp!=null&&p_mp.t==1&&p_mp.ltNE==pt4Lat&&p_mp.lgNE==pt4Lng){p_mpDIV=p_mp.ai.getClusterCountDIV();p_mp.i++;p_mpDIV.innerHTML=p_mp.i;GC_Obj.at+=p_mp.i;if(GC_Obj.B[GC_VR_COUNTDESCR])p_mpDIV.innerHTML+=" "+GC_Obj.B[GC_VR_COUNTDESCR];addTweet(GC_Obj.aa[i].ai,ar[0],this.escapeHTML(ar[1]),1);break;}if(i==GC_Obj.aa.length-1){var p_count=0;var a_pc=new Array();for(j=0;j<GC_Obj.aa.length;j++){var p_mp2=GC_Obj.aa[j];if(p_mp2!=null&&p_mp2.t==2&&(p_mp2.lt>=ptSWlat&&p_mp2.lt<=ptNElat)&&(p_mp2.lg>=ptNElng&&p_mp2.lg<=ptSWlng)){p_count++;a_pc.push(j);if(p_count>=5){var ind=GC_Obj.aa.length;var pt6=af.fromPixelToLatLng(new GPoint(((Math.floor(ah.x/64)*64)+32),((Math.floor(ah.y/64)*64)+32)),GC_GMapObj.getZoom());GC_Obj.aa.push({lt:1,lg:1,t:1,i:6,ltNE:1,ltSW:1,ai:1,lgNE:1});GC_Obj.aa[ind].lt=new Number(pt6.lat());GC_Obj.aa[ind].lg=new Number(ptSWlng-ac);GC_Obj.aa[ind].t=new Number(1);GC_Obj.aa[ind].i=new Number(6);GC_Obj.aa[ind].ltNE=new Number(ptNElat);GC_Obj.aa[ind].ltSW=new Number(ptSWlat);GC_Obj.aa[ind].ai=GC_Obj.L(new GLatLng(GC_Obj.aa[ind].lt,GC_Obj.aa[ind].lg),1,ind);GC_Obj.aa[ind].lgNE=new Number(ptSWlng);GC_Obj.at+=6;GC_GMapObj.addOverlay(GC_Obj.aa[ind].ai);addTweet(GC_Obj.aa[ind].ai,ar[0],this.escapeHTML(ar[1]),1);if(GC_Obj.f[GC_CB_ONCREATECLUSTER])GC_Obj.f[GC_CB_ONCREATECLUSTER](GC_Obj.aa[ind].ai,new GLatLng(ptNElat,ptNElng),new GLatLng(ptSWlat,ptSWlng));for(u=0;u<a_pc.length;u++){_t=a_pc[u];GC_GMapObj.removeOverlay(GC_Obj.aa[_t].ai);delete GC_Obj.aa[_t];}break;}}if(j==GC_Obj.aa.length-1){GC_Obj.at++;var ind=GC_Obj.aa.length;GC_Obj.aa.push({lt:1,lg:1,t:1,ti:1,f1:1,f2:1,ft:1,ai:1});GC_Obj.aa[ind].lt=new Number(lat);GC_Obj.aa[ind].lg=new Number(lng);GC_Obj.aa[ind].t=new Number(2);GC_Obj.aa[ind].ti=new Number(id);GC_Obj.aa[ind].f1=new Number(f1);GC_Obj.aa[ind].f2=new Number(f2);GC_Obj.aa[ind].ft=new String(ft);GC_Obj.aa[ind].ai=GC_Obj.L(new GLatLng(lat,lng),2,ind);GC_GMapObj.addOverlay(GC_Obj.aa[ind].ai);if(GC_Obj.f[GC_CB_ONCREATEPOINT])GC_Obj.f[GC_CB_ONCREATEPOINT](GC_Obj.aa[ind].ai,GC_Obj.aa[ind].ti,GC_Obj.aa[ind].ft,GC_Obj.aa[ind].f1,GC_Obj.aa[ind].f2);addTweet(GC_Obj.aa[ind].ai,ar[0],this.escapeHTML(ar[1]),2);break;}}break;}}}};gcRT.prototype.rtDelPoint=function(id,lat,lng,ft,f1,f2){if(GC_Obj.rtNoPoints==1){var ac=(90.0/Math.pow(2,GC_GMapObj.getZoom()))/2.0;var af=GC_GMapObj.getCurrentMapType().getProjection();var ah=af.fromLatLngToPixel(new GLatLng(lat,lng),GC_GMapObj.getZoom());var aj=af.fromPixelToLatLng(new GPoint(Math.floor(ah.x/64)*64,Math.floor(ah.y/64)*64),GC_GMapObj.getZoom());var pt4Lat=aj.lat().toFixed(8);var pt4Lng=((aj.lng()+(ac*2))).toFixed(8);for(i=0;i<GC_Obj.aa.length;i++){var p_mp=GC_Obj.aa[i];if(p_mp!=null&&p_mp.t==1&&p_mp.ltNE==pt4Lat&&p_mp.lgNE==pt4Lng){p_mpDIV=p_mp.ai.getClusterCountDIV();p_mp.i--;p_mpDIV.innerHTML=p_mp.i;removeTweet(GC_Obj.aa[i].ai,1);if(GC_Obj.B[GC_VR_COUNTDESCR])p_mpDIV.innerHTML+=" "+GC_Obj.B[GC_VR_COUNTDESCR];if(p_mp.i==0){GC_GMapObj.removeOverlay(GC_Obj.aa[i].ai.cclayer);GC_GMapObj.removeOverlay(GC_Obj.aa[i].ai);delete GC_Obj.aa[i];}break;}}}};gcRT.prototype.loadKill=function(){var load_kill_ifr;load_kill_ifr=document.createElement('iframe');document.body.appendChild(load_kill_ifr);document.body.removeChild(load_kill_ifr);}