
﻿$=function(id){return document.getElementById(id);}
function closeBanner(id){var thisObj=$(id);thisObj.parentNode.removeChild(thisObj);}
var float_Top=100;var float_Heigth=310;function resetFloatAdTop(){var nowScrollTop=parseInt(document.documentElement.scrollTop);var windowWidth,windowHeight;if(self.innerHeight){windowWidth=self.innerWidth;windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
var wrap=$("page");var leftFollowAdChild=$("leftFollowAd").childNodes;var rightFollowAdChild=$("rightFollowAd").childNodes;var hasAd=false;var allAd=0;for(var i=0,len=leftFollowAdChild.length;i<len;i++){var div=leftFollowAdChild[i];if(div.nodeType!=1){continue;}
if(div){if(wrap){var left=wrap.offsetLeft-(div.offsetWidth+10);if(left<0)left=10;div.style.left=left+"px";}
div.style.top=(nowScrollTop+float_Top+allAd*float_Heigth)+"px";hasAd=true;allAd++;}
div=null;}
var allAd=0;for(var i=0,len=rightFollowAdChild.length;i<len;i++){var div=rightFollowAdChild[i];if(div.nodeType!=1){continue;}
if(div){if(wrap){var right=wrap.offsetLeft+wrap.offsetWidth+10;if(windowWidth<(wrap.offsetWidth+div.offsetWidth))right=wrap.offsetWidth-(div.offsetWidth+10);div.style.left=right+"px";}
div.style.top=(nowScrollTop+float_Top+allAd*float_Heigth)+"px";hasAd=true;allAd++;}
div=null;}
if(!hasAd){window.clearInterval(intervalC);}}
var intervalC=setInterval('resetFloatAdTop()',30);if(parseInt(screen.width)<1024){for(var i=0,len=leftFollowAdChild.length;i<len;i++){var div=leftFollowAdChild[i];if(div.nodeType!=1){continue;}
closeBanner(div.id);}
for(var i=0,len=rightFollowAdChild.length;i<len;i++){var div=rightFollowAdChild[i];if(div.nodeType!=1){continue;}
closeBanner(div.id);}}
function makeMyFloat(){window.clearInterval(intervalC);intervalC=setInterval('resetFloatAdTop()',30);}
