// JavaScript Document

var bgcolor;	
function Highlite(x)
{
	
	if (document.getElementById(x)!="")
	{
		bgcolor = document.getElementById(x).style.backgroundColor;
		document.getElementById(x).style.backgroundColor = '#dfdfdf';
		document.getElementById(x).style.cursor = "hand";
	}
}

function Normal(x)
{
	if (document.getElementById(x)!="")
	{
		document.getElementById(x).style.backgroundColor = bgcolor;
		document.getElementById(x).style.backgroundColor = '';
	}
}

function GetObj(name) {
	var obj = document.anchors[name];
	if (obj==null || typeof(obj)=="undefined"){
		if (document.getElementById){ //NS6+
			obj = document.getElementById(name);
		}else{ //IE4+
			obj = document.all[name];
			if ((obj==null || typeof(obj)=="undefined") && typeof(document.body)!="undefined") {
				obj = document.body.document.all[name];
			}
		}
	}
	if ((obj!=null) && (typeof(obj)!="undefined")){
		return obj;
	}else{
		//alert("GetObj('"+name+"'): Object not found!");
		return null;
	}
}

function GetHTML(name){
	// Search and return the content of an anchor object (or empty string if the object doesn't exist)
	var obj = GetObj(name);
	if (obj!=null){
		return obj.innerHTML;
	}else{
		return "";
	}
}

function SetHTML(name, newValue){
	// Change the text of an anchor object
	var obj = GetObj(name);
	if (obj!=null){
		obj.innerHTML = newValue;
	}
	return true;
}

function SetVisible(names, visible){
	// Hide or Show multiple object
	names = names.split(",");
	var i;
	for (i=0; i<names.length; i++){
		var obj = GetObj(names[i]);
		if (obj != null){
			if (visible) {
				obj.style.display = "block";
			}else{
				obj.style.display = "none";
			}
		}
	}
}
