window.setInterval("HeartBeat()",1);

function closeAd()
{
	document.getElementById("Ad").style.visibility="hidden";
	document.getElementById("Products").style.visibility="hidden";
}

lastScrollY=0;
function HeartBeat()
{ 
    var diffY;
    if (document.documentElement && document.documentElement.scrollTop)
        diffY = document.documentElement.scrollTop;
    else if (document.body)
        diffY = document.body.scrollTop;
    else
        {/*Netscape stuff*/}        
    
    percent=.1*(diffY-lastScrollY); 
    if(percent>0)percent=Math.ceil(percent); 
    else percent=Math.floor(percent);
    
    if(document.getElementById('nav') != null)
    {
        document.getElementById("nav").style.top=parseInt(document.getElementById("nav").style.top)+percent+"px";
    }
    
    if(document.getElementById('Ad') != null)
    {
        document.getElementById("Ad").style.top=parseInt(document.getElementById("Ad").style.top)+percent+"px";
    }
    
    if(document.getElementById('phone') != null)
    {
        document.getElementById("phone").style.top=parseInt(document.getElementById("phone").style.top)+percent+"px";
    } 
    
    if(document.getElementById('Products') != null)
    {
        document.getElementById("Products").style.top=parseInt(document.getElementById("Products").style.top)+percent+"px";
    }             
    
    lastScrollY=lastScrollY+percent;
}


