
var theight          = 24;		// Höhe des Tickers (in Pixel)	
var twidth           = 600;		// Breite des Tickers (in Pixel)	
var twidthh          = 75;		// Breite der Titelspalte (in Pixel)	
var transtime        = 4000;		// Einblendungszeit jeder Veranstaltung (in Millisekunden)
var borderw          = 1;		// Breite des Rahmens (in Pixel)			
var pad_top          = 4;		// Innenabstand oben (Details; in Pixel)	
var pad_top2         = 4;		// Innenabstand oben (Titel; in Pixel)	
var pad_left         = 8;		// Innenabstand links (Details; in Pixel)			
var pad_left2        = 0;		// Innenabstand links (Titel; in Pixel)	
var text_alignh      = 'left';	// Ausrichtung (Titel)	
var text_alignt      = 'left';	// Ausrichtung (Details)	
var text_decorh      = 'none';	// Dekoration (Titel)	
var text_decort      = 'none';	// Dekoration (Details)					
var fstyleh          = 'normal';	// Stil (Titel)	
var fstylet          = 'normal';	// Stil (Details)	
var fweighth         = 'normal';	// Schriftgewicht (Titel)	
var fweightt         = 'normal';	// Schriftgewicht (Details)	
var fontn            = 'Arial';	// Schriftart	
var bgcol            = '#FFFFFF';	// Hintergrundfarbe (Details)
var bgcolh           = '#FFFFFF';	// Hintergrundfarbe (Titel)	
var txtcol           = '#666666';	// Textfarbe (Details)	
var txthicol         = '#666666';	// Textfarbe beim Überfahren mit der Maus
var txtcolh          = '#666666';	// Textfarbe (Titel)
var border_color_str = '#FFFFFF';	// Rahmenfarbe
var text = new Array();
var header = new Array();
var linka = new Array();text[0]   = "Eis-Festival in Geilo, Geilo";

			  header[0] = "04.02.2012";

			  linka[0]  = "http://www.schwedisch-translator.de/kalender/kalender.php?ecAction=details&ecEventId=58";text[1]   = "Aurora Sky Station f&#252;r Besucher ge&#246;ffnet, Abisko";

			  header[1] = "04.02.2012";

			  linka[1]  = "http://www.schwedisch-translator.de/kalender/kalender.php?ecAction=details&ecEventId=486";text[2]   = "G&#246;teborg Film Festival, Göteborg";

			  header[2] = "04.02.2012";

			  linka[2]  = "http://www.schwedisch-translator.de/kalender/kalender.php?ecAction=details&ecEventId=648";text[3]   = "Bootsmesse in G&#246;teborg, Göteborg";

			  header[3] = "04.02.2012";

			  linka[3]  = "http://www.schwedisch-translator.de/kalender/kalender.php?ecAction=details&ecEventId=667";text[4]   = "Samischer Wintermarkt in Jokkmokk, Jokkmokk";

			  header[4] = "04.02.2012";

			  linka[4]  = "http://www.schwedisch-translator.de/kalender/kalender.php?ecAction=details&ecEventId=760";text[5]   = "Vindel&#228;lvsdraget - Schlittenhunderennen in Nordschweden, Vindeln";

			  header[5] = "04.02.2012";

			  linka[5]  = "http://www.schwedisch-translator.de/kalender/kalender.php?ecAction=details&ecEventId=801";text[6]   = "Nordlys-Festival, Tromsø";

			  header[6] = "04.02.2012";

			  linka[6]  = "http://www.schwedisch-translator.de/kalender/kalender.php?ecAction=details&ecEventId=1275";text[7]   = "Svenska Intensiv 1, Hamburg";

			  header[7] = "04.02.2012";

			  linka[7]  = "http://www.schwedisch-translator.de/kalender/kalender.php?ecAction=details&ecEventId=727";
var nstheight = 0;
var nst2width = 0;
var borderd   = 'border:solid ' + borderw + 'px ' + border_color_str + ';';	

var targa = new Array();
for (i = 0; i < header.length; ++i)
	targa[i] = '_blank';
	
var divtext = new Array();	
var divh = new Array();	
var objst = new Array();	
var objs = new Array();	
var objsh = new Array();
	
var IE4B = false;
var NS4B = false;
var NS6B = false;
var OP5B = false;

