function bg(q,i) {
	b=Array('','#BBBCBD','#D0D5D8');
	if (document.getElementById('pic'+q)) document.getElementById('pic'+q).src="/UI/images/topind"+i+".gif";
	document.getElementById('td'+q).style.backgroundColor=b[i];
}

function toggle(id) {
	var obj = document.getElementById(id);
	if (obj.style.display == 'none') obj.style.display = "block"; else obj.style.display = "none";
}

function togglePanel(id) {
	var obj = document.getElementById(id);
	var input = document.getElementById(id + "_value");
	if (obj.style.display == 'none') {
		obj.style.display = "block";
		input.value = "0";
	} else {
		obj.style.display = "none";
		input.value = "1";
	}
}

isDOM=document.getElementById;
isMSIE=document.all && document.all.item;
isNetscape4=document.layers;
isOpera=window.opera;
isOpera5=isOpera && isDOM;
isMSIE5=isDOM && isMSIE && !isOpera;
isMozilla=isNetscape6=isDOM && !isMSIE && !isOpera;

function getLayer(layerName, parentLayerName){
  if (isDOM) return document.getElementById(layerName);
  if (isMSIE) return document.all[layerName];
  if (isNetscape4) return eval('document.layers[layerName]');
  return false;
}

function hint_show(e,what){
	mousex = e.clientX;
	mousey = e.clientY;
	pagexoff = 0;
	pageyoff = 0;
	if (isMSIE5) {
		pagexoff = document.body.scrollLeft;
		pageyoff = document.body.scrollTop;
	} else {
		pagexoff = window.pageXOffset;
		pageyoff = window.pageYOffset;
	}
  
	if (getLayer(what)) {
		if(isNetscape4)	obj = getLayer(what); else obj = getLayer(what).style;
		
		if (obj) {
			leftoff = mousex-pagexoff;
			obj.left = (mousex+pagexoff);
  			topoff = mousey-pageyoff;
			obj.top = (mousey+pageyoff) + 20;
			
			if (isNetscape4) obj.visibility = 'show'; else obj.visibility = 'visible';
		}
	}
	return true;
}

function hint_hide() {
	if (obj) {
		if(isNetscape4) obj.visibility = 'hide'; else obj.visibility = 'hidden';
	}
	return true
}
