
var winHelpHNDL=null;
var winUtilityHNDL=null;

//Used for color changes in forms
var highlightcolor="lightYellow";
var ns6=document.getElementById&&!document.all;
var previous='';
var eventobj;
var intended=/INPUT|TEXTAREA|SELECT|OPTION/;

var isIE = false;
var isOther = false;
var isNS4 = false;
var isNS6 = false;
if(document.getElementById)
{
	if(!document.all)
	{
		isNS6=true;
	}
	if(document.all)
	{
		isIE=true;
	}
}
else
{
	if(document.layers)
	{
		isNS4=true;
	}
	else
	{
		isOther=true;
	}
}

//function used to make sure clicking enter on text box will not force form submit
//use the following in the textbox input section
// onkeypress="return noenter()"
function noenter(e) {
	if(window.event) {
    	return !(window.event.keyCode == 13); 
	}else{
		return !(e.which == 13);	
	}
}

function trim(inputString) {
   // Removes leading and trailing spaces from the passed string. Also removes
   // consecutive spaces and replaces it with one space. If something besides
   // a string is passed in (null, custom object, etc.) then return the input.
   if (typeof inputString != "string") { return inputString; }
   var retValue = inputString;
   var ch = retValue.substring(0, 1);
   while (ch == " ") { // Check for spaces at the beginning of the string
      retValue = retValue.substring(1, retValue.length);
      ch = retValue.substring(0, 1);
   }
   ch = retValue.substring(retValue.length-1, retValue.length);
   while (ch == " ") { // Check for spaces at the end of the string
      retValue = retValue.substring(0, retValue.length-1);
      ch = retValue.substring(retValue.length-1, retValue.length);
   }
   while (retValue.indexOf("  ") != -1) { // Note that there are two spaces in the string - look for multiple spaces within the string
      retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); // Again, there are two spaces in each of the strings
   }
   return retValue; // Return the trimmed string back to the user
} // Ends the "trim" function

/*
Access Layer Style Properties
Jim Cummins - http://www.conxiondesigns.com
Required components:  Javascript Browser Sniff 1.0
*/
function aLs(layerID)
{
var returnLayer;
	if(isIE)
	{
		returnLayer = eval("document.all." + layerID + ".style");
	}
	if(isNS6)
	{
		returnLayer = eval("document.getElementById('" + layerID + "').style");
	}
	if(isNS4)
	{
		returnLayer = eval("document." + layerID);
	}
	if(isOther)
	{
		returnLayer = "null";
		alert("-[Error]-\nDue to your browser you will probably not\nbe able to view all of the following page\nas it was designed to be viewed. We regret\nthis error sincerely.");
	}
return returnLayer;
}


<!--hide from old browsers
//Regular expression to highlight only form elements


//Function to check whether element clicked is form element
function checkel(which){
	if (which.style&&intended.test(which.tagName)){
		if (ns6&&eventobj.nodeType==3) { eventobj=eventobj.parentNode.parentNode; }
		return true;
	} else { return false; }
}

//Function to highlight form element
function highlight(e){
	eventobj=ns6? e.target : event.srcElement
	if (previous!=''){
		if (checkel(previous)){	previous.style.backgroundColor=''; }
		previous=eventobj;
		if (checkel(eventobj)){	eventobj.style.backgroundColor=highlightcolor; }
	}else{
		if (checkel(eventobj)){ eventobj.style.backgroundColor=highlightcolor; }
		previous=eventobj;
	}
}

function submitonce(theform){
	if (document.all||document.getElementById){
		for (i=0;i<theform.length;i++){
			var tempobj=theform.elements[i]
			if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="button")
			tempobj.disabled=true
		}
	}
}

function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    // if cookie exists
    if (offset != -1) {
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1) end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end))
      }
   }
  return returnvalue;
}

function openWindow(theURL,winName,features)
{
  window.open(theURL,winName,features);
}

