// JavaScript Document

/*lixule*/
function addLoadEvent(func){
       var oldonload = window.onload;
       if(typeof window.onload != 'function'){
              window.onload = func;
              }else{
                     window.onload = function(){
                            oldonload();
                            func();
                            }
                     }
       }


function scrollImg(){
	if(!document.getElementById("fixedDiv")) return false;
    var posX,posY;
    if (window.innerHeight) {
        posX = window.pageXOffset;
        posY = window.pageYOffset;
    }else if (document.documentElement && document.documentElement.scrollTop) {
		  posX = document.documentElement.scrollLeft;
		  posY = document.documentElement.scrollTop;
    }else if (document.body) {
	  posX = document.body.scrollLeft;
	  posY = document.body.scrollTop;
    }
    var ad = document.getElementById("fixedDiv");
	ad.style.position = "absolute";
	ad.style.top=(posY+130)+"px";
    ad.style.right=(posX+80)+"px";
    setTimeout("scrollImg()",0);
}
function guanbi(){
	if(!document.getElementById("closeButton")) return false;
	var closeButton = document.getElementById("closeButton")
	var whoClose = document.getElementById("fixedDiv"); 
	closeButton.onclick = function(){
		whoClose.style.display = "none";
		}
	}

addLoadEvent(scrollImg);
addLoadEvent(guanbi);
