function over1(obj) {

	obj.style.backgroundColor="#86EF0D";
	obj.style.color="#000000";
	

	if(!document.all) {
		obj.style.cursor = "pointer";
	} else {
		obj.style.cursor = "hand";
	}

}

function out1(obj) {
	obj.style.backgroundColor="";
	obj.style.color="#FFFFFF";
}

function over2(obj) {

	obj.style.backgroundImage="url(../img/backgrounds/menubutton_1.gif)";

	if(!document.all) {
		obj.style.cursor = "pointer";
	} else {
		obj.style.cursor = "hand";
	}
}

function out2(obj) {
	obj.style.backgroundImage="";
}

function over3(obj) {

	obj.style.backgroundColor="#E5EEEB";

	if(!document.all) {
		obj.style.cursor = "pointer";
	} else {
		obj.style.cursor = "hand";
	}

}

function out3(obj) {
	obj.style.backgroundColor="";

}

function randInt(max) {
	var randNum = Math.random()
	for (var i = 0; i <= max - 1; i++) {
		if (randNum >= i / max && randNum < (i+1) / max) {
			return i;
		}
	}
}


var curr = "";
var i=-1;	// current letter being typed
var cnt=randInt(newslist.length);

// news ticker function
function newsticker()
{
	// next character of current item
	if (i < newslist[cnt][0].length - 1)
	{
		i++;
		temp1 = newslist[cnt][0];	
		temp1 = temp1.split('');	
  		curr = curr+temp1[i];
		temp2 = newslist[cnt][1];	
  		if (temp2.length>1) {
			mtxt.innerHTML = "<a href='"+temp2+"'><font color='#FFFFFF'>"+curr+"</font></a>";
		} else {
			mtxt.innerHTML = "<font color='#FFFFFF'>"+curr+"</font>";
		}
  		setTimeout('newsticker()',20)
		return;
	}

	// new item
	i = -1; curr = "";
	if (cnt<newslist.length-1)
		cnt++;
	else
		cnt=0;
	setTimeout('newsticker()',6000)

}
