
/* javascript, 2004 orange8 interactive ag */

var hTimOut;
var shDivs = new Array();

function regDiv(name)
{
	shDivs.push(name);
}

function showDiv(name)
{
	hideAllDivs();
	window.clearTimeout(hTimOut);
	hTimOut = window.setTimeout('hideAllDivs()', 3000);
	if(document.getElementById(name))
		document.getElementById(name).style.visibility = 'visible';
}

function hideDiv(name)
{
	if(document.getElementById(name))
		document.getElementById(name).style.visibility = 'hidden';	
}

function hideAllDivs()
{
	for(i=0; i<=shDivs.length-1; i++)
	{
		var name = shDivs[i];
		if(document.getElementById(name))
			document.getElementById(name).style.visibility = 'hidden';
	}
}

function showBlock(name)
{
	if(document.getElementById(name))
		document.getElementById(name).style.display = 'block';
}

function hideBlock(name)
{
	if(document.getElementById(name))
		document.getElementById(name).style.display = 'none';
}

function handleThumbs(nameToShow,nameToHide)
{
	if(document.getElementById(nameToShow))
		document.getElementById(nameToShow).style.display = 'block';
	if(document.getElementById(nameToHide))
		document.getElementById(nameToHide).style.display = 'none';
}

function roll_over(img_name, img_src) {
	document.getElementById(img_name).src = img_src;
}

function changebg(id, bg)
{
	document.getElementById(id).style.backgroundColor = bg;
}

function changefontcolor(id, fontcolor)
{
	document.getElementById(id).style.color = fontcolor;
}

function setTextDecoration(id, option)
{
	document.getElementById(id).style.textDecoration = option;
}

function changeBgImg(id, bgImg)
{
	document.getElementById(id).style.backgroundImage = "url(/images/layout/leftnav/"+bgImg+")";
	document.getElementById(id).style.backgroundRepeat = "no-repeat";
	document.getElementById(id).style.backgroundPosition = "top left";
}

function openPopup(url, width, height)
{
	openWnd(url, 'o8sppopup', 'scrollbars=yes,status=no,toolbar=no,location=no,directories=no,resizeable=no,menubar=no,width='+width+',height='+height);
}

function openWnd(url, windowname, attribute)
{
	if(windowname=='')
		windowname='o8sppopup';
	wnd = window.open(url,windowname,attribute);
	wnd.focus(); 
}