﻿//configure path for left and right arrows
var goleftimage='pointer2.gif'
var gorightimage='pointer.gif'


//configure menu width (in px):
var menuwidth=748
//configure menu height (in px):
var menuheight=40
//Specify scroll buttons directions ("normal" or "reverse"):
var scrolldir="normal"
//configure scroll speed (1-10), where larger is faster
var scrollspeed=6
//specify menu content
var menucontents='<nobr><a href="http://www.spadeworx.com">spadeworx site</a> <BR>| <a href="http://www.spadeworx.com">spadeworx </a> <BR>| <a href="http://www.spadeworx.com">spadeworx</a> |<BR> <a href="http://www.spadeworx.com">spadeworx.com</a> | <BR><a href="http://spadeworx.com">spadeworx.com</a></nobr>'


////NO NEED TO EDIT BELOW THIS LINE////////////

var iedom=document.all||document.getElementById
var leftdircode='onMouseover="moveup()" onMouseout="clearTimeout(uptime)"'
var rightdircode='onMouseover="movedown()" onMouseout="clearTimeout(downtime)"'
if (scrolldir=="reverse")
{
    var tempswap=leftdircode
    leftdircode=rightdircode
    rightdircode=tempswap
}
var lefttime, righttime;
var controlId = "container";
var actualwidth=''
var actualheight=''
var cross_scroll, ns_scroll
var loadedyes=0
function fillup()
{
    if (iedom)
    {
        cross_scroll = document.getElementById ? document.getElementById(controlId) : document.all.container
        tdcross_scroll = document.getElementById ? document.getElementById("tdcontainer") : document.all.container
    //cross_scroll.innerHTML=menucontents
    actualwidth=document.all? cross_scroll.offsetWidth : document.getElementById(controlId).offsetWidth
    actualheight = document.all ? cross_scroll.offsetHeight : document.getElementById(controlId).offsetHeight
    menuwidth = document.all ? tdcross_scroll.offsetWidth : document.getElementById("tdcontainer").offsetWidth
   //alert(actualwidth + "--" + actualheight + "--" + menuwidth);
    }
    else if (document.layers)
    {
    ns_scroll=document.ns_scrollmenu.document.ns_scrollmenu2
    ns_scroll.document.write(menucontents)
    ns_scroll.document.close()
    actualwidth=ns_scroll.document.width
    actualheight=ns_scroll.document.height
    }
    loadedyes=1
}

function moveleft()
{
  
    if (loadedyes)
    {
       
        if (iedom && parseInt(cross_scroll.style.left) > (menuwidth - actualwidth))
        {
        cross_scroll.style.left=parseInt(cross_scroll.style.left)-scrollspeed+"px"
        }
        else if (document.layers&&ns_scroll.left>(menuwidth-actualwidth))
        ns_scroll.left-=scrollspeed
    }
    lefttime=setTimeout("moveleft()",50)
}
function moveup()
{
    if (loadedyes)
    {
        if (iedom&&parseInt(cross_scroll.style.top)>(menuheight-actualheight))
        {
        cross_scroll.style.top=parseInt(cross_scroll.style.top)-scrollspeed+"px"
        }
        else if (document.layers&&ns_scroll.top>(menuheight-actualheight))
        ns_scroll.top-=scrollspeed
    }
    uptime=setTimeout("moveup()",50)
}
function movedown()
{
    if (loadedyes)
    {
        if (iedom&&parseInt(cross_scroll.style.top)<0)
        {
        cross_scroll.style.top=parseInt(cross_scroll.style.top)+scrollspeed+"px"
        }
        else if (document.layers&&ns_scroll.top>(menuheight-actualheight))
        ns_scroll.top-=scrollspeed
    }
    downtime=setTimeout("movedown()",50)
}
function moveright()
{
    if (loadedyes)
    {
        if (iedom&&parseInt(cross_scroll.style.left)<0)
        cross_scroll.style.left=parseInt(cross_scroll.style.left)+scrollspeed+"px"
        else if (document.layers&&ns_scroll.left<0)
        ns_scroll.left+=scrollspeed
    }
    righttime=setTimeout("moveright()",50)
}

