/*
	CMSZWO Public JS Scripts
*/

function litTD(td, color)
{
	if(color != '')
	{
		td.style.backgroundColor  = color;
	}
}

function go(url)
{
	if(url != '')
	{
		window.location.href = url;
		event.cancelBubble = true;
	}
}

function getTextValue(id)
{
	result = "";
	result = document.getElementById(id).value.toString();
	return result;
}

function setTextValue(id, value)
{
	document.getElementById(id).value = value.toString();
}

function getComboValue(id)
{
	ret = -1;
	ret = document.getElementById(id).options[getElementById(id).options.selectedIndex].value;
	return ret;
}

function setComboValue(id, value)
{
	var i=0;
	for(i=0; i<document.getElementById(id).length; i++)
	{
		if(document.getElementById(id).options[i].value == value)
		{
			document.getElementById(id).selectedIndex = i;
			break;
		}
	}
}