function changeName(x)  {
        data=spname[x];
		setCont("id","nameDiv","null",data);
}

function scroller() {
	    if (DOM || NS) {scr = (self.pageYOffset - startOffset)}
		if (DOM && MS) {scr = (document.body.scrollTop - startOffset)}

		percent = speed * (scr - lastscrollY);
		if(percent > 0) percent = Math.ceil(percent);
		else percent = Math.floor(percent);

		stalkery += percent;
		lastscrollY += percent;
		
		if ((stalkery) < 0) {
			percent = Math.floor(speed * stalkery);
			stalkery = percent;
			lastscrollY = percent;
		}
		getElem("id","scrollerDiv",null).style.top = stalkery;
}

function Fensterweite()
{
 if (window.innerWidth) return window.innerWidth;
 else if (document.body && document.body.offsetWidth) return document.body.offsetWidth;
 else return 0;
}

function Fensterhoehe()
{
 if (window.innerHeight) return window.innerHeight;
 else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
 else return 0;
}


////////////////////////
// AUTOMATISCHE LINKS //
////////////////////////

function make_link_image(imgID,path,filename,ending) {
	eval(imgID+'_active = new Image();');
	eval(imgID+'_active.src = "'+path+'/'+filename+'_active.'+ending+'";');
	eval(imgID+'_inactive = new Image();');
	eval(imgID+'_inactive.src = "'+path+'/'+filename+'_inactive.'+ending+'";');
}

function but_roll(imgID,over) {
	if (over==true) {
		document[imgID].src = eval(imgID+'_active.src');
	} else {
		document[imgID].src = eval(imgID+'_inactive.src');
	}
}


/////////////
// NEWSBAR //
/////////////

function Stop(xpos) {
	if (!busy) {
		busy = true;
		stopPos = 10-xpos;
		stopped = true;
		setTimeout('busy=false',1500);
	}
	setTimeout('Run()',4000);
}

function Run() {
	if (!busy) stopped = false;
}

function scrollerNewsbar() {
	percent = speed * (movetoPos - lastPos);
	if (percent > 0) {percent = Math.ceil(percent);}
	else {percent = Math.floor(percent);}

	newPos += percent;
	lastPos += percent;

	getElem("id","txtContainerDiv",null).style.left = newPos;
}


function animateNewsbar() {
	if ((movetoPos <= -(TextWidth+50)) && !stopped) {
		lastPos = NewsWindowWidth+10;
		newPos = NewsWindowWidth+10;
		movetoPos = NewsWindowWidth+10;
	}

	if (stopped) {movetoPos -= Math.ceil(3-0.2*(stopPos-lastPos));} 
	if (!stopped) {movetoPos -=ScrollSpeed;}
	
	scrollerNewsbar();
	setTimeout('animateNewsbar()',20);
}

	
