function WriteHeaderBar(title_text, header_id, icon_image)
{
  document.write("<tr><td valign=top><img src='"+ icon_image + "'></td>");
  document.write("<td><table width='100%' border=0 cellspacing=0>");
  document.write("<tr><td style='background-color:" + artcam.GetSystemColourShadeString(COLOR_BTNFACE,2,COLOR_BTNSHADOW,1) + "'");
  document.write("onclick='ToggleDiv(" + header_id + " )'>");
  document.write("<img src='../../Html/SharedImages/open_down_small_grey.gif' id=" + header_id + "Img align='right'>");
  document.write("<b>" + title_text + " </b></td></tr>");
  document.write("</table></td></tr>");
}


function WriteSubHeaderBar(title_text )
{
  document.write("<tr><td colspan=3><table width='100%' border=0 cellspacing=0>");
  document.write("<tr><td style='background-color:" + artcam.GetSystemColourShadeString(COLOR_BTNFACE,2,COLOR_BTNSHADOW,1) + "'");
  document.write(">");
  document.write("<b>" + title_text + " </b></td></tr>");
  document.write("</table></td></tr>");
}

function ToggleDiv(header_id)
{
   var buttonname = eval(header_id.id + "Img");
   if (header_id.style.display != "none")
   {
      buttonname.src = "../../Html/SharedImages/open_down_small_grey.gif";
      header_id.style.display = "none";
   }
   else
   {
      buttonname.src = "../../Html/SharedImages/close_up_small_grey.gif";
      header_id.style.display = "";
   }
}


function ShowDiv(header_id)
{
   var buttonname = eval(header_id.id + "Img");
   if (header_id.style.display == "none")
   {
      buttonname.src = "../../Html/SharedImages/close_up_small_grey.gif";
      header_id.style.display = "";
   }
}

function HideDiv(header_id)
{
   var buttonname = eval(header_id.id + "Img");
   if (header_id.style.display != "none")
   {
      buttonname.src = "../../Html/SharedImages/close_up_small_grey.gif";
      header_id.style.display = "none";
   }
}