NS4B = ((document.layers) ? true : false);	
IE4B = ((document.all) ? true : false);	
NS6B = ((document.getElementById) ? true : false);	
uagent = window.navigator.userAgent.toLowerCase();
IE5 = false;
IE4 = false;
IEold = false;
IE5 = (uagent.indexOf('msie 5.0') != -1) ? true : false;
IE4 = (uagent.indexOf('msie 4') != -1) ? true : false;
if (IE5 || IE4)
	IEold = true;

OP5B = (uagent.indexOf('opera') != -1) ? true : false;
if (OP5B)
{
	IE4B = false;
	NS6B = true;
}	
if (NS6B)
	IE4B = false;

var ns6obj = null;	
var str2 = '';	
var msgw, msgh;	
var mc = 0;	
var say = 0, onceki = 0;	
msgw = twidth - twidthh;	
mc = text.length;	
onceki = mc - 1;	
strpos = '';
strvis = '';
strpadding = '',
strpadding2 = '';
nsdiv = '';	
nstheight = theight - 2 * borderw;	
nst2width = twidth - 2 * borderw;		
pad_top = pad_top - borderw;	
if (pad_top < 0)
	pad_top = 0;

pad_top2 = pad_top2 - borderw;	
if (pad_top2 < 0)
	pad_top2 = 0;

if (IE4B)
{
	strpos = 'position:absolute;';	
	strvis = '';	
	strpadding = 'padding-top:' + pad_top + 'px; padding-left:' + pad_left + 'px;';	
	strpadding2 = 'padding-top:' + pad_top2 + 'px; padding-left:' + pad_left2 + 'px;';
}
else if (NS6B)
{	
	strpos = 'position:absolute;';	
	strvis =' visibility:hidden;';	
	strpadding = 'padding-top:' + pad_top + 'px; padding-left:' + pad_left + 'px;';	
	strpadding2 = 'padding-top:' + pad_top2 + 'px; padding-left:' + pad_left2 + 'px;';
}

for(i = 0; i < mc; ++i)
{
	if (IE4B)
	{
		divtext[i] = '<div id=d' + i + ' onmouseover="mdivmo(' + i + ')" onmouseout="restime(' + i + ')" onclick="butclick(' + i + ')"'+' style="' + strpos + ' ' + strvis + ' background:' + bgcol + '; color: ' + txtcol + '; ' + strpadding + ' left:' + twidthh + 'px; top:0; width:' + twidth + 'px; height:' + theight + 'px; font-family:' + fontn + '; font-size:8pt; font-style:' + fstylet + '; font-weight:' + fweightt + '; margin:0px; text-decoration:' + text_decort + '; overflow-y:hidden; text-align:' + text_alignt + ';cursor:default;">';			
		divh[i] = '<div id=dh' + i + ' style="' + strpos + ' ' + strvis + ' background:' + bgcolh + '; color:' + txtcolh + '; ' + strpadding2 + ' left:0; top:0; width:' + twidthh + 'px; height:' + theight + 'px; font-family:' + fontn + '; font-size:9pt; font-style:' + fstyleh + '; font-weight:' + fweighth + '; text-decoration:' + text_decorh + '; margin:0px; overflow:hidden; text-align:' + text_alignh + '; cursor:default;">';		
	} 
	else if (NS6B)
	{
		divtext[i] = '<div id=d' + i + ' onmouseover="mdivmo(' + i + ')" onmouseout="restime(' + i + ')" onclick="butclick(' + i + ')"'+' style="' + strpos + ' ' + strvis + ' background:' + bgcol + '; color:' + txtcol + '; ' + strpadding + ' left:' + twidthh + 'px; top:0; width:' + twidth + 'px; height:' + nstheight + 'px; font-family:' + fontn + '; font-size:8pt; font-style:' + fstylet + '; font-weight:' + fweightt + '; text-decoration:' + text_decort + '; margin:0px; overflow:hidden; text-align:' + text_alignt + '; cursor:default;">';			
		divh[i] = '<div id=dh' + i + ' style="' + strpos + ' ' + strvis + ' background:' + bgcolh + '; color:' + txtcolh + '; ' + strpadding2 + ' left:0; top:0; width:' + twidthh + 'px; height:' + nstheight + 'px; font-family:' + fontn + '; font-size:9pt; font-style:' + fstyleh + '; font-weight: ' + fweighth + '; text-decoration:' + text_decorh + '; margin:0px; overflow:hidden; text-align:' + text_alignh + '; cursor:default;">';		
	}	
}

