// JavaScript Document


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

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

//scroller's height
var sheight=120;


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

//scroller's pause 
var spause=2000; //2000;

var spause2=50; //2000;
//scroller's background
var sbcolor="#effebc";

//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="80" valign="middle"><div class=tanc><A class=tabb target="_self" href="http://vertical-scroller.vbarsan.com/">Vertical Scroller Javascript 7.0</A><br />Messages may scroll & pause along 2 different 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="80" valign="middle"><div class=tanc><A class=tabb target="_self" href="http://news-scroller.vbarsan.com/">Horizontal Scroller Javascript 7.0</A><br />Messages may scroll & pause along 2 different 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="80" valign="middle"><div class=tanc><A class=tabb target="_self" href="http://news-ticker.vbarsan.com/">Typewriter Vertical Text Scroller 5.0</A><br />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="80" 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,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>= message begins =<br />Any message may be <b><i>as large as desired.</i><br />On Windows/Linux:</b><br />ie4+ firefox1+ ns6+ opera7+ ns4+.<br /><b>On Mac OS X</b>: Safari, ie5+ firefox1+ opera7+.<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 />One may use <b><i>any basic HTML code.</i></b><br /><br />= message ends =</div>';*/


singletext[0]='<p>One tree can filter up to 60 pounds of pollutants from the air each year.<br><br></p>';
singletext[1]='<p>Every day American businesses generate enough paper to circle the earth 20 times! <br><br></p>';
singletext[2]='<p>Paper products make up the largest part (approx 40%) of our trash.<br><br></p>';
singletext[3]='<p>Americans use more than 67 million tons of paper per year, or about 580 pounds per person.<br><br></p>';
singletext[4]='<p>Each ton of recycled paper can save 17 trees, 380 gallons of oil, three cubic yards of landfill space, 4,000 kilowatts of energy and 7,000 gallons of water!!<br><br></p>';
singletext[5]='<p>Recycling a stack of newspapers just 3 feet high can save one tree!<br><br></p>';
singletext[6]='<p>Disposable diapers last centuries in landfills.  An average baby will go through 8,000 of them!<br><br></p>';
singletext[7]='<p>When you throw something ‘away’, it doesn’t go away!  Trash is either burned, buried, recycled or dumped into rivers, oceans, or roadside.<br><br></p>';
singletext[8]='<p>It takes a 15-year old tree to produce 700 grocery bags.<br><br></p>';
singletext[9]='<p>Recycling plastic saves twice as much energy as burning it in an incinerator.<br><br></p>';
singletext[10]='<p>Out of ever $10 spent buying things, $1 (10%) goes for packaging that is thrown away. Packaging represents about 65% of household trash.<br><br></p>';
singletext[11]='<p>McDonald\'s saves 68,000,000 pounds of packaging per year just by pumping soft drink syrup directly from the delivery truck into tanks in the restaurant, instead of shipping the syrup in cardboard boxes.<br><br></p>';
singletext[12]='<p>A typical family consumes 182 gallons of pop, 29 gallons of juice, 104 gallons of milk, and 26 gallons of bottled water a year. That\'s a lot of containers -- make sure they\'re recycled!<br><br></p>';
singletext[13]='<p>Every month, we throw out enough glass bottles and jars to fill up a giant skyscraper. All of these jars are recyclable!<br><br></p>';
singletext[14]='<p>Recycling one aluminum can saves enough energy to run a TV for three hours -- or the equivalent of a half a gallon of gasoline.<br><br></p>';
singletext[15]='<p>Once an aluminum can is recycled, it can be part of a new can within six weeks  There is no limit to the amount of times an aluminum can can be recycled.<br><br></p>';



//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;ns6div.innerHTML=singletext[0];sizeup=ns6div.offsetHeight;ns6scroll();}
else 
if(document.layers){ns4layer=document.ns4div.document.ns4div1;ns4layer.top=sheight;ns4layer.document.write(singletext[0]);ns4layer.document.close();sizeup=ns4layer.document.height;ns4scroll();}
else 
if(document.all){iediv=iens6div;iediv.style.pixelTop=sheight;iediv.innerHTML=singletext[0];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;setTimeout("iescroll()",spause2);}
	else
	{
			if(ii==singletext.length-1)ii=0;
			else ii++;iediv.style.pixelTop=sheight;iediv.innerHTML=singletext[ii];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()",spause2);}
		else
		{
				if(ii==singletext.length-1)ii=0;
				else ii++;
				ns4layer.top=sheight;ns4layer.document.write(singletext[ii]);
				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;setTimeout("ns6scroll()",spause2);}
			else{if(ii==singletext.length-1)ii=0;else ii++;
				ns6div.style.top=sheight;ns6div.innerHTML=singletext[ii];sizeup=ns6div.offsetHeight;ns6scroll();}}
//-- end Algorithm -->