/*******************************
*  http://geocities.com/vbarsan
* This notice may not be removed 
********************************/

//-- Begin Scroller's Parameters and messages -->
//scroller's width & height
var swidth=135;
var sheight=100;

//scroller's speed 
var sspeed=1;
var restart=sspeed;
var rspeed=sspeed;

//scroller's background
sbcolor="none";

//messages: change to 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]='<p class="tituloflash">Títol Notícia 1</p><p>Aquí aniria la notícia 1 que no pot ser molt llarga perquè si no el Flash no té massa sentit.</p>';
// singletext[1]='<p class="tituloflash">Títol Notícia 2</p><p>Aquí aniria la notícia 2 que no pot ser molt llarga perquè si no el Flash no té massa sentit.</p>';
//singletext[0]='<div align="center" class=tabb><a target=anew class=tabb href="http://geocities.com/vbarsan/"><u>Multiple Message Vertical SCROLLER v6.0 + <br>Multiple Message Belt CONVEYER v6.0 + <br>Multiple Message TICKER v4.0</u></a></div>';
//singletext[1]='<div align="center" class=tann>Multiple Message Scroller V3.0.</div><div align="center" class=tan>After one message left, the next one comes in.<br>Adjust: Size, Speed and Background.<br>Any message may use <b><u>Hyperlinks</u></b></div>';
//singletext[2]='<div align="center" class=tan><b>Cross-Browser:</b></div><div align="center" class=tann>IE4+ OPERA7+ NS4+ NS6+ MOZILLA</div>';
//singletext[3]='<div align="center" class=tan>Any message may be <b><i>as large as desired.</i></B><br>===<br><br>...<br><br>===<br>One may use <b><i>all the basic HTML code.</i></B></div>';
//singletext[...]='...';
//-- end Parameters and message -->

//-- begin: Scroller's Algorithm -->
if (singletext.length>1)ii=1;
else ii=0;
	
function goup(){
	if(sspeed!=rspeed*8){
		sspeed=sspeed*2;
		restart=sspeed;
	}
}
function godown(){
	if(sspeed>rspeed){
		sspeed=sspeed/2;
		restart=sspeed;
	}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function start(){
	if (document.all){
		var objScroll = MM_findObj('iens6div',document);
		if (!!objScroll){
			objScroll.style.top=sheight;
			iescroll(objScroll);
		}
	}
	else if (document.layers){
		document.ns4div.document.ns4div1.top=sheight;
		document.ns4div.document.ns4div1.visibility='show';
		ns4scroll(document.ns4div.document.ns4div1);
		}
	else if (document.getElementById){
		var objScroll = document.getElementById('iens6div');
		if (!!objScroll){
			objScroll.style.top=sheight;
			ns6scroll(objScroll);
		}
	}
}
function iescroll(whichdiv){
	iediv=eval(whichdiv);
	sizeup=iediv.offsetHeight;
	if(iediv.style.pixelTop>0&&iediv.style.pixelTop<=sspeed){
		iediv.style.pixelTop=0;
	}if(
		iediv.style.pixelTop>=sizeup*-1){
		iediv.style.pixelTop-=sspeed;
	}else{
		iediv.style.pixelTop=sheight;
		iediv.innerHTML=singletext[ii];
		if(ii==singletext.length-1)ii=0;
		else ii++;
	}
	setTimeout("iescroll(iediv)",100);
	}
function ns4scroll(whichlayer){
	ns4layer=eval(whichlayer);
	sizeup=ns4layer.document.height;
	if(ns4layer.top>0&&ns4layer.top<=sspeed){
		ns4layer.top=0;
	}if (ns4layer.top>=sizeup*-1){
		ns4layer.top-=sspeed;
	}else{
		ns4layer.top=sheight;
	ns4layer.document.write(singletext[ii]);
	ns4layer.document.close();
	if(ii==singletext.length-1)ii=0;
	else ii++;
	}
	setTimeout("ns4scroll(ns4layer)",100);
	}
function ns6scroll(whichdiv){
	ns6div=eval(whichdiv);
	sizeup=ns6div.offsetHeight;
	if(parseInt(ns6div.style.top)>0&&parseInt(ns6div.style.top)<=sspeed){
		ns6div.style.top='0px';
	}if (parseInt(ns6div.style.top)>=sizeup*-1){ns6div.style.top=(parseInt(
		ns6div.style.top)-sspeed)+'px';
	}else{
		ns6div.style.top=parseInt(sheight)+'px';
		ns6div.innerHTML=singletext[ii];
		if(ii==singletext.length-1)ii=0;
		else ii++;
	}
	setTimeout("ns6scroll(ns6div)",100);
	}
//-- end Algorithm -->
