/*var bNetscape4plus = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4");
var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");

function CheckUIElements()
{
        var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;

        if ( bNetscape4plus ) { //
                yMenuFrom   = document["floater"].top;
                yMenuTo     = top.pageYOffset + 0;   //
        }
        else if ( bExplorer4plus ) {  //
                yMenuFrom   = parseInt (floater.style.top, 10);
                yMenuTo     = document.body.scrollTop + 260; // 
        }

        timeoutNextCheck = 500;

        if ( Math.abs (yButtonFrom - (yMenuTo + 152)) < 6 && yButtonTo < yButtonFrom ) {
                setTimeout ("CheckUIElements()", timeoutNextCheck);
                return;
        }


        if ( yButtonFrom != yButtonTo ) {
                yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 10 );
                if ( yButtonTo < yButtonFrom )
                        yOffset = -yOffset;

                if ( bNetscape4plus )
                        document["divLinkButton"].top += yOffset;
                else if ( bExplorer4plus )
                        divLinkButton.style.top = parseInt (divLinkButton.style.top, 10) + yOffset;

                timeoutNextCheck = 10;
        }
        if ( yMenuFrom != yMenuTo ) {
                yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
                if ( yMenuTo < yMenuFrom )
                        yOffset = -yOffset;

                if ( bNetscape4plus )
                        document["floater"].top += yOffset;
                else if ( bExplorer4plus )
                        floater.style.top = parseInt (floater.style.top, 10) + yOffset;

                timeoutNextCheck = 10;
        }

        setTimeout ("CheckUIElements()", timeoutNextCheck);
}

function ScrollInit()
{
        var y;

        // 
        //if ( top.frames.length )
         //       top.location.href = self.location.href;

        // 
        if ( bNetscape4plus ) {
                document["floater"].top = top.pageYOffset + 0;
                document["floater"].visibility = "visible";
        }
        else if ( bExplorer4plus ) {
                floater.style.top = document.body.scrollTop + 260;
                floater.style.visibility = "visible";
        }

        CheckUIElements();
        return true;
} 

ScrollInit();

*/

self.onError=null;
currentX = currentY = 0; 
whichIt = null; 
lastScrollX = 0; lastScrollY = 0;
NS = (document.layers) ? 1 : 0;
IE = (document.all) ? 1: 0;

function heartBeat() {
    if(IE) { 
        diffY = document.body.scrollTop; 
        diffX = 0; 
        if(document.all.floater.offsetTop < 260)
        	document.all.floater.style.pixelTop = 260;
    }
	
    if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }
    
    // 
    // 
		// window.status = document.all.floater.offsetTop;
    if(parseInt(document.all.floater.offsetTop) + 337 +100 >= document.body.scrollHeight - 80){
	   	 if(IE) document.all.floater.style.pixelTop = parseInt(document.all.floater.offsetTop) - parseInt(10);
        if(NS) document.floater.top = parseInt(document.all.floater.offsetTop) - parseInt(10); 
    }
	if(diffY != lastScrollY) {
        percent = .1 * (diffY - lastScrollY);
        if(percent > 0) percent = Math.ceil(percent);
        else percent = Math.floor(percent);
        if(IE && document.all.floater.offsetTop >= 259) {
        					document.all.floater.style.pixelTop += percent;
        				}
        if(NS) document.floater.top += percent; 
        lastScrollY = lastScrollY + percent;
		
    }
    if(diffX != lastScrollX) {
        percent = .1 * (diffX - lastScrollX);
        if(percent > 0) percent = Math.ceil(percent);
        else percent = Math.floor(percent);
        if(IE) document.all.floater.style.pixelLeft += percent;
        if(NS) document.floater.top += percent;
        lastScrollY = lastScrollY + percent;
    } 
}
    if(NS || IE) action = window.setInterval("heartBeat()",1);

