var jsObject=document.getElementsByTagName("script"); var jsIndex=jsObject.length-1; var adMarketScript=jsObject[jsIndex]; var adMarketScript_src=adMarketScript.src; var adMarketScript_split=adMarketScript_src.split("/js/"); var adMarketScript_dir=adMarketScript_split[0]+'/index.php?page=query/ads'; if(val_count_adunit === undefined) var val_count_adunit=0; adMarketScript_parameter=adMarketScript_split[1].split("?"); adMarketScript_parameter_new=adMarketScript_parameter[1]; adMarketScript_parameter_seperate=adMarketScript_parameter_new.split("&"); aduid=adMarketScript_parameter_seperate[0]; pid=adMarketScript_parameter_seperate[1]; width=adMarketScript_parameter_seperate[2]; height=adMarketScript_parameter_seperate[3]; if(adMarketScript_parameter_seperate.length ==5) displaytype=adMarketScript_parameter_seperate[4]; else displaytype=0; var today = new Date(); today.setTime( today.getTime() ); today.setHours(today.getHours()+1); today.setMinutes(0); today.setSeconds(0); if(window.adquery) { var adq=new adquery(); adq.displayads(aduid,pid,width,height); } else { function adquery() { this.displayads=displayads; val_count_adunit++; function displayads(aduid,pid,width,height) { if(window.top) { if(window.top.location) { if(!window.top.location.hostname) return; } else return; } else return; page_meta_data=document.getElementsByTagName('meta'); page_title = document.title; page_referrer=window.location.href; meta_description=""; meta_keywords=""; for(i=0; i0) Set_Cookie_Data('pop_delay_'+responsedata[1],1,exptime,"/") ; window.clearInterval(popintervalhome); } } }, false); }, 1000); iframe_src=''; } } else iframe_src=""; if(displaytype ==5) { var interstitial_view=Get_Cookie('int_view_'+aduid); if(interstitial_view !=1) { Set_Cookie('int_view_'+aduid,1, 0 , "/") ; var urlstring=url; var skipintervalhome; var interstitial_container_id='xyz-interstitial-container-'+aduid; var interstitial_background_id='xyz-interstitial-background-'+aduid; if(!document.getElementById(interstitial_container_id)) { var interstitialContainer=document.createElement('div'); interstitialContainer.id=interstitial_container_id; interstitialContainer.style.height=height+'px'; interstitialContainer.style.width=width+'px'; interstitialContainer.style.position="fixed"; interstitialContainer.style.zIndex=1000000001; document.body.appendChild(interstitialContainer); document.getElementById(interstitial_container_id).innerHTML=iframe_src; var interstitialBackGround=document.createElement('div'); interstitialBackGround.id=interstitial_background_id; interstitialBackGround.style.height='100%'; interstitialBackGround.style.width='100%'; interstitialBackGround.style.zIndex=1000000000; interstitialBackGround.style.position="absolute"; interstitialBackGround.style.background='#000000'; interstitialBackGround.style.opacity=.9; document.body.appendChild(interstitialBackGround); var ie=document.all && !window.opera; var iebody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body ; ht=(ie)? iebody.clientHeight: window.innerHeight ; wt=(ie)? iebody.clientWidth : window.innerWidth ; ofht=document.getElementById(interstitial_container_id).offsetHeight; ofwt=document.getElementById(interstitial_container_id).offsetWidth; ofht=parseFloat(ofht)-20; document.getElementById(interstitial_container_id).style.top=(ht/2)-parseFloat(ofht/2) +'px'; document.getElementById(interstitial_container_id).style.left=(wt/2)-parseFloat(ofwt/2) +'px'; skipintervalhome=window.setInterval(function(){ var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent"; var eventer = window[eventMethod]; var messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message"; eventer(messageEvent, function (e) { var urlindex=urlstring.indexOf(e.origin); var response=e.data; var responsedata=response.split('_'); if(urlindex ==0 && responsedata[0] =='close') { var rmelement = document.getElementById('xyz-interstitial-container-'+responsedata[1]); if(rmelement != null) { rmelement.parentNode.removeChild(rmelement); var rmelement1 = document.getElementById('xyz-interstitial-background-'+responsedata[1]); if(rmelement1 != null) rmelement1.parentNode.removeChild(rmelement1); } window.clearInterval(skipintervalhome); } }, false); }, 1000); } } } else { document.open(); document.write(iframe_src); document.close(); } return; } String.prototype.equalsIgnoreCase=myEqualsIgnoreCase; String.prototype.equals=myEquals; function utf8_encode (string) { string = string.replace(/\r\n/g,"\n"); var utftext = ""; for (var n = 0; n < string.length; n++) { var c = string.charCodeAt(n); if (c < 128) { utftext += String.fromCharCode(c); } else if((c > 127) && (c < 2048)) { utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c & 63) | 128); } else { utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); } } return escape(utftext); } function Set_Cookie_Data(name,value,expires,path,domain,secure) { var Daytoday = new Date(); var expires_date = new Date(Daytoday.getTime()+(expires)); document.cookie = name + "=" +escape(value) + ";expires=" + expires_date.toUTCString() + ( ( path ) ? ";path=" + path : "" ) + ( ( domain ) ? ";domain=" + domain : "" ) + ( ( secure ) ? ";secure" : "" ); } function Get_Cookie( name ) { var start = document.cookie.indexOf( name + "=" ); var len = start + name.length + 1; if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) { return null; } if ( start == -1 ) return null; var end = document.cookie.indexOf( ";", len ); if ( end == -1 ) end = document.cookie.length; return unescape( document.cookie.substring( len, end ) ); } function Set_Cookie( name, value, expires, path, domain, secure ) { if ( expires ) { expires = expires * 1000 * 60 * 60 ; } var expires_date = new Date( today.getTime() + (expires) ); document.cookie = name + "=" +escape( value ) + ";expires=" + expires_date.toUTCString() + ( ( path ) ? ";path=" + path : "" ) + ( ( domain ) ? ";domain=" + domain : "" ) + ( ( secure ) ? ";secure" : "" ); } function myEquals(arg) { return (this.toString()==arg.toString()); } function myEqualsIgnoreCase(arg) { return (new String(this.toLowerCase())==(new String(arg)).toLowerCase()); } function base64_encode(data) { var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, enc = "", tmp_arr = []; if (!data) { return data; } do { // pack three octets into four hexets o1 = data.charCodeAt(i++); o2 = data.charCodeAt(i++); o3 = data.charCodeAt(i++); bits = o1 << 16 | o2 << 8 | o3; h1 = bits >> 18 & 0x3f; h2 = bits >> 12 & 0x3f; h3 = bits >> 6 & 0x3f; h4 = bits & 0x3f; // use hexets to index into b64, and append result to encoded string tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4); } while (i < data.length); enc = tmp_arr.join(''); var r = data.length % 3; ret=(r ? enc.slice(0, r - 3) : enc) + '==='.slice(r || 3); ret=ret.replace('+',','); ret=ret.replace('/','-'); return ret; } } var adq=new adquery(); adq.displayads(aduid,pid,width,height); }