var SRL_DELAY=4000;
var SRL_WIDTH='208px';
var SRL_HEIGHT='125px';

// Hanseboot-Daten
var HB_DATE="29.10.- 06.11.2005"; // Termin Hanseboot
var HB_HREF='http://www.hamburg-messe.de/hanseboot/bo_de/start_main.php';// URL

var n=0;		//Datenfeld-Element
var dt=new Date;
var m=dt.getMonth();
var y=(dt.getYear()%100)+2000 // Firefox-Bug beheben (v1.07)
var messages=new Array();


messages[n++]='<br>Wir sind Service Station für<br><br><b>EBERSPÄCHER</b><br><br>Spezialist für Heizung und<br> Klima an Bord';
messages[n++]='<br>Neue <a class=k href="../tuckerboote/index.htm">Tuckerboote</a><br><br> in verschiedenen Größen lieferbar';
messages[n++]='<br>Wir sind Vertragspartner Nord<br>für<br><a class=k href="../pr/perkins/index.htm">PERKINS</a> Marine Diesel';

var iCur=(messages.length>2)?2:0;
var divA;
var divB;
var sspeed=2;

function moveA(){doMove(divA,"moveA()");}
function moveB(){doMove(divB,"moveB()");}

function doMove(div,sFunc)
{
	var os=div.style;
	var i=parseInt(os.top);

	if (i>0 && i<=5)
	{
		os.top="0px";
		setTimeout("moveA()",SRL_DELAY);
		setTimeout("moveB()",SRL_DELAY);
		return;
	}

	if (i >= div.offsetHeight*-1)
	{
		os.top= i-sspeed+"px";
		setTimeout(sFunc,30);
	}
	else
	{
		os.top=SRL_HEIGHT;
		div.innerHTML=messages[iCur];
		if (++iCur == messages.length) iCur=0;
	}
}

function startscroll()
{
	divA= document.getElementById("areaA");
	divB= document.getElementById("areaB");
	moveA();
	divB.style.top=SRL_HEIGHT;
	divB.style.visibility="visible";
}

function writeMsgScroller()
{
	if (document.getElementById)
	{
		document.write('<div style="position:relative;width:'+SRL_WIDTH+';height:'+SRL_HEIGHT
		+';overflow:hidden;">');
		document.write('<div style="position:absolute;width:'+SRL_WIDTH+';height:'+SRL_HEIGHT
		+';clip:rect(0 '+SRL_WIDTH+' '+SRL_HEIGHT+' 0);left:0px;top:0px;">');
		document.write('<div  class="scroll" id="areaA" style="position:absolute;width:'+SRL_WIDTH
		+';left:0px;top:1px;" onmouseover="sspeed=0;" onmouseout="sspeed=3;">');
		document.write(messages[0]);
		document.write('</div><div  class="scroll" id="areaB" style="position:absolute;width:'+SRL_WIDTH
		+';left:0px;top:0px;visibility:hidden;" onmouseover="sspeed=0;" onmouseout="sspeed=3;">');
		document.write(messages[(messages.length==1)? 0 : 1]+'</div></div></div>');
	}

	if (window.addEventListener)
		window.addEventListener("load", startscroll, false);
	else if (window.attachEvent)
		window.attachEvent("onload", startscroll);
	else if (document.getElementById)
		window.onload=startscroll;
}
