www.pudn.com > ELM.rar > EAS_tag.1.0.js, change:2013-07-20,size:8874b


EAS_flash=1;EAS_proto="http:";if(location.protocol=="https:"){EAS_proto="https:"}EAS_server=EAS_proto+"//eas.apm.emediate.eu";function EAS_load(a){document.write('<script type="text/javascript" src="'+a+'"><\/script>')}function EAS_init(e,c){var a=new Date().getTime();var b=EAS_server+"/eas?target=_blank&EASformat=jsvars&EAScus="+e+"&ord="+a;EAS_detect_flash();b+="&EASflash="+EAS_flash;if(c){b+="&"+c}EAS_load(b)}function EAS_detect_flash(){if(EAS_flash>1){return}var h=11;var e=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;var f=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var c=(navigator.appVersion.indexOf("Windows")!=-1)?true:false;if(f&&c&&!e){document.write("<SCRIPT LANGUAGE=VBScript> \n");document.write("on error resume next \nDim eas_flobj("+h+") \n");for(i=2;i<=h;i++){document.write("Set eas_flobj("+i+') = CreateObject("ShockwaveFlash.ShockwaveFlash.'+i+'") \n');document.write("if(IsObject(eas_flobj("+i+"))) Then EAS_flash="+i+" \n")}document.write("</SCRIPT> \n")}else{if(navigator.plugins){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var g=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var a=navigator.plugins["Shockwave Flash"+g].description;var b=parseInt(a.substr(a.indexOf(".")-2,2),10);if(b>1){EAS_flash=b}}}}}function EAS_embed_flash(b,m,a,g,f,o,c){var j="";var e=new Date().getTime()+""+Math.floor(Math.random()*11);if(g){var h=[];var n,l,k;h=g.split(",");for(i=0;i<h.length;i++){n=h[i].indexOf("=");l=h[i].substring(0,n);k=h[i].substring(n+1,h[i].length);if(l.toLowerCase()=="flashvars"){if(typeof(f)=="undefined"){f=k}else{f+="&"+k}}else{j+='<param name="'+l+'" value="'+k+'" />'}}}if(o&&c){var h=[];h=o.split(",");for(i=0;i<h.length;i++){f+=(f?"&":"")+h[i]+"="+c+h[i]}}if(f){j+='<param name="FlashVars" value="'+f+'" />'}document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+b+'" height="'+m+'" id="eas_'+e+'"><param name="movie" value="'+a+'" />');document.write(j);document.write("<!--[if !IE]>-->");document.write('<object type="application/x-shockwave-flash" data="'+a+'" width="'+b+'" height="'+m+'">');document.write(j);document.write("</object>");document.write("<!--<![endif]-->");document.write("</object>");return}function EAS_show_flash(c,b,e,a){EAS_embed_flash(c,b,e,a)}function EAS_statistics(){if(typeof(EAS_cu)=="undefined"){return}document.write('<img width="1" height="1" src="'+EAS_server+"/eas?cu="+EAS_cu+";ord="+(new Date()).getTime()+'">')}function EAS_load_fif(c,h,b,e,a){var g=document;var f=g.createElement("iframe");var j=g.getElementById(c);f.src=h;f.style.width=e+"px";f.style.height=a+"px";f.style.margin="0px";f.style.borderWidth="0px";f.style.padding="0px";f.scrolling="no";f.frameBorder="0";f.allowTransparency="true";f.EAS_src=b+";fif=y";j.appendChild(f)}function EAS_resize_fif(c,b,a){if(typeof inDapIF!=="undefined"){var e=window.frameElement;var f=e.parentNode;if(c){e._width=e.style.width;e._height=e.style.height;e.style.width=b+"px";e.style.height=a+"px"}else{e.style.width=e._width;e.style.height=e._height}f.style.width=e.style.width;f.style.height=e.style.height}}function EAS_ism(id,width,height,minVisibleRatio,url,interval,maxLogInterval,activeTimeout,maxDuration,impTime,date){this.elementId=id;this.width=width;this.height=height;this.minVisibleRatio=minVisibleRatio;this.logUrl=url;this.interval=interval;this.logInterval=0;this.maxLogInterval=maxLogInterval;this.activeTimeout=activeTimeout;this.maxDuration=maxDuration;this.isActive=true;this.activeDuration=0;this.loggedDuration=0;this.totalDuration=0;this.lastActive=0;this.lastLogged=0;this.logEnabled=true;this.debugEnabled=this.getDebug();this.impTime=impTime;this.date=date;this.updateLogInterval=(function(){var f0=1,f1=1;return function(){var f=f0+f1;f0=f1;f1=f;this.logInterval=Math.min(f0*this.interval,this.maxLogInterval)}})();var _this=this;w=window;d=document;if(typeof inDapIF!=="undefined"){w=window.top;d=parent.document}if(
/*@cc_on!@*/
false){this.addEventHandler(d,"focusin",function(){_this.setActive()});this.addEventHandler(d,"focusout",function(){_this.setInactive()})}else{this.addEventHandler(w,"focus",function(){_this.setActive()});this.addEventHandler(w,"blur",function(){_this.setInactive()})}this.addEventHandler(w,"scroll",function(){_this.setActive()});this.addEventHandler(w,"resize",function(){_this.setActive()});setInterval(function(){_this.update()},_this.interval);if(this.debugEnabled){ismElem=document.getElementById(this.elementId);debugWidth=(this.width)-2;if(debugWidth<100){debugWidth=100}this.debugDiv=document.createElement("div");this.debugDiv.style.background="#20AA4F";this.debugDiv.style.position="absolute";this.debugDiv.style.top="0px";this.debugDiv.style.left="0px";this.debugDiv.style.width=debugWidth+"px";this.debugDiv.style.fontSize="10px";this.debugDiv.style.fontFamily="Verdana";this.debugDiv.style.color="#000";this.debugDiv.style.border="1px solid white";this.debugDiv.style.zIndex="1000";ismElem.appendChild(this.debugDiv)}}EAS_ism.prototype.addEventHandler=function(a,c,b){if(a.addEventListener){a.addEventListener(c,b,false)}else{if(a.attachEvent){a.attachEvent("on"+c,b)}}};EAS_ism.prototype.setActive=function(){this.isActive=true;this.lastActive=this.activeDuration};EAS_ism.prototype.setInactive=function(){this.isActive=false};EAS_ism.prototype.getPosition=function(g){var a={top:0,right:0,bottom:0,left:0};var c=document.getElementById(g);var b=window;var f=document;if(typeof inDapIF!=="undefined"){c=window.frameElement.parentNode;b=window.top;f=parent.document}while(c){a.left+=c.offsetLeft;a.top+=c.offsetTop;c=c.offsetParent}if(typeof b.pageYOffset=="number"){a.left-=b.pageXOffset;a.top-=b.pageYOffset}else{if(f.body&&(f.body.scrollLeft||f.body.scrollTop)){a.left-=f.body.scrollLeft;a.top-=f.body.scrollTop}else{if(f.documentElement&&(f.documentElement.scrollLeft||f.documentElement.scrollTop)){a.left-=f.documentElement.scrollLeft;a.top-=f.documentElement.scrollTop}}}a.right=a.left+this.width;a.bottom=a.top+this.height;return a};EAS_ism.prototype.getWindowSize=function(){var b={width:0,height:0};var a=window;var c=document;if(typeof inDapIF!=="undefined"){a=window.top;c=parent.document}if(typeof a.top.innerWidth=="number"){b.width=a.top.innerWidth;b.height=a.top.innerHeight}else{if(c.documentElement&&(c.documentElement.clientWidth||c.documentElement.clientHeight)){b.width=c.documentElement.clientWidth;b.height=c.documentElement.clientHeight}else{if(c.body&&(c.body.clientWidth||c.body.clientHeight)){b.width=c.body.clientWidth;b.height=c.body.clientHeight}}}return b};EAS_ism.prototype.isHidden=function(c,a){function e(f){return(f.right-f.left)*(f.bottom-f.top)}var b=e(a);a.left=Math.max(0,a.left);a.right=Math.min(a.right,c.width);a.top=Math.max(0,a.top);a.bottom=Math.min(a.bottom,c.height);return(e(a)/b<this.minVisibleRatio)};EAS_ism.prototype.log=function(e){if(e<=0){return}var c=this.logUrl+"&time="+e+"&impTime="+this.impTime+"&date="+this.date;if(this.lastLogged==0){c+="&first"}var a=document.getElementById("EAS_ism");var b=document.createElement("script");b.setAttribute("type","text/javascript");b.setAttribute("id","EAS_ism");b.setAttribute("src",c);if(a==null){document.getElementsByTagName("head")[0].appendChild(b)}else{document.getElementsByTagName("head")[0].replaceChild(b,a)}this.logEnabled=false;this.lastLogged=this.totalDuration;this.updateLogInterval()};EAS_ism.prototype.parseResponse=function(a){if("stop" in a&&!a.stop){this.loggedDuration=this.activeDuration;this.logEnabled=true}};EAS_ism.prototype.update=function(){var b=false;if(this.isActive){if(this.activeDuration>=this.maxDuration||this.activeDuration-this.lastActive>=this.activeTimeout){this.setInactive()}else{var a=this.getPosition(this.elementId);var c=this.getWindowSize();if(!this.isHidden(c,a)){this.activeDuration+=this.interval;b=true}}}if(this.logEnabled&&this.lastLogged<this.maxDuration){this.totalDuration+=this.interval;if(this.totalDuration-this.lastLogged>=this.logInterval){this.log(this.activeDuration-this.loggedDuration)}}if(this.debugEnabled){this.debug(b)}};EAS_ism.prototype.getDebug=function(){if(typeof EAS_debug_ism!="undefined"){return EAS_debug_ism}var a="";var b=document;if(typeof inDapIF!=="undefined"){b=parent.document}if(typeof b.cookie!="undefined"){a=(a=b.cookie.match(new RegExp("(^|;|\\s)eas_debug_ism=([^;]+);?")))?a[2]:""}if(a==""){return false}return true};EAS_ism.prototype.debug=function(a){if(this.debugEnabled&&typeof this.debugDiv!="undefined"){pos=this.getPosition(this.elementId);if(pos.top<0&&pos.bottom>0){this.debugDiv.style.top=(-pos.top)+"px"}else{this.debugDiv.style.top="0px"}this.debugDiv.innerHTML=" "+(this.isActive?"Active":"Idle")+(this.isActive?" and "+(a?"visible":"hidden"):"")+"<br/> In-screen time: "+(this.activeDuration/1000)+(this.logInterval?", Log interval: "+(this.logInterval/1000):"")}};