var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0
if(ie){
document.write('<style type="text/css">')
document.write("#screen	{filter:Alpha(Opacity=30);}")
document.write("</style>")
}
if(ns){
document.write('<style type="text/css">')
document.write("#master	{clip:rect(0,300,300,0);}")
document.write("</style>")
}
var master = new Object("element")
master.curRight = 0;	master.curTop = 30;
master.gapRight = 220;	master.gapTop = 0;
master.timer = null;
function moveAlong(layerName, paceRight, paceTop, fromRight, fromTop){
clearTimeout(eval(layerName).timer)
if(eval(layerName).curRight != fromRight){
     if((Math.max(eval(layerName).curRight, fromRight) - Math.min(eval(layerName).curRight, fromRight)) < paceRight){eval(layerName).curRight = fromRight}
else if(eval(layerName).curRight < fromRight){eval(layerName).curRight = eval(layerName).curRight + paceRight}
else if(eval(layerName).curRight > fromRight){eval(layerName).curRight = eval(layerName).curRight - paceRight}
if(ie){document.all[layerName].style.right = eval(layerName).curRight}
if(ns){document[layerName].right = eval(layerName).curRight}
}
if(eval(layerName).curTop != fromTop){
     if((Math.max(eval(layerName).curTop, fromTop) - Math.min(eval(layerName).curTop, fromTop)) < paceTop){eval(layerName).curTop = fromTop}
else if(eval(layerName).curTop < fromTop){eval(layerName).curTop = eval(layerName).curTop + paceTop}
else if(eval(layerName).curTop > fromTop){eval(layerName).curTop = eval(layerName).curTop - paceTop}
if(ie){document.all[layerName].style.top = eval(layerName).curTop}
if(ns){document[layerName].top = eval(layerName).curTop}
}
eval(layerName).timer=setTimeout('moveAlong("'+layerName+'",'+paceRight+','+paceTop+','+fromRight+','+fromTop+')',30)
}
function setPace(layerName, fromRight, fromTop, motionSpeed){
eval(layerName).gapRight = (Math.max(eval(layerName).curRight, fromRight) - Math.min(eval(layerName).curRight, fromRight))/motionSpeed
eval(layerName).gapTop = (Math.max(eval(layerName).curTop, fromTop) - Math.min(eval(layerName).curTop, fromTop))/motionSpeed
moveAlong(layerName, eval(layerName).gapRight, eval(layerName).gapTop, fromRight, fromTop)
}
var expandState = 0
function expand(){
if(expandState == 0){setPace("master", 220, 30, 3); if(ie){document.menutop.src = "side/menub.gif"}; expandState = 1;}
else{setPace("master", 0, 30, 3); if(ie){document.menutop.src = "side/menu.gif"}; expandState = 0;}
}

