//button effects
var ie=(document.all)?1:0;	var ns=(document.layers)?1:0;
function LightOn(what){if (ie) what.id='buttonon';else return;}
function LightOut(what){if (ie) what.id='buttonoff';else return;}

function setFocus(field)
{
	if (document.getElementById(field) != null)
		document.getElementById(field).focus();
}

// function used to toggle the background color of table rows
// oper  = whether the row should be on or off
// row   = the row object
// color = the color to assign
function highlightRow(oper, row, color){
   if (oper=="on" && ie) {
      row.style.background = color;
   }else{
      row.style.background = "";
   }
}


function toggleNotified(cObj, tTable, sOpenText,sClosedText){
   if (document.getElementById(tTable).style.display == "none") {
      document.getElementById(tTable).style.display = "block";
      cObj.innerText = "[ " + sOpenText + " ]";
   }
   else {
      document.getElementById(tTable).style.display = "none";
      cObj.innerText = "[ " + sClosedText + " ]";
   }
}

//confirm delete
//input - the name of what you are confirming
function confirmDelete(sItem) {
	if (confirm("Are you sure you want to delete "+ sItem +"?")==true) {
	return true;
	} else {
		return false;
	}	
}