// javascript to display images

function showtip(current,e,tip, xOR, yOR, isAbs) {
	if (xOR == null) {
		xOR = 20;
	}
	if (yOR == null) {
		yOR = 60;
	}
	
	if (document.layers) { // Netscape 4.0+
		theString="<DIV CLASS='ttip' align=center>"+tip+"</DIV>"
		document.tooltip.document.write(theString)
		document.tooltip.document.close()
		if (isAbs == 1 || isAbs == 'Y') {
			document.tooltip.top  =  xOR;
			document.tooltip.top  =  yOR;
		} else {
			document.tooltip.top  =  e.pageX + xOR;
			document.tooltip.top  =  e.pageY - yOR;
		}
		document.tooltip.visibility="show"
	} else {
		if(document.getElementById) { // Netscape 6.0+ and Internet Explorer 4.0+
			elm=document.getElementById("tooltip")
			elml=current
			elm.innerHTML=tip
			elm.style.height=elml.style.height
			if(document.all) {
				if (isAbs == 1 || isAbs == 'Y') {
					elm.style.top   =  yOR + document.body.scrollTop;
					elm.style.left  =  xOR + document.body.scrollLeft;
				} else {
					elm.style.top   =  event.clientY + document.body.scrollTop - yOR;
					elm.style.left  =  event.clientX + document.body.scrollLeft + xOR;
				}
			} else {
				if (isAbs == 1 || isAbs == 'Y') {
					elm.style.top   =  yOR;
					elm.style.left  =  xOR;
				} else {
					elm.style.top   =  e.pageY - yOR;
					elm.style.left  =  e.pageX + xOR;
				}
			}
			elm.style.visibility = "visible"
		}
	}
}
function hidetip(){
	if (document.layers) { // Netscape 4.0+
		document.tooltip.visibility="hidden"
	} else {
		if(document.getElementById || document.all) { // Netscape 6.0+ and Internet Explorer 4.0+
			elm=document.getElementById("tooltip")
			elm.style.visibility="hidden"
		}
	} 
}

function changeSelectMenuVisibility(theVisibility, theFormName) {
  for(var f=0; f < document.forms.length; f++) {
    if (theFormName != null && theFormname != '' && document.forms[f].name != theFormName)
      continue;
    for(var i=0; i < document.forms[f].elements.length; i++) {
      if (document.forms[f].elements[i].type == 'select-one' || document.forms[f].elements[i].type == 'select-multiple') {
	document.forms[f].elements[i].style.visibility = theVisibility;
      }
    }

  }
}

function hideSelectMenus(theFormName) {
	changeSelectMenuVisibility('hidden', theFormName);
}
function showSelectMenus(theFormName) {
	changeSelectMenuVisibility('visible', theFormName);
}



// usage:
//  onMouseover="showtip(this,event,'<IMG SRC="$imgSrc$">');" onMouseout="hidetip();"

// insert this div in page body (not inside another element):
// <div id="tooltip" style="position:absolute; top:100px; left:200px; visibility:hidden;border:1px solid black;font-size:12px;font-weight:bold;font-family:arial,helvetica;color:#000000;layer-background-color:#CCCCCC;background-color:#CCCCCC;padding:1px;z-index: 100" align=center>




