Blocks={};
Blocks.tabs=document.getElementById("tabsHolder");
Blocks.currentTab=null;
Blocks.init=function()
{
  var markers=document.getElementById("tabs").getElementsByTagName("h4");
  for(var i=0;i<markers.length;++i)
  {
    var marker=markers.item(i);
    var block=document.createElement("div");
    block.className="tabContent"
    var el=marker.nextSibling;
    while(el!=null)
    {
      if (el.tagName!=null && el.tagName.toLowerCase()=="h4")
      {
        el=null
      }
      else
      {
        var nel=el.nextSibling;
        block.appendChild(el);
        el=nel;
      }
    }
    marker.parentNode.insertBefore(block,marker.nextSibling);
    marker.style.cursor="pointer";
    marker.block=block;
    marker.onclick=function()
    {
      if(Blocks.currentTab!=this)
      {
        if (Blocks.currentTab)
	{
          Blocks.currentTab.block.style.display="";
	  Blocks.currentTab.className="";
	}
        Blocks.currentTab=this;
        Blocks.currentTab.className="current";
        Blocks.currentTab.block.style.display="block";
      }
    }    
    Blocks.tabs.appendChild(marker);
  }
  if (markers.length>0)
    markers.item(0).onclick();
}
Blocks.init();


