var currentPaneStyle = 0;
var currentTab = 0;
var bgclass1 = "selector_item_Sel";

function tabstrip(bgc)
{
	bgclass1 = bgc;
	this.tabs = new Array();
	this.add = addTab;
	this.write = writeTabstrip;
}

function tab(caption,content)
{
	this.setId = setId;
	this.caption = caption;
	this.content = content;
	this.write = writeTab;
	this.writeContent = writePane;
}

function addTab(tab)
{
	tab.setId("tab" + this.tabs.length);
	this.tabs[this.tabs.length] = tab;
}

function setId(id)
{
	this.id = id;
}

function initiate()
{
	var div = document.getElementById ("tab0");
	showPane (div);
}

function showPane(div)
{
	getTibles (div.id);
	domDetect = true;
}

function writePane()
{
	document.write (" ");
	//document.write ("<!-- <div class='pane' id='pn_" + this.id + "'></div> -->");
}

function writeTab()
{
           //document.write("<td class='selector_item'><div id='" + this.id + "' onclick='showPane(this)'><a>" + this.caption + "</a></div></td>");
	document.write ("<a id='" + this.id + "' onclick='showPane(this)'>" + this.caption + "</a>");
           //document.write("<td class='selector_item'><a>" + this.caption + "</a></td>");
}

function writeTabstrip()
{
          //document.write("<table border='0' cellspacing='0' cellpadding='0'><tr><td><img src='images/selector_left.gif' width='5' height='20' border='0'></td><td><img src='images/selector_separator.gif' width='1' height='20' border='0'></td>");
	document.write("");
	for(var i = 0; i < this.tabs.length; i++)
	{
                  //if (i % 5 == 0)
                        //document.write("<tr>");
		this.tabs[i].write();
		if (i != this.tabs.length - 1)
			document.write (" | ");
            //document.write("</tr>");
	}

	document.write("");

          //document.write("<table><tr>");
	for(var k = 0; k < this.tabs.length; k++)
		this.tabs[k].writeContent();
          //document.write("</tr></table>");
	// initiate();
}

function getTibles(k){

//	alert(document.getElementById("tab0s"));

	if (document.getElementById("tab0s")) document.getElementById ("tab0s").style.display = k == "tab0" ? "inline" : "none";
	if (document.getElementById("tab1s")) document.getElementById ("tab1s").style.display = k == "tab1" ? "inline" : "none";
	if (document.getElementById("tab2s")) document.getElementById ("tab2s").style.display = k == "tab2" ? "inline" : "none";
	if (document.getElementById("tab3s")) document.getElementById ("tab3s").style.display = k == "tab3" ? "inline" : "none";
	if (document.getElementById("tab4s")) document.getElementById ("tab4s").style.display = k == "tab4" ? "inline" : "none";
	if (document.getElementById("tab5s")) document.getElementById ("tab5s").style.display = k == "tab5" ? "inline" : "none";
}

// show fhg links block

function showfhglinks(fhgid)
{
	var fhg = document.getElementById("fhg_" + fhgid);

	if (fhg.style.display == 'block'){
	fhg.style.display = 'none';
	}
	else {fhg.style.display = 'block';}
	
	
}

function mouseOver(y)
{
var x = document.getElementById(y);
if (y == 'prog_t') 	w = '138px'; else w = '138px';
x.style.height = "auto";
x.style.width = w;
x.style.overflow = "visible";
x.style.border = "1px solid #fff";
x.style.padding = "0px;";
}
function mouseOut(y)
{
var x = document.getElementById(y);
if (y == 'prog_t') 	w = '138px'; else w = '115px';
if (y == 'prog_t') 	h = '126px'; else h = '203px';
x.style.height = h;
x.style.width = w;
x.style.overflow = "hidden";
x.style.border = "1px solid #6dd8fd";
x.style.padding = "0px";
}
