var isIE = false;
var isNN = false;

function Initialize()
{
	if (document.getElementById && navigator.appName.indexOf("Microsoft") < 0)
		isNN = true;
	else if (document.all)
		isIE = true;
}
function GetElement(id)
{
	if (document.getElementById)
		return document.getElementById(id);
	else if (document.all)
		return document.all(id);
	return null;
}
function GetParentElement(id)
{
	if (document.getElementById)
		return parent.document.getElementById(id);
	else if (document.all)
		return parent.document.all(id);
	return null;
}
function SetCursorStyle(elem, style)
{
	if (style == "pointer")
	{
		if (isNN)
			elem.style.cursor = 'pointer';
		else if (isIE)
			elem.style.cursor = 'hand';
	}
	else//probably default
		elem.style.cursor = style;
}
function SetStyle(elem, styleClass)
{
	elem.className = styleClass;
}
function SetIdStyle(id, styleClass)
{
	var elem = GetElement(id);
//	alert(elem + "|" . id);
	if (elem)
		elem.className = styleClass;
}
function ChangeImage(id, imageShow)
{
	var image = GetElement(id);
//	alert(parent.document.getElementById(id).title = "test" + "||" + parent.document.getElementById(id));
//	alert("id=" + id + " image=" + image);
	if (!image)
		image = GetParentElement(id);
	if (!image)		
		return;
	image.src = imageShow;
}
function ChangeHref(id, newHref)
{
	var a = GetElement(id);
	if (!a)
		a = GetParentElement(id)
	if (!a)
		return;
	a.href = newHref;
}
function ChangeDescription(id, newDescription)
{
	var desc = GetElement(id);
	if (!desc)
		return;
	desc.innerHTML = newDescription;
}

