function popup(url) {
	window.open(url);
	return false;
}

function fixLinks()
{
  if (!document.getElementsByTagName) return null;
  var server = document.location.hostname;
  var anchors = document.getElementsByTagName("a");
  for(var i=0; i < anchors.length; i++)
  {
    var a = anchors[i];
    var href = a.href;
    var id = a.id;
    var title = a.title;
    if ((href.indexOf("#") != -1) && (href.indexOf("header") == -1)) { // jump ref
      var index = href.indexOf("#") + 1;
      href = "javascript:show('" + href.substring(index) + "');";
      a.setAttribute("href",href);
    }
  }
}

function hideFieldsets(exempt)
{
  if (!document.getElementsByTagName) return null;
  if (!exempt) exempt = "";
  var fieldsets = document.getElementsByTagName("fieldset");
  for(var i=0; i < fieldsets.length; i++)
  {
    var fieldset = fieldsets[i];
    var id = fieldset.id;
    if ((id != "header") && (id != "footer") && (id != exempt))
    
    fieldset.style.display = "none";
  }
}

function show(what)
{
  if (!document.getElementById) return null;
  showWhat = document.getElementById(what);
  showWhat.style.display = "block";
  hideFieldsets(what);
}

window.onload = function()
{
  fixLinks();
  hideFieldsets("editFormGeneralSection");
}