// Ticker
ticker_width = "472px";
ticker_height = "18px";
ticker_speed = 2;
ss_marquee_pause_onhover = 1;
//host= location.hostname;
//if (host=="linux") {
	//pfad="http://linux/kunden/I-Z/tier_im_recht/www.tierschutz.org";
//}
//else {
	//pfad="http://www.tierschutz.org";
//}

// Inhalt
ticker_inhalt = '<nobr>'+document.getElementById("ticker").innerHTML+'</nobr>';

ticker_speed = (document.all) ? ticker_speed : Math.max(1, ticker_speed-1);
var copyspeed = ticker_speed;
var pausespeed = (ss_marquee_pause_onhover == 0) ? copyspeed : 0;
var iedom = document.all || document.getElementById;

// Temp div für die Textbreite
if (iedom) {
	document.write('<div id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+ticker_inhalt+'</div>');
}

// Textbreite : div TICKER
var actualwidth = '';

var cross_marquee, ns_marquee;

function populate() {
	// IE oder DOM Browser
	if (iedom) {
		cross_marquee = document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee;
		cross_marquee.style.left = parseInt(ticker_width)+8+"px";
		cross_marquee.innerHTML = ticker_inhalt;
		actualwidth = document.all ? temp.offsetWidth : document.getElementById("temp").offsetWidth;
	}
	// Netscape
	else if (document.layers) {
		ns_marquee=document.ns_marquee.document.ns_marquee2;
		ns_marquee.left=parseInt(ticker_width)+8;
		ns_marquee.document.write(ticker_inhalt);
		ns_marquee.document.close();
		actualwidth=ns_marquee.document.width;
	}
	// Speed
	lefttime = setInterval("scrollmarquee()", 20);
}
window.onload = populate;

function scrollmarquee() {
	// IE oder DOM BRowser
	if (iedom) {
		if (parseInt(cross_marquee.style.left) > (actualwidth*(-1)+8)) {
			cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed+"px";
		} else {
			cross_marquee.style.left=parseInt(ticker_width)+8+"px";
		}
	}
	// Netscape
	else if(document.layers) {
		if(ns_marquee.left > (actualwidth*(-1)+8)) {
			ns_marquee.left -= copyspeed;
		} else {
			ns_marquee.left=parseInt(ticker_width)+8;
		}
	}
}

// Ausgabe für alle Browser

if (iedom || document.layers) {
	with (document) {
	//document.write('<table border="0" cellspacing="0" cellpadding="0"><td>');
		// IE oder DOM Browser
		if (iedom) {
			write('<div style="position:relative;width:'+ticker_width+';height:'+ticker_height+';overflow:hidden">');
			write('<div style="position:absolute;width:'+ticker_width+';height:'+ticker_height+';padding:0px;" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=ticker_speed">');
			write('<div id="iemarquee" style="position:absolute;left:0px;top:2px"></div>');
			write('</div></div>');
		}
		// Netscape
		else if (document.layers) {
			write('<ilayer width='+ticker_width+' height='+ticker_height+' name="ns_marquee" bgColor='+ss_marquee_color_bg+'>');
			write('<layer name="ns_marquee2" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=ticker_speed"></layer>');
			write('</ilayer>');
		}
	//document.write('</td></table>')
	}
}