var nn=(navigator.appName.indexOf("Netscape")!=-1);
var dD=document,dH=dD.html,dB=dD.body,px=dD.layers?'':'px';
var myWidth = 0, myHeight = 0;
var viewportwidth, viewportheight, y;
var clicked = false;
var GoToTop = 100;

function getwinsize(){
		if( typeof( window.innerWidth ) == 'number' ) {
			//Non-IE
			myWidth = window.innerWidth;
			myHeight = window.innerHeight;
		} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			//IE 6+ in 'standards compliant mode'
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
			//IE 4 compatible
			myWidth = document.body.clientWidth;
			myHeight = document.body.clientHeight;
		}
}

function floatLayer(iX,iY,id){
	var L=dD.getElementById?dD.getElementById(id):dD.all?dD.all[id]:dD.layers[id];
	this[id+'O']=L;

	if(dD.layers)L.style=L;

	L.nX=L.iX=iX;
	L.nY=L.iY=iY;

	L.P=function(y){
		this.style.top=y+px;
	}
	L.Fm=function(){
        try{
    		var pX, pY;
    		pX=(this.iX >=0)?0:nn?innerWidth:nn&&dH.clientWidth?dH.clientWidth:dB.clientWidth;
    		pY=nn?pageYOffset:nn&&dH.scrollTop?dH.scrollTop:dB.scrollTop;
    		if(this.iY<0)pY+=nn?innerHeight:nn&&dH.clientHeight?dH.clientHeight:dB.clientHeight;
    		this.nY+=.1*(pY+this.iY-this.nY);
    		this.P(this.nY);
    //		this.P(pY);
    		setTimeout(this.id+'O.Fm()',5);
        }catch(e){
            alert("This feature does not work in this browser. Please download an alternative browser. go to http://chrome.google.com");
        }
	}
	return L;
}

