if(typeof adsUniqId=="undefined"){z=new Date();adsUniqId="uniqId-"+z.getMinutes()+""+z.getSeconds()+""+z.getMilliseconds();}
(function()
{
	    var d,createElement;
	    if(typeof(atm_opc_zone)=="undefined"||(typeof(atm_opc_zone)!="undefined"&&atm_opc_zone.replace(/\s*/ig,"")==""))
		{
			d=new Date();
			atm_opc_zone = "g-"+d.getMinutes()+""+d.getSeconds()+""+d.getMilliseconds();
		}
		 createElement=function()
		{
			var newElem,size,src,query,i;
			newElem=false;
			if(typeof(atm_req_format)!="undefined"&&atm_req_format.replace(/\s*/ig,"")!=""&&atm_req_format.search(/X/i)!=-1&&atm_req_format.replace(/X/i,'').search(/\D/i)==-1&&atm_req_format.search(/^\d.*\d$/i)!=-1)
			{
					atm_req_format = atm_req_format.toUpperCase();
					size=atm_req_format.split("X");
					src="https://www.realestateactive.com/ads/ads";
					//src="http://localhost/dev.realestateactive.com/ads/ads";
					//src="http://rea.localhost/ads/ads";
					//src="http://dev.realestateactive.com/ads/ads";
					query=new Array();
					query.type=(typeof(atm_opc_type)!='undefined'?atm_opc_type:"");
					query.listing=(typeof(atm_opc_listing)!='undefined'?atm_opc_listing:"");
					query.country_name=(typeof(atm_opc_country_name)!='undefined'?atm_opc_country_name:"");
					query.country_iso=(typeof(atm_opc_country_iso)!='undefined'?atm_opc_country_iso:"");
					query.state_name=(typeof(atm_opc_state_name)!='undefined'?atm_opc_state_name:"");
					query.state_id=(typeof(atm_opc_state_id)!='undefined'?atm_opc_state_id:"");
					query.city_name=(typeof(atm_opc_city_name)!='undefined'?atm_opc_city_name:"");
					query.city_id=(typeof(atm_opc_city_id)!='undefined'?atm_opc_city_id:"");
					query.zipcode=(typeof(atm_opc_zipcode)!='undefined'?atm_opc_zipcode:"");
					query.client=(typeof(atm_opc_client)!="undefined"?atm_opc_client:""); 
					query.zone=(typeof(atm_opc_zone)!="undefined"?atm_opc_zone:""); 
					query.all_zones=(typeof(atm_opc_all_zones)!="undefined"?atm_opc_all_zones:""); 
					query.model=(typeof(atm_opc_model)!="undefined"?atm_opc_model:""); 
					query.category_id=(typeof(atm_opc_category_id)!="undefined"?atm_opc_category_id:""); 
					query.position=(typeof(atm_opc_position)!="undefined"?atm_opc_position:""); 
					query.format=atm_req_format;
					query.width=size[0];
					query.height=size[1];
					query.uid=adsUniqId;
					query.href="http://"+location.host+location.pathname;
					src+="?";
					for (i in query){src+=i+'='+(query[i].replace(/\s/gi,'+'))+'&';}
					newElem='<ins style="border: medium none ; margin: 0pt; padding: 0pt; display: inline-table; height: '+size[1]+'px; position: relative; visibility: visible; width: '+size[0]+'px;"><ins style="border: medium none ; margin: 0pt; padding: 0pt; display: block; height: '+size[1]+'px; position: relative; visibility: visible; width: '+size[0]+'px;"><iframe id="'+atm_opc_zone+'" scrolling="no" height="'+size[1]+'" frameborder="0" width="'+size[0]+'" vspace="0" style="left: 0pt; position: absolute; top: 0pt; " src='+src+' marginwidth="0" marginheight="0" hspace="0" allowtransparency="true"> </iframe></ins></ins>'; //document.write(src)
			}
                                
				if(newElem!==false) document.write(newElem);
                                //return true;
		}
		createElement();
		//setTimeout(createElement(),500);
                //document.write(createElement());
})();

//if(typeof adsUniqId=="undefined"){z=new Date();adsUniqId="uniqId-"+z.getMinutes()+""+z.getSeconds()+""+z.getMilliseconds();}(function(){var b,a;if(typeof(atm_opc_zone)=="undefined"||(typeof(atm_opc_zone)!="undefined"&&atm_opc_zone.replace(/\s*/ig,"")=="")){b=new Date();atm_opc_zone="g-"+b.getMinutes()+""+b.getSeconds()+""+b.getMilliseconds()}a=function(){var e,d,g,f,c;e=false;if(typeof(atm_req_format)!="undefined"&&atm_req_format.replace(/\s*/ig,"")!=""&&atm_req_format.search(/X/i)!=-1&&atm_req_format.replace(/X/i,"").search(/\D/i)==-1&&atm_req_format.search(/^\d.*\d$/i)!=-1){atm_req_format=atm_req_format.toUpperCase();d=atm_req_format.split("X");g="http://localhost/dev.realestateactive.com/ads/ads";f=new Array();f.client=(typeof(atm_opc_client)!="undefined"?atm_opc_client:"");f.zone=(typeof(atm_opc_zone)!="undefined"?atm_opc_zone:"");f.format=atm_req_format;f.width=d[0];f.height=d[1];f.uid=adsUniqId;f.href=location.href;g+="?";for(c in f){g+=c+"="+f[c]+"&"}e='<ins style="border: medium none ; margin: 0pt; padding: 0pt; display: inline-table; height: '+d[1]+"px; position: relative; visibility: visible; width: "+d[0]+'px;"><ins style="border: medium none ; margin: 0pt; padding: 0pt; display: block; height: '+d[1]+"px; position: relative; visibility: visible; width: "+d[0]+'px;"><iframe id="'+atm_opc_zone+'" scrolling="no" height="'+d[1]+'" frameborder="0" width="'+d[0]+'" vspace="0" style="left: 0pt; position: absolute; top: 0pt;" src='+g+' marginwidth="0" marginheight="0" hspace="0" allowtransparency="true"> </iframe></ins></ins>'}return e!==false?e:""};document.write(a());})();