function closeHelpWindow(){
  if (winHelpHNDL != null && winHelpHNDL.open) winHelpHNDL.close(); 
  if (winUtilityHNDL != null && winUtilityHNDL.open) winUtilityHNDL.close();     
}

function openHelpWindow(intHelpID,features) {
  var strURL = "help.php?helpID="+intHelpID;	
  if (winHelpHNDL != null && winHelpHNDL.open) winHelpHNDL.close(); 
  winHelpHNDL =  window.open(strURL,'winHelp',features);
}

function nameWin()
{
	window.name = "launcher";
}

function jumpMenu(targ,selObj,restore)
{
	if (selObj.selectedIndex==0) return false;
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}

function jumpMenu2(targ,selObj,restore)
{
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}

function changeFuseDescription(text)
{
	if(document.all){
	    fusedescription.innerText=text;
	}
}

	function hideshow(which,imgid,cookiename){
		if (!document.getElementById)  return
		if (which.style.display=="none"){
			which.style.display=""
			document.images[imgid].src="images/collapse.gif";
			document.cookie=cookiename+"=collapse";
		}else{
			document.images[imgid].src="images/expand.gif";
			which.style.display="none";
			document.cookie=cookiename+"=expand";
		}
	}

function hideshowCommon(which,imgid){
	if (!document.getElementById)  return
	if (which.style.display=="none"){
		which.style.display=""
	}else{
		which.style.display="none";
	}
}

function isEmpty(s){
  return ((s == null) || (s.length == 0));
}

function isDigit (c){
  return ((c >= "0") && (c <= "9"));
}

function isFloat (s){
  var i;
  var seenDecimalPoint = false;
  var decimalPointDelimiter = "."  
  if (isEmpty(s))
    if (isFloat.arguments.length == 1) return false;
    else return (isFloat.arguments[1] == true);
  if (s == decimalPointDelimiter) return false;
  for (i = 0; i < s.length; i++){
    var c = s.charAt(i);
    if ((c == decimalPointDelimiter) && !seenDecimalPoint)
          seenDecimalPoint = true;
    else if (!isDigit(c)) return false;
  }
  return true;
}

// *** TABLE CHECKBOX OPERATIONS *****
var checkCount = 0;

function makevisible(cur,which)
{
    strength=(which==0)? 1 : 0.2

    if (cur.style.MozOpacity)
        cur.style.MozOpacity=strength
    else if (cur.filters)
        cur.filters.alpha.opacity=strength*100
}

function updateButtons(form)
{
    if (checkCount > 0) {
        for (i = 0; i < form.length; i++) {
            element = form.elements[i];
            if (element.type == "button" || element.type == "submit") {
                element.disabled = false;
                makevisible(element, 0);
            }
        }
    } else {
        for (i = 0; i < form.length; i++) {
            element = form.elements[i];
            if (element.type == "button" || element.type == "submit") {
                element.disabled = true;
                makevisible(element, 1);
            }
        }
    }
}

function checkCheckBox(checkBox)
{
    if (checkBox.checked) checkCount++;
    else checkCount--;
    updateButtons(checkBox.form);
}

function toggleAll(form)
{
    check = form.toggleAllChk.checked;
    for (i = 0; i < form.length; i++) {
        element = form.elements[i];
        if (element.type == 'checkbox' && element.name != 'toggleAll' && element.checked != check && element.disabled != true) {
            element.checked = check;
            if (check) checkCount++;
            else checkCount--;
        }
    }
    updateButtons(form);
}
// *** END TABLE CHECKBOX OPERATIONS *****

//used for debugging
function dumpProps(obj, parent) {
  for (var i in obj) {
    if (parent) { var msg = parent + '.' + i + '\n' + obj[i]; } else { var msg = i + '\n' + obj[i]; }
    if (!confirm(msg)) { return; }
    if (typeof obj[i] == 'object') {
          if (parent) { dumpProps(obj[i], parent + '.' + i); } else { dumpProps(obj[i], i); }
    }
  }
}

