 var sectionMenu="<div id=\"close\">[<a href=\"javascript:window.close();\"> Close Window </a>]</div>\n<h1><a name=\"top\"></a>Form Help System</h1>\n<p>Please use this help system to fill out the form with the correct data.</p>\n   ";
 var helpText="";
 var arg=/ /g;
 var retText="<br />\n<a href=\"#top\">&#94; Return to Top &#94;</a>\n";
 // Modified to use display within styles not visibility
 function MM_showHideSections() { //v3.0
  var i,p,v,obj,args=MM_showHideSections.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
   if (obj.style) { obj=obj.style; v=(v=="show")?"block":(v=="hide")?"none":v; }
  obj.display=v; }
 }
 function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
   d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
 }
 function toggleDisplay(section) {
  if((section=MM_findObj(section))!=null) {
   if(section.style) { section=section.style;
    if(section.display=="none") section.display="block";
    else section.display="none";
   }
  }
 }
 function toggleCheckbox(checkid) {
  if((cbox=MM_findObj(checkid))!=null) {
   cbox.checked=!cbox.checked;
  }
 }
 function unHideHiddenElements(source) {
  var ns6=document.getElementById&&!document.all; var ie=document.all;
  var tagsToCheck=new Array('DIV','TABLE','TD');
  for(j=0;j<tagsToCheck.length;j++){
   tags=ns6?source.getElementsByTagName(tagsToCheck[j]):(ie?source.all.tags(tagsToCheck[j]):source.getElementsByTagName(tagsToCheck[j]));
   for(i=0;i<tags.length;i++) { tag=tags[i];
    if(tag.style) { section=tag.style;
     if(section.display=="none") section.display="block";
    }
   }
  }
 }
 // Follows link if confirmed
 function deleteItem(l) {
  if(confirm('Are you sure you wish to DELETE this record?'))
   location.href=l;
  return;
 }
 // Based on menurollover code, discovers table cell by monitoring mouse click,
 // then checks for link within cell and follows the href. Very backwards compatible.
 function followLink(e) {
  source=ie? event.srcElement : e.target;
  if(source.tagName=="A"||source.tagName=="TR"||source.tagName=="TABLE"||!(source.tagName)) return;
  while(source.tagName!="TD"&&source.tagName!="TH"&&source.tagName!="HTML")
   source=ns6? source.parentNode : source.parentElement;
  link=ns6?source.childNodes[0]:(ie?source.all.tags('A')[0]:source.getElementsByTagName('A')[0]);
  if(link!=null && link.tagName=='A') location.href=link.href;
 }
 function addToHelp(title,text,subdata) {
  if(subdata!=""){ helpText+="<div class=\"sub\"><h3><a name=\""+title.replace(arg,'_')+"\"></a>"+title+"</h3>\n<p>"+text+retText+"</p></div>\n"; }
  else{ helpText+="<h2><a name=\""+title.replace(arg,'_')+"\"></a>"+title+"</h2>\n<p>"+text; if(text!="") helpText+=retText; helpText+="</p>\n"; }
  // Add menu at top
  if(subdata==""){ sectionMenu+="<a href=\"#"+title.replace(arg,'_')+"\">"+title+"</a> | "; }
 }
 function showHelp() {
  // Start of help doc
  var str_buffer = new String("<html>\n<head>\n<title>Web Site Help</title>\n");
  // Add style
  str_buffer += "<style>body{background-color:#fff;padding:0px;margin:5px 0px 20px;}h1,h2,h3{margin:15px 5px 5px;font-size:0.9em;color:#000;background-color:#aaa;padding-left:5px;}h1{font-size:1.1em;margin:2px 0px;}h3{font-size:0.8em;margin:10px 5px 5px}div.sub{margin:0px 0px 0px 10px;}div.menu{margin:0px 5px 10px 10px;}a{font-size:0.8em;color:#099;text-decoration:none;}a:hover{color:#ff2400;}#close{float:right;margin:0px 2px;}#close a{color:#000;}#close a:hover{background-color:#666;color:#fff;}p{margin:2px 5px 5px 15px;}</style>";
  str_buffer += "</head>\n<body>\n";
  // Add helptext
  str_buffer += "<div class=\"menu\">"+sectionMenu.substring(0,(sectionMenu.length-3))+"</div>\n";
  str_buffer += helpText;
  // Finish help doc
  str_buffer +="</body>\n</html>\n";
  // Display help doc
  var helpWin=window.open("", "Help","width=350,height=450,status=no,scrollbars=yes,resizable=yes,top=100,left=150");
  helpWin.opener = self;
  helpWin.focus();
  var help_doc = helpWin.document;
  help_doc.write(str_buffer);
  help_doc.close();
 }
 function showStatisticHelp(file) {
  // Display help doc
  var helpWin=window.open(file, "StatHelp","width=420,height=450,status=no,scrollbars=yes,resizable=yes,top=100,left=150");
  helpWin.opener = self;
  helpWin.focus();
 }

