/**************************************
* http://vertical-scroller.vbarsan.com/
*    This notice may not be removed 
**************************************/

//-- Begin Scroller's Parameters and messages -->
//scroller's width
var swidth=100;

//scroller's height
var sheight=78;


//scroller's speed 
var sspeed=1;
var restart=sspeed;
var rspeed=sspeed;

//scroller's pause 
var spause=0;

//scroller's background
var sbcolor="";

//messages: set your own; use as many as you'd like; set up Hyperlinks to
//URLs as you normally do: <a target=... href="... URL ...">..message..</a>;
//var singletext=new Array();
//singletext[0]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td height="80px" valign="middle"><table align="center"><tr><td><img src="http://vbarsan.com/homer.gif" width="18px" height="10px" alt="Vertical Scroller"></td><td><A class=tabb target="_self" href="http://vertical-scroller.vbarsan.com/">Dhtml Vertical Scroller Javascript 7.0</A></td><td><img src="http://vbarsan.com/homel.gif" width="18px" height="10px" alt="Vertical Scroller"></td></tr></table><div class=tanc>Multiple Messages may scroll & pause along 2 patterns:<br>- Singles: pause at top or may automatically be centered.<br>- One_or_More-up-to-area-size: Messages go equidistant,<br>  each&every message pausing when reaches top edge.</div></td></tr></table>';
//singletext[1]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td height="80px" valign="middle"><table align="center"><tr><td><img src="http://vbarsan.com/homer.gif" width="18px" height="10px" alt="Horizontal Scroller"></td><td align="center"><A class=tabb target="_self" href="http://news-scroller.vbarsan.com/">Dhtml Horizontal Scroller Javascript 7.0</A></td><td><img src="http://vbarsan.com/homel.gif" width="18px" height="10px" alt="Horizontal Scroller"></td></tr></table><div class=tanc>Multiple Messages may scroll & pause along 2 patterns:<br>- Singles: pause at left or centered depending upon CSS.<br>- One_or_More-up-to-area-size: Messages go equidistant,<br>  each&every message pausing when reaches left edge.</div></td></tr></table>';
//singletext[2]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td height="80px" valign="middle"><table align="center"><tr><td><img src="http://vbarsan.com/homer.gif" width="18px" height="10px" alt="Typewriter Vertical Text Scroller"></td><td><A class=tabb target="_self" href="http://news-ticker.vbarsan.com/">Dhtml Typewriter Vertical Text Scroller 5.0</A></td><td><img src="http://vbarsan.com/homel.gif" width="18px" height="10px" alt="Typewriter Vertical Text Scroller"></td></tr></table><div class=tanc>Typewriter ticker has 2 portions: typewriting & scrolling<br>with first one at the bottom - Scrolling portion is optional.<br />Typewriting portion may hold as many rows as desired.<br />Scrolling goes up with the size of actual typewritten text.</div></td></tr></table>';
//singletext[3]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td height="80px" valign="middle"><div class=tan><b>Javascript Vertical Scroller v3.5</b><br>Once a message left, next one comes in.<br>Adjustable: Size, Speed, Pause and Background.<br>Speed may be adjusted on the fly as well!<br>Runs any number of Messages/Images.</div></td></tr></table>';
//singletext[4]='<div class=tan><b>On Windows/Linux:</b><br>ie4+ firefox1+ ns6+ opera7+ ns4+.<br><br><b>On Mac OS X</b>:<br>Safari, ie5+ firefox1+ opera7+.<br><br>Any message may be <b><i>as large as desired.</i></B><br>===<br><br><font color="olive">Any wider row will automatically be adjusted into as many rows as to fit the width you set for the scrolling area.</font><br><br>===<br>One may use <b><i>any basic HTML code.</i><br><br>===</B></div>';
//singletext[...]='...';
//-- end Parameters and message -->

//-- begin: Scroller's Algorithm -->
var ii=0;
function goup(){if(sspeed!=rspeed*16){sspeed=sspeed*2;restart=sspeed;}}

function start(){
	if(document.getElementById){
		ns6div=document.getElementById('iens6div');
		ns6div.style.top=sheight+"px";
		sizeup=ns6div.offsetHeight;
		ns6scroll();
	}else 
		if(document.layers){
			ns4layer=document.ns4div.document.ns4div1;
			ns4layer.top=sheight;
			ns4layer.document.close();
			sizeup=ns4layer.document.height;
			ns4scroll();
		}else
			if(document.all){
				iediv=iens6div;
				iediv.style.pixelTop=sheight+"px";
				sizeup=iediv.offsetHeight;
				iescroll();
			}
}

function iescroll(){
	if(iediv.style.pixelTop>0&&iediv.style.pixelTop<=sspeed){
		iediv.style.pixelTop=0;
		setTimeout("iescroll()",spause);
	}else 
		if(iediv.style.pixelTop>=sizeup*-1){
			iediv.style.pixelTop-=sspeed+"px";
			setTimeout("iescroll()",100);
		}else{
			ii++;
			iediv.style.pixelTop=sheight+"px";
			sizeup=iediv.offsetHeight;
			iescroll();
		}
}

function ns4scroll(){
	if(ns4layer.top>0&&ns4layer.top<=sspeed){
		ns4layer.top=0;
		setTimeout("ns4scroll()",spause);
	}else 
		if(ns4layer.top>=sizeup*-1){
			ns4layer.top-=sspeed;
			setTimeout("ns4scroll()",100);
		}else{
			ii++;
			ns4layer.top=sheight;
			ns4layer.document.close();
			sizeup=ns4layer.document.height;
			ns4scroll();
		}
}

function ns6scroll(){
	if(parseInt(ns6div.style.top)>0&&parseInt(ns6div.style.top)<=sspeed){
		ns6div.style.top=0;
		setTimeout("ns6scroll()",spause);
	}else 
		if(parseInt(ns6div.style.top)>=sizeup*-1){
			ns6div.style.top=parseInt(ns6div.style.top)-sspeed+"px";
			setTimeout("ns6scroll()",100);
		}else{
			ii++;
			ns6div.style.top=sheight+"px";
			sizeup=ns6div.offsetHeight;
			ns6scroll();
		}
}
//-- end Algorithm -->