/* 
* package : Brightcode Weblinks Module
* author : Theo van der Sluijs
* link : http://www.brightcode.eu
* Description : Notepad for Joomla!
* copyright : Copyright (C) 2007 Brightcode.eu
* email: theo@brightcode.eu
* date:  October 2007
* Release: 1.5
* Package Code License : http://creativecommons.org/licenses/by-nc-sa/3.0/
* Joomla! API Code License : http://www.gnu.org/copyleft/gpl.html GNU/GPL 
* JavaScript Code & CSS  : http://creativecommons.org/licenses/by-nc-sa/3.0/
* 
*/


/***********************************************
* 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.
***********************************************/
////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var hactualwidth=''

function hscrollmarquee(){
  if (parseInt(hcross_marquee.style.left)>(hactualwidth*(-1)+8))
    hcross_marquee.style.left=parseInt(hcross_marquee.style.left)-copyspeed+"px"
  else
    hcross_marquee.style.left=parseInt(hmarqueewidth)+8+"px"
  }

function hinitializemarquee(){
    hcross_marquee=document.getElementById("hmarquee")
    hcross_marquee.style.left=0
    hmarqueewidth=document.getElementById("cna_marquee").offsetWidth
    hactualwidth=hcross_marquee.offsetWidth
    if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
      hcross_marquee.style.width=hmarqueewidth+"px"
      hcross_marquee.style.overflow="scroll"
      return
      }
    setTimeout('lefttime=setInterval("hscrollmarquee()",30)', delayb4scroll)
  }

if (window.addEventListener)
  window.addEventListener("load", hinitializemarquee, false)
else if (window.attachEvent)
  window.attachEvent("onload", hinitializemarquee)
else if (document.getElementById)
  window.onload=hinitializemarquee
