var delayb4scroll = 3000 
var marqueespeed1 = 1 
var marqueespeed2 = 1 
var pauseit1 = 10
var pauseit2 = 10

var copyspeed1=marqueespeed1
var copyspeed2=marqueespeed1
var pausespeed1=(pauseit1==0)? copyspeed1: 0
var pausespeed2=(pauseit2==0)? copyspeed2: 0
var actualheight1=''
var actualheight2=''

function scrollmarquee(){
if (document.getElementById("HomeNews")) {
if (parseInt(cross_marquee1.style.top)>(actualheight1*(-1)+8))
cross_marquee1.style.top=parseInt(cross_marquee1.style.top)-copyspeed1+"px"
else
cross_marquee1.style.top=parseInt(marqueeheight1)+8+"px"
}

if (document.getElementById("HomeOffices")) {
if (parseInt(cross_marquee2.style.top)>(actualheight2*(-1)+8))
cross_marquee2.style.top=parseInt(cross_marquee2.style.top)-copyspeed2+"px"
else
cross_marquee2.style.top=parseInt(marqueeheight2)+8+"px"
}
}

function initializemarquee(){
    if (document.getElementById("HomeNews")) {
    cross_marquee1=document.getElementById("vmarquee1")
    cross_marquee1.style.top=0
    marqueeheight1=document.getElementById("marqueecontainer1").offsetHeight
    actualheight1=cross_marquee1.offsetHeight
    if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
    cross_marquee1.style.height=marqueeheight1+"px"
    cross_marquee1.style.overflow="scroll"
    return
    }

}
    
    if (document.getElementById("HomeOffices")) {
    cross_marquee2=document.getElementById("vmarquee2")
    cross_marquee2.style.top=0
    marqueeheight2=document.getElementById("marqueecontainer2").offsetHeight
    actualheight2=cross_marquee2.offsetHeight
    if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
    cross_marquee2.style.height=marqueeheight2+"px"
    cross_marquee2.style.overflow="scroll"
    return
    }
}

setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)
}


if (window.addEventListener)
    window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
    window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
    window.onload=initializemarquee
