cthru=5;

function batOrTabOff(idname)
{
	tab = document.getElementById(idname + '-tab');
	cthru = 6;
	tab.style.opacity = cthru/10;
	tab.style.filter =  'alpha(opacity=' + cthru*10 + ')';
}

function handleTabClick(idname)
{
	area = document.getElementById('left');
	var tabsandbats = area.getElementsByTagName('*');
	for (var i=0; i<tabsandbats.length; i++)
	{
		if (tabsandbats[i].className.indexOf('bat') !=-1)
		{
			tabsandbats[i].style.display = "none";
		}

		if (tabsandbats[i].className.indexOf('tab') !=-1)
		{
			cthru = 6;
			tabsandbats[i].style.opacity = cthru/10;
			tabsandbats[i].style.filter = 'alpha(opacity=' + cthru*10 + ')';
		}
	}

	tab = document.getElementById(idname);
	idnameProcessed = idname.split('-tab');
	thisId = idnameProcessed[0];
	bat = document.getElementById(thisId + '-bat');
	bat.style.display="block";
	tab = document.getElementById(thisId + '-tab');
	cthru = 10;
	tab.style.opacity = 1;
	tab.style.filter = 'alpha(opacity=' + cthru*10 + ')';
}

function mouseGoesOver()
{
	cthru = 10;
	this.style.opacity = cthru/10;
	this.style.filter = 'alpha(opacity=' + cthru*10 + ')';
	this.style.cursor = "pointer";
	idname = this.id;
}

function mouseGoesOut()
{
	idname = this.id;
	idnameProcessed = idname.split('-tab');
	thisId = idnameProcessed[0];
	tab = document.getElementById(thisId + '-tab');
	bat = document.getElementById(thisId + '-bat');
	if (bat.style.display != "block")
	{
		cthru = 6;
		tab.style.opacity = cthru/10;
		tab.style.filter = 'alpha(opacity=' + cthru*10 + ')';
	}
	this.style.cursor = "none";
}

function mouseGoesClick()
{
	var content = new Array();
	content = this.innerHTML.split('"');
	url = content[1];
	if (this.className.indexOf('tab') !=-1)
	{
		idname = this.id;
		handleTabClick(idname);
	}
	else
	{
		window.location =  url;
	}
}

function rollovers()
{
	var paras = document.getElementsByTagName('*');
	var originalBackgrounds=new Array();
	for (var i=0; i<paras.length; i++)
	{
		if (paras[i].className.indexOf('moused') !=-1)
		{
			originalFilter = 10;
			originalOpacity = 10;
			paras[i].onmouseover = mouseGoesOver;
			paras[i].onmouseout = mouseGoesOut;
			paras[i].onclick = mouseGoesClick;
		}
	}
}

rollovers();
