function vis_to_inv(id,t)
{
	if (!t)
	{
		t=100;
	}
	var Obj=document.getElementById(id);
	splx_SetOpacity(Obj, 100);
	Obj.style.visibility = "visible";
	splx_FadeOut(id, 100,t);

}

function inv_to_vis(id,t)
{
	if (!t)
	{
		t=100;
	}
	var Obj=document.getElementById(id);
	splx_SetOpacity(Obj, 0);
	Obj.style.visibility = "visible";
	splx_FadeIn(id, 0,t);

}

function splx_SetOpacity(obj, opacity) {



	opacity = (opacity == 100)?99.999:opacity;
	// IE/Win
	obj.style.filter = "alpha(opacity:"+opacity+")";
	// Safari<1.2, Konqueror
	obj.style.KHTMLOpacity = opacity/100;
	// Older Mozilla and Firefox
	obj.style.MozOpacity = opacity/100;
	// Safari 1.2, newer Firefox and Mozilla, CSS3
	obj.style.opacity = opacity/100;
}


function splx_FadeOut(objId,opacity,t) {
	if (!t)
	{
		t=100;
	}
	if (document.getElementById) {
		obj = document.getElementById(objId);
		if (opacity >= 0) {
			splx_SetOpacity(obj, opacity);
			opacity -= 10;
			window.setTimeout("splx_FadeOut('"+objId+"',"+opacity+")", t);
		}
		
	}
}


function splx_FadeIn(objId,opacity,t) {
	if (!t)
	{
		t=100;
	}
	if (document.getElementById) {
		obj = document.getElementById(objId);
		if (opacity <= 100) {
			splx_SetOpacity(obj, opacity);
			opacity += 10;
			window.setTimeout("splx_FadeIn('"+objId+"',"+opacity+")", t);
		}
	}
}



function switch_contents(source,dest)
{
	var strDest=document.getElementById(dest).innerHTML;
	var strSource=document.getElementById(source).innerHTML  ;
	
	document.getElementById(source).innerHTML=strDest;
	document.getElementById(dest).innerHTML=strSource;
}

function show_contents(source)
{
	document.getElementById(source).style.display = "inherit";
}


function hide_contents(source)
{
	if (document.getElementById(source).style.display == "none")
		document.getElementById(source).style.display = "inherit";
	else
		document.getElementById(source).style.display = "none";
	
}
