function htGetStyleObject(objectId) {
  if(document.getElementById && document.getElementById(objectId)) return document.getElementById(objectId).style;
  else if (document.all && document.all(objectId)) return document.all(objectId).style;
  else if (document.layers && document.layers[objectId]) return document.layers[objectId];
  else return false;
}
function HideToggle(id,inside) {
  var styleObject = htGetStyleObject('htc'+id);
  if(styleObject) {
    if (styleObject.display != 'none') {
		  if (htalloff || inside) {
 		    styleObject.display = 'none';
  	    if (htexpand) document['hti'+id].src = htexpand;
			  if (id == htlastid) htlastid = false;
			}
		} else {
  		styleObject.display = '';
	  	if (htcollapse) document['hti'+id].src = htcollapse;
		  if (htlastid && id != htlastid && htonlyone) HideToggle(htlastid,true);
  		htlastid = id;
		}
  }
}
function htDoAll(htdisplay,htimage) {
  for (id=1; id<=htcount; id++) {
    if (id!=htlastid) {
      var styleObject = htGetStyleObject('htc'+id);
      if(styleObject) {
	      styleObject.display = htdisplay;
	      if (htimage) document['hti'+id].src = htimage;
      }
	  } else if (htcollapse) document['hti'+id].src = htcollapse;
  }
}
function htExpandAll() {
  htonlyone = false;
	htlastid = false;
  htDoAll('',htcollapse)
}
function htCollapseAll() {
  htalloff = true;
	htlastid = false;
  htDoAll('none',htexpand)
}
htDoAll('none',htexpand);