if(NS6B)
{	
	str2 = '';
	for(i = 0; i < mc; ++i)
	{
		str2 += '<div id=op' + i + ' style="position:absolute; overflow:hidden; ' + strvis + ' left:0; top:0; width:' + nst2width + 'px; height:' + nstheight + 'px; ' + strvis + borderd + '">';
		str2 += divh[i] + header[i] + '</div>' + divtext[i] + text[i] + '</div>';
		str2 += '</div>';
	}
}

function mdivmo(gnum)
{
	if (IE4B)
	{
		if (linka[gnum] != '')
		{
			objd = eval('d' + gnum);
			objd.style.color = txthicol;
			objd.style.cursor = 'hand';	
			window.status = linka[gnum];
		}
	}
	else if (NS6B)
	{
		if (linka[gnum] != '')
		{
			objs[onceki].style.color = txthicol;
			objs[onceki].style.cursor = 'pointer';
			window.status = linka[gnum];
		}
	}
}

function restime(gnum2)
{
	if (IE4B)
	{
		objd = eval('d' + gnum2);
		objd.style.color = txtcol;
		window.status = '';
	}
	else if (NS6B)
	{
		objs[onceki].style.color = txtcol;
		window.status = '';
	}
}

function butclick(gnum3)
{
	if( targa[gnum3] == '')
		targa[gnum3] = '_self';

	if (IE4B)
		window.open(linka[gnum3], targa[gnum3]);
	else if(NS6B)
		window.open(linka[gnum3], targa[gnum3]);
}

function dotrans()
{
	if (IE4B)
	{
		spage.innerHTML = divh[say] + header[say] + '</div>' + divtext[say] + text[say] + '</div>';
		setTimeout('dotrans()', transtime);
	} 
	else if (NS6B)
	{
		objsh[say].style.visibility = 'visible';
		objsh[onceki].style.visibility = 'hidden';
		objs[say].style.color = txtcol;
		objs[say].style.visibility = 'visible';
		objs[onceki].style.visibility = 'hidden';
		objst[say].style.visibility = 'visible';
		objst[onceki].style.visibility = 'hidden';
		onceki = say;
		setTimeout('dotrans()', transtime);
	}
	++say;
	if (say >= mc)
		say = 0;
}

function dofirst()
{
	var i = 0;		
	var str = '';		
	for(i = 0; i < mc; ++i)
	{			
		str = 'd' + i;
		objs[i] = document.getElementById(str);
		objs[i].style.left = twidthh + 'px';
		objs[i].style.top = '0px';
		objs[i].style.visibility = 'hidden';
		str = 'dh' + i;
		objsh[i]=document.getElementById(str);
		objsh[i].style.left = '0px';
		objsh[i].style.top = '0px';
		objsh[i].style.visibility = 'hidden';
		str = 'op' + i;
		objst[i] = document.getElementById(str);
		objst[i].style.left = '0px';
		objst[i].style.top = '0px';
		objst[i].style.visibility = 'hidden';
	}
	objs[0].style.visibility = 'visible';
	objsh[0].style.visibility = 'visible';
	objst[0].style.visibility = 'visible';
	dotrans();
}

function initte()
{
	say = 0;
	if(IE4B)
	{					
		spage.style.borderStyle = 'solid';			
		spage.style.borderWidth = borderw + 'px';			
		spage.style.borderColor = border_color_str;
		spage.style.width = twidth + 'px';
		spage.style.height = theight + 'px';			
		spage.innerHTML = divh[say] + header[say] + '</div>' + divtext[0] + text[0] + '</div>';			
		++say;			
		setTimeout('dotrans()', transtime);		
	} 
	else if(NS6B)
	{			
		ns6obj = document.getElementById('spage');
		ns6obj.style.width = twidth + 'px';
		ns6obj.style.height = theight + 'px';
		ns6obj.innerHTML = str2;
		setTimeout('dofirst()', 0);		
	}
}

window.onload = initte;

