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);


var aImgs = null;
var aLink = null;
var aImg = null;
var theInt = null;
var curclicked = 0;
var speed = 1000;

function scrollNews(s){
	if($("#ntext")){
		speed = s;
		$("#news a").bind('mouseover',function(){
			curclicked = $("#news a").index(this);
			changePic();
		});
		changePic();
	}
}
function changePic(){
	$("#news a").removeClass("selected");
	$("#news a").eq(curclicked).addClass("selected");
	$("#ntext .item").css("display","none");
	$("#ntext .item").eq(curclicked).css("display","");
	runInt(speed);
}
function runInt(s){
	clearInterval(theInt);
	theInt = setInterval(function(){
		curclicked++;
		if(curclicked>=$("#news a").length) curclicked = 0;
		changePic();
	}, s);
}
