var ie=document.all ? true : false;
var ie5=(document.all && !document.getElementById)? (true):(false);if (ie5){document.getElementById=function (e){return document.all[e];}}

function $(id){return document.getElementById(id);}

function onContent(f){//(C)webreflection.blogspot.com
var a=onContent,b=navigator.userAgent,d=document,w=window,c="onContent",e="addEventListener",o="opera",r="readyState",
s="<scr".concat("ipt defer src='//:' on",r,"change='if(this.",r,"==\"complete\"){this.parentNode.removeChild(this);",c,".",c,"()}'></scr","ipt>");
a[c]=(function(o){return function(){a[c]=function(){};for(a=arguments.callee;!a.done;a.done=1)f(o?o():o)}})(a[c]);
if(d[e])d[e]("DOMContentLoaded",a[c],false);
if(/WebKit|Khtml/i.test(b)||(w[o]&&parseInt(w[o].version())<9))(function(){/loaded|complete/.test(d[r])?a[c]():setTimeout(arguments.callee,1)})();
else if(/MSIE/i.test(b))d.write(s);
};

function windowWidth(){
    if (window.innerWidth){
        if (document.body.offsetWidth){
            if (window.innerWidth!=document.body.offsetWidth)
                return document.body.offsetWidth;
            }
        return (window.innerWidth);                     // Mozilla
    }
    if (document.documentElement.clientWidth)
        return document.documentElement.clientWidth;    // IE6
    if (document.body.clientWidth)
        return document.body.clientWidth;               // IE DHTML-compliant any other
}

function addEvent(eventType,handlerFunc,addToObject){
	var o=(addToObject)?(addToObject):(window);if (o){	
	if (window.attachEvent){o.attachEvent("on"+eventType,handlerFunc);}
	else if (window.addEventListener){o.addEventListener(eventType,handlerFunc,false);}
	}
}

onContent(function(){	
	bannerHider();
	addEvent("resize",bannerHider);
	addEvent("scroll",bannerScroller);
});

function bannerHider(){
	if(windowWidth()>1000){		
		$("bannerLeft").style.display="block"
		$("bannerRight").style.display="block";
	}else{	
		$("bannerLeft").style.display="none"
		$("bannerRight").style.display="none";
	}
}

function bannerScroller(){
	var newTop = window.pageYOffset ? window.pageYOffset : document.documentElement.scrollTop;
	//status = window.pageYOffset + ":" +document.body.scrollTop ;
	
	$("bannerLeft").style.top = newTop+"px";
	$("bannerRight").style.top = newTop+"px";
}