//<![CDATA[

function calcHeight()
{
	//alert("calcHeight called");
//make sure this browser can handle the code in the else clause below (Safari can't!)
if (document.body.scrollHeight)
	{
		//Safari code
		//set default height
		document.getElementById('tabtarget').height=350

	} else {
	var the_height=
    document.getElementById('tabtarget').contentWindow.
    document.body.scrollHeight;

  	//change the height of the iframe
  	document.getElementById('tabtarget').height=
    the_height + 80;
	}
	

}

function doTab(frameName) {

  var track, i;

  // Exit if no frame name was given.

  if (frameName == null)
    return;

  // Check all links.

  track = document.getElementsByTagName("A");
  for (i = 0; i < track.length; i++)

    // Check if the link's target matches the frame being loaded.

    if (track[i].target == frameName) {

      // If the link's URL matches the page being loaded, activate it.
      // Otherwise, make sure the tab is deactivated.

      if (track[i].href == window.frames[frameName].location.href) {
        track[i].className += " activeTab";
        track[i].blur();
      }
      else
        removeName(track[i], "activeTab");
    }
}

function removeName(what, name) {

  var i, oldList, newList;

  if (what.className == null)
    return;

  // Remove the given class name from the element's className property.

  newList = new Array();
  oldList = what.className.split(" ");
  for (i = 0; i < oldList.length; i++)
    if (oldList[i] != name)
      newList.push(oldList[i]);
  what.className = newList.join(" ");
}


//]]>
