
/***********************************************
* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/


var cross_marquee
var delayb4scroll=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?

var cross_marquee1
var delayb4scroll1=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed1=2 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit1=1 //Pause marquee onMousever (0=no. 1=yes)?

var cross_marquee2
var delayb4scroll2=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed2=2 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit2=1 //Pause marquee onMousever (0=no. 1=yes)?

var cross_marquee3
var delayb4scroll3=3000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed3=2 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit3=1 //Pause marquee onMousever (0=no. 1=yes)?

var cross_marquee4
var delayb4scroll4=3000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed4=2 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit4=1 //Pause marquee onMousever (0=no. 1=yes)?


////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=''

var copyspeed1=marqueespeed1
var pausespeed1=(pauseit1==0)? copyspeed1: 0
var actualheight1=''

var copyspeed2=marqueespeed2
var pausespeed2=(pauseit2==0)? copyspeed2: 0
var actualheight2=''

var copyspeed3=marqueespeed3
var pausespeed3=(pauseit3==0)? copyspeed3: 0
var actualheight3=''

var copyspeed4=marqueespeed4
var pausespeed4=(pauseit4==0)? copyspeed4: 0
var actualheight4=''

function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8)) //if scroller hasn't reached the end of its height
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px" //move scroller upwards
else //else, reset to original position
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}

function scrollmarquee1(){

if (parseInt(cross_marquee1.style.top)>(actualheight1*(-1)+8)) //if scroller hasn't reached the end of its height
cross_marquee1.style.top=parseInt(cross_marquee1.style.top)-copyspeed1+"px" //move scroller upwards
else //else, reset to original position
cross_marquee1.style.top=parseInt(marqueeheight1)+8+"px"
//console.log('Scrool 1'+marqueeheight1);
}

function scrollmarquee2(){
if (parseInt(cross_marquee2.style.top)>(actualheight2*(-1)+8)) //if scroller hasn't reached the end of its height
cross_marquee2.style.top=parseInt(cross_marquee2.style.top)-copyspeed2+"px" //move scroller upwards
else //else, reset to original position
cross_marquee2.style.top=parseInt(marqueeheight2)+8+"px"
}

function scrollmarquee3(){
if (parseInt(cross_marquee3.style.top)>(actualheight3*(-1)+8)) //if scroller hasn't reached the end of its height
cross_marquee3.style.top=parseInt(cross_marquee3.style.top)-copyspeed3+"px" //move scroller upwards
else //else, reset to original position
cross_marquee3.style.top=parseInt(marqueeheight3)+8+"px"
}

function scrollmarquee4(){
if (parseInt(cross_marquee4.style.top)>(actualheight4*(-1)+8)) //if scroller hasn't reached the end of its height
cross_marquee4.style.top=parseInt(cross_marquee4.style.top)-copyspeed4+"px" //move scroller upwards
else //else, reset to original position
cross_marquee4.style.top=parseInt(marqueeheight4)+8+"px"
}

function initializemarquee(){
cross_marquee=document.getElementById("vmarquee")
cross_marquee.style.top=0
marqueeheight=document.getElementById("marqueecontainer").offsetHeight
actualheight=cross_marquee.offsetHeight //height of marquee content (much of which is hidden from view)
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marquee.style.height=marqueeheight+"px"
cross_marquee.style.overflow="scroll"
return
}
setTimeout('lefttime=setInterval("scrollmarquee()",50)', delayb4scroll)
}

function initializemarquee1(){
cross_marquee1=document.getElementById("vmarquee1")
cross_marquee1.style.top=0
marqueeheight1=document.getElementById("marqueecontainer1").offsetHeight
actualheight1=cross_marquee1.offsetHeight //height of marquee content (much of which is hidden from view)
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
}
setTimeout('lefttime1=setInterval("scrollmarquee1()",50)', delayb4scroll1)
}


function initializemarquee2(){

cross_marquee2=document.getElementById("vmarquee2")
cross_marquee2.style.top=0
marqueeheight2=document.getElementById("marqueecontainer2").offsetHeight
actualheight2=cross_marquee2.offsetHeight //height of marquee content (much of which is hidden from view)
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('lefttime2=setInterval("scrollmarquee2()",50)', delayb4scroll2)
}


function initializemarquee3(){

cross_marquee3=document.getElementById("vmarquee3")
cross_marquee3.style.top=0
marqueeheight3=document.getElementById("marqueecontainer3").offsetHeight
actualheight3=cross_marquee3.offsetHeight //height of marquee content (much of which is hidden from view)
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marquee3.style.height=marqueeheight3+"px"
cross_marquee3.style.overflow="scroll"
return
}
setTimeout('lefttime3=setInterval("scrollmarquee3()",50)', delayb4scroll3)
}


function initializemarquee4(){

cross_marquee4=document.getElementById("vmarquee4")
cross_marquee4.style.top=0
marqueeheight4=document.getElementById("marqueecontainer4").offsetHeight
actualheight4=cross_marquee4.offsetHeight //height of marquee content (much of which is hidden from view)
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marquee4.style.height=marqueeheight4+"px"
cross_marquee4.style.overflow="scroll"
return
}
setTimeout('lefttime4=setInterval("scrollmarquee4()",50)', delayb4scroll4)
}

if (window.addEventListener){

		
if(mod_news_Scroller) 
window.addEventListener("load", initializemarquee, false);

if(mod_events_Scroller)
window.addEventListener("load", initializemarquee1, false);

if( mod_programs_Scroller )
window.addEventListener("load", initializemarquee2, false);

if(mod_videos_Scroller)
window.addEventListener("load", initializemarquee3, false);

if(mod_articles_Scroller)
window.addEventListener("load", initializemarquee4, false);

}
else if (window.attachEvent){

if(mod_news_Scroller)
window.attachEvent("onload", initializemarquee);

if(mod_events_Scroller)
window.attachEvent("onload", initializemarquee1);

if(mod_programs_Scroller)
window.attachEvent("onload", initializemarquee2);

if(mod_videos_Scroller)
window.attachEvent("onload", initializemarquee3);

if(mod_articles_Scroller)
window.attachEvent("onload", initializemarquee4);


}
else if (document.getElementById){

if(mod_news_Scroller) 
window.onload=initializemarquee;

if(mod_events_Scroller)
window.onload=initializemarquee1;

if(mod_programs_Scroller)
window.onload=initializemarquee2;

if(mod_videos_Scroller)
window.onload=initializemarquee3;

if(mod_articles_Scroller)
window.onload=initializemarquee4;

}




