// JavaScript Document
var scrolling=1;
newsScrollIni = function() {
	var wait=4500;
	var loop=null;
	var newsEls = document.getElementById("newsr").getElementsByTagName("div");
	for (var i=0, j=0; i<newsEls.length; i++) {
		if (newsEls[i].className == "news" || newsEls[i].className == "news act") {
			var scr=document.createElement('a');
			scr.href='javascript:;';
			scr.onclick=function(){
				newsScroll(this.id);
				};
			scr.id='scroll'+i;
			if (newsEls[i].className == "news act") {
				scr.className='scract';
			}
			var oImg=document.createElement("img");
			oImg.src='clear.gif';
			oImg.alt='News scrollen';
			oImg.height='13';
			oImg.width='13';
			scr.appendChild(oImg);
			document.getElementById("scroll").appendChild(scr);
		}
	}
	loop=setInterval('newsScroll(0)',wait);
}

newsScroll = function(newsEl) {
	var newsEls = document.getElementById("newsr").getElementsByTagName("div");
	if (newsEl == 0 && scrolling == 1) {
		var found = 0;
		var done = 0;
		for (var i=0; i<newsEls.length; i++) {
			if (found == 1 && newsEls[i].className == "news") {
				newsEls[i].className="news act";
				document.getElementById("scroll"+i).className='scract';
				done = 1;
				break;
			}
			if (newsEls[i].className == "news act") {
				newsEls[i].className="news";
				document.getElementById("scroll"+i).className='';
				found = 1;
			}
		}
		if (done == 0) {
			for (var i=0; i<newsEls.length; i++) {
				if (newsEls[i].className == "news") {
					newsEls[i].className="news act";
					document.getElementById("scroll"+i).className='scract';
					break;
				}
			}
		}
	}
	else {
		scrolling = 0;
		index=newsEl.replace(new RegExp("scroll"), "");
		for (var i=0; i<newsEls.length; i++) {
			if (newsEls[i].className == "news act") {
				newsEls[i].className="news";
				newsEls[index].className="news act";
				document.getElementById("scroll"+i).className='';
				document.getElementById(newsEl).className='scract';
			}
		}
	}
}

aufklappen = function() {
	var obj= document.getElementById("men2");
	obj.style.overflow = "visible";
	obj.style.height = "auto";
}

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

