//runTicker v1.

var copyspeed;
var iedom;
var actualwidth;
var cross_marquee;
var ns_marquee;

var _marqueewidth="930px";
var _marqueeheight="25px";
var _marqueespeed=4;
var _marqueebgcolor="";
var _pauseit=1;
var _marqueecontent='<nobr class=ticker>Voer tekst in ...</nobr>';

function populate(){
  if (iedom){
    cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee;
    cross_marquee.style.left=parseInt(_marqueewidth)+8+"px";
    cross_marquee.innerHTML=_marqueecontent;
    actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth;
		cross_marquee.style.width = '100%';
  } else if (document.layers) {
    ns_marquee=document.ns_marquee.document.ns_marquee2;
    ns_marquee.left=parseInt(_marqueewidth)+8;
    ns_marquee.document.write(_marqueecontent);
    ns_marquee.document.close();
		ns_marquee.style.width = '100%';
    actualwidth=ns_marquee.document.width;
  }
  lefttime=setInterval("scrollmarquee()",20);
}

function scrollmarquee(){
  if (iedom){
    if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8)) {
      cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed+"px";
		} else {
			cross_marquee.style.left=parseInt(_marqueewidth)+8+"px";
		}
  } else if (document.layers) {
    if (ns_marquee.left>(actualwidth*(-1)+8)) {
      ns_marquee.left-=copyspeed;
		} else {
      ns_marquee.left=parseInt(_marqueewidth)+8;
    }
  }
}

function runTicker(marqueewidth, marqueeheight, marqueespeed, marqueebgcolor, pauseit, marqueecontent) {
	if (marqueewidth) {
    _marqueewidth = marqueewidth;
		_marqueeheight = marqueeheight;
		_marqueespeed = marqueespeed;
		_marqueebgcolor = marqueebgcolor;
		_pauseit = pauseit;
		_marqueecontent = marqueecontent;
  }
	
  _marqueespeed=(document.all)? _marqueespeed : Math.max(1, _marqueespeed-1);
  copyspeed=_marqueespeed;
  pausespeed=(_pauseit==0)? copyspeed: 0;
  actualwidth='';
  iedom=document.all||document.getElementById;
	
	if (iedom||document.layers){
		with (document){
			document.write('<table border="0" cellspacing="0" cellpadding="0"><td>');
			if (iedom){
				write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+_marqueecontent+'</span>')
				write('<div style="position:relative;width:'+_marqueewidth+';height:'+_marqueeheight+';overflow:hidden">');
				write('<div style="position:absolute;width:'+_marqueewidth+';height:'+_marqueeheight+';background-color:'+_marqueebgcolor+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=_marqueespeed">');
				write('<div id="iemarquee" style="position:absolute;left:0px;top:0px"></div>');
				write('</div></div>')
			} else if (document.layers) {
				write('<ilayer width='+_marqueewidth+' height='+_marqueeheight+' name="ns_marquee" bgColor='+_marqueebgcolor+'>');
				write('<layer name="ns_marquee2" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=_marqueespeed"></layer>');
				write('</ilayer>');
			}
			document.write('</td></table>');
		}
	}
	
	window.onload=populate;
}