function positiondivHorizontal() {
    menuwidth1 = parseInt(crossmain1.offsetWidth)
    mainobjoffsetW = getposOffset(crossmain1, "left")
    statusdiv.style.left = menu_width1 + mainobjoffset + 10 + "px"
}

function divMoveLeft() {
    scrollspeed = 2;
    if (window.uptime) clearTimeout(uptime)
    if (movestate != "left") moveLeft()
}

function divMoveRight() {
    scrollspeed = 2;
    if (window.downtime) clearTimeout(downtime)
    if (movestate != "right") moveRight()
}

function moveRight() {
    if (loadedyes) {
        movestate = "right"
        if (iedom && parseInt(cross_scrollHorizontal.style.left) < 0) {
            cross_scrollHorizontal.style.left = parseInt(cross_scrollHorizontal.style.left) + scrollspeed + "px"
            showhidediv("hidden")
        }
        else
            showhidediv("visible")
    }
    uptime = setTimeout("moveRight()", 10)
}

function moveLeft() {
    if (loadedyes) {
        movestate = "left"
        if (iedom && parseInt(cross_scrollHorizontal.style.left) > (menu_width1 - actualwidth1)) {
            cross_scrollHorizontal.style.left = parseInt(cross_scrollHorizontal.style.left) - scrollspeed + "px"
            showhidediv("hidden")
        }
        else
            showhidediv("visible")
    }
    downtime = setTimeout("moveLeft()", 10)
}

function fillupHorizontal() {
    if (iedom) {
        crossmain1 = document.getElementById ? document.getElementById("motioncontainerHorizontal") : document.all.motioncontainer
        menu_times1 = $("li", ".HorizontalItems").length;
        menu_width1 = parseInt(crossmain1.style.width)
        mainobjoffset = getposOffset(crossmain1, "top")
        cross_scrollHorizontal = document.getElementById ? document.getElementById("motiongalleryHorizontal") : document.all.motiongallery
        actualwidth1 = cross_scrollHorizontal.offsetWidth
        //alert(actualwidth1);
        crossmain1.onmousemove = function(e) {
            motionengine(e)
        }

        crossmain1.onmouseout = function(e) {
            stopmotion(e)
            showhidediv("hidden")
        }
    }
    if (window.opera) {
        cross_scrollHorizontal.style.left = menu_width1 - actualwidth1 + 'px'
        setTimeout('cross_scrollHorizontal.style.left=0', 10)
    }
    loadedyes = 1
    if (endofgallerymsg != "") {
        creatediv()
        positiondivHorizontal()
    }
}
//window.onload = fillupHorizontal
