/* javascript file mq 'bigis-schatzkiste' / author: epaw / last modified: 10-02-2005 */

var d=document,
bid=0; with(navigator.userAgent){ if(search('MSIE')>0)bid=1; if(search('Opera')>0)bid=2;
if(search('Gecko')>0)bid=3; if(search('Netscape')>0)bid=4; if(search('Firefox')>0)bid=5; }

// Marquee Variablen
var scrollAmount=1, scrolldelay=50, left=50;
var width=0,pos=left,step=-scrollAmount;

// Cross Browser Marquee
function mrqini(){ mqe=d.getElementById('mq');
	if(!width){
		for(var i=0;i<mqe.childNodes.length;i++){
			if(mqe.childNodes[i].tagName=='IMG')
				width+=mqe.childNodes[i].width+(bid==1?8:18); }
		width+=left+18; }
	mrq(); }
function mrq(){
	if(pos<=wdt()*.76-width)step=scrollAmount;
	if(pos>=left)step=-scrollAmount;
	mqe.style.left=(pos+=step)+'px';
	setTimeout('mrq()',scrolldelay); }

// Innere Fensterbreite
function wdt(){ if(window.innerWidth)return window.innerWidth;
	else if(d.body&&d.body.offsetWidth)return d.body.offsetWidth;
	else return 740; }
