
/*
Pausing updown message scroller- 
? Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
Terms Of Use, visit http://www.dynamicdrive.com
midified by sly@makolab.pl
*/

	  var scrollerwidth='240px';
	  var scrollerheight='80px';
	  var scrollertop = '5px';
	  var scrollerleft = '5px';
	  var scrollerbgcolor=''; 

	var ie = document.all;
	var dom = document.getElementById;
	var ns = document.layers;
	
	var tick_i=0;

	if (typeof(tickers) != 'undefined' && tickers.length>2) {
		tick_i=2;
	}
	else {
		tick_i=0;
	}



	function move3(whichdiv) {
		tdiv=eval(whichdiv);
		if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5) {
			tdiv.style.top=0+"px";
			setTimeout("move3(tdiv)",3000);
			setTimeout("move4(second2_obj)",3000);
			return;
		}
		
		if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1) {
			tdiv.style.top=parseInt(tdiv.style.top)-5+"px";
			setTimeout("move3(tdiv)",50);
		}
		else {
			tdiv.style.top=scrollerheight;
			tdiv.innerHTML=tickers[tick_i];
			if (tick_i==tickers.length-1) {
				tick_i=0;
			}
			else {
				tick_i++;
			}
		}
	}

	function move4(whichdiv) {
		tdiv2=eval(whichdiv);
		if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5) {
			tdiv2.style.top=0+"px";
			setTimeout("move4(tdiv2)",3000);
			setTimeout("move3(first2_obj)",3000);
			return;
		}
		if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1) {
			tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px";
			setTimeout("move4(second2_obj)",50);
		}
		else {
			tdiv2.style.top=scrollerheight;
			tdiv2.innerHTML=tickers[tick_i];
			if (tick_i==tickers.length-1) {
				tick_i=0;
			}
			else {
				tick_i++;
			}
		}
	}

	function startscroll() {
		if (!document.layers) {
			if (tickers.length>2) {
				tick_i=2;
			}
			else {
				tick_i=0;
			}
			if (ie||dom) {
				first2_obj=ie? first2 : document.getElementById("first2");
				second2_obj=ie? second2 : document.getElementById("second2");
				move3(first2_obj);
				second2_obj.style.top=scrollerheight;
				second2_obj.style.visibility='visible';
			}
			else if (ns) {
				document.main.visibility='show';
				move1(document.main.document.first);
				document.main.document.second.top=parseInt(scrollerheight)+5;
				document.main.document.second.visibility='show';
			}
		}
	}

  function writeTickers() {
  	if (ie||dom) {
  		document.writeln('<div id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hidden;background-color:'+scrollerbgcolor+';top:'+scrollertop+';left:'+scrollerleft+';">');
  		document.writeln('	<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0px;top:0px">');
  		document.writeln('		<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:1px;">');
  		document.write(					tickers[0]);
  		document.writeln('		</div>');
  		document.writeln('		<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:0px;visibility:hidden">');
  		document.write(					tickers[dyndetermine=(tickers.length==1)? 0 : 1]);
  		document.writeln('		</div>');
  		document.writeln('	</div>');
  		document.writeln('</div>');
  	}
  }
