﻿// JScript File

//configure menu width
var menuwidth_de=280
var menuwidth=380

//configure scroll speed (1-10), where larger is faster
var scrollspeed=7

//specify meny content

////NO NEED TO EDIT BELOW THIS LINE////////////
var actualwidth_gl=''
var actualwidth_ag=''
var ns_scroll_gl
var ns_scroll_ag
var actualwidth=''
var ns_scroll

function fillup(){

if (document.all){
actualwidth=test2.offsetWidth
actualwidth_gl=galerias.offsetWidth
actualwidth_ag=agenda.offsetWidth

}

else if (document.layers){

ns_scroll=document.ns_scrollmenu.document.ns_scrollmenu2
ns_scroll.document.close()
actualwidth=ns_scroll.document.width

ns_scroll_gl=document.ns_scrollmenu.document.ns_scrollmenu2
ns_scroll_gl.document.close()
actualwidth_gl=ns_scroll_gl.document.width

ns_scroll_ag=document.ns_scrollmenu.document.ns_scrollmenu2
ns_scroll_ag.document.close()
actualwidth_ag=ns_scroll_ag.document.width

}

}

window.onload=fillup
function moveleft_prod(){
if (document.all&& test2.style.pixelLeft>(menuwidth-actualwidth))
test2.style.pixelLeft-=scrollspeed
else if (document.layers&&ns_scroll.left>(menuwidth-actualwidth))
ns_scroll.left-=scrollspeed
lefttime=setTimeout("moveleft_prod()",50)
}

function moveright_prod(){
if (document.all&& test2.style.pixelLeft<0)
test2.style.pixelLeft+=scrollspeed
else if (document.layers&&ns_scroll.left<0)
ns_scroll.left+=scrollspeed
righttime=setTimeout("moveright_prod()",50)
}

function moveleft(){
if (document.all&& galerias.style.pixelLeft>(menuwidth_de-actualwidth_gl))
galerias.style.pixelLeft-=scrollspeed
else if (document.layers&&ns_scroll_gl.left>(menuwidth_de-actualwidth_gl))
ns_scroll_gl.left-=scrollspeed
lefttime_gl=setTimeout("moveleft()",50)
} 

function moveright(){
if (document.all&& galerias.style.pixelLeft<0)
galerias.style.pixelLeft+=scrollspeed
else if (document.layers&&ns_scroll_gl.left<0)
ns_scroll_gl.left+=scrollspeed
righttime_gl=setTimeout("moveright()",50)
}

function moveleft_agenda(){
if (document.all&& agenda.style.pixelLeft>(menuwidth_de-actualwidth_ag))
agenda.style.pixelLeft-=scrollspeed
else if (document.layers&&ns_scroll_ag.left>(menuwidth_de-actualwidth_ag))
ns_scroll_ag.left-=scrollspeed
lefttime_ag=setTimeout("moveleft_agenda()",50)
} 

function moveright_agenda(){
if (document.all&& agenda.style.pixelLeft<0)
agenda.style.pixelLeft+=scrollspeed
else if (document.layers&&ns_scroll_ag.left<0)
ns_scroll_ag.left+=scrollspeed
righttime_ag=setTimeout("moveright_agenda()",50)
}