var agt      =  navigator.userAgent.toLowerCase();
var ie6      = (navigator.userAgent.indexOf("MSIE 6") > 0);
var ie4      = (document.all && !ie6) ? 1 : 0;
var ns6      = ((((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1))) && ( parseInt(navigator.appVersion) >= 5));
var ns4      = (document.layers && !ns6) ? 1 : 0

var topValue = 150;

function setVariables() {
    if (ns4||ns6||ie4||ie6) {
        if (ns4) {
            dS="document.";
            pageObject="ns_scrolling_object";
            sD="";
            t=".top=";
            myPageY="window.pageYOffset";
        }
        else if (ie6) {
            dS="document.all.";
            pageObject="ie_scrolling_object";
            sD=".style";
            t=".pixelTop=";
            myPageY="document.documentElement.scrollTop";
        }
        else { // ie4, opera and others
            dS="";
            pageObject="ie_scrolling_object";
            sD=".style";
            t=".pixelTop=";
            myPageY="document.body.scrollTop";
        }
        myObjectTop    = dS + pageObject + sD + t;
    }
}
function checkLocation() {
    if (ns6){
        _yoffset = eval(document.body.scrollTop + topValue) + "px";
        document.getElementById('ie_scrolling_object').style.top=_yoffset;
    } else {
        myObjectY = eval(myPageY) + topValue;
        eval(myObjectTop+myObjectY);
    }
    setTimeout("checkLocation()",10);
}
function scrollingMenu() {
    setVariables();
    checkLocation();
}
onload = scrollingMenu;

