n = (document.layers) ? 1:0
ie = (document.all) ? 1:0

if (parent.frames.help)
  {
  arrayLength = parent.frames.help.arrayLen;
  }

function find(what) {
    for (var i=0;i<parent.frames.length;i++) {
         if (parent.frames[i].name == what)
			if (n) {
				if (parent.frames[i].document.layers['helpText'])
             		return true;
			} else if (ie) {
				if (parent.frames[i].document.all['helpText'])
             		return true;
			}
    }
    return false;
}


function layerWrite(id,header,text) {

		var newText = "<TABLE BORDER=0 WIDTH=100% BGCOLOR=#999966 CELLPADDING=0 CELLSPACING=0 CLASS=bdrOut><TR><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=3 width=100%><TR><TD VALIGN=TOP BGCOLOR=#999966 CLASS=bgTop ALIGN=CENTER height=22> " + header + " </TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=3 width=100% CLASS=bgBot><TR><TD VALIGN=TOP BGCOLOR=#999966>" + text + "</TD></TR></TABLE></TD></TR></TABLE>"
        if (n) {
                parent.frames.help.document.layers[id].document.write(newText)
                parent.frames.help.document.layers[id].document.close()
                setVisibility(id,true)
        }
        else if (ie) {
                parent.frames.help.document.all[id].innerHTML = newText
                setVisibility(id,true)
				setVisibility('bannerHeader',false)
        }
	
}

visBanner = 'true';

function setVisibility(id, flag) {
  arrayLength = parent.frames.help.arrayLen;

  if (n) {
	if (id != 'banner') {
      var str = (flag) ? 'show' : 'hide';
      eval("parent.frames.help.document." + id).visibility = str;
	}
	else { visBanner = 'false'; }
  }
  else if (ie) {
	  var str = (flag) ? 'visible' : 'hidden';
      eval("parent.frames.help.document.all." + id).style.visibility = str;
	

	if (id == 'banner') {
		for (var i=0; i<arrayLength; i++) {
			eval("parent.frames.help.document.all.message" + i).style.visibility = str;
			visBanner = 'false';
		}
	}
  }
  
  if ((id != 'banner') && (flag != 'true')) {
    visBanner = 'true';
  }
}
