function changeText( docId )
{
	toChange=document.getElementById(docId);
	toChange.className = "textOn";
}
function collapseText( docId )
{
	toChange=document.getElementById(docId);
	toChange.className = "textOff";
}
function splashOpen( cId, totHeight )
	{
	   	var sExpand = document.getElementById( cId );
		var curHeight = sExpand.style.height == '' ? 0 : parseInt( sExpand.style.height );
		sExpand.style.height = curHeight + 5 + 'px';
			if (sExpand.isOpen) // Check to see if it is open already.
			{
				if ( curHeight + 5 < totHeight )
				   setTimeout( 'splashOpen( "' + cId + '", ' + totHeight + ' );', 30 );
			}
	}
//Close the splash
function splashClose( cId )
{
   var sExpand = document.getElementById( cId );
	var curHeight = parseInt( sExpand.style.height );
	sExpand.style.height = curHeight - 5 + 'px';
	if (!sExpand.isOpen) //Check to see if it is closed.
	{
		if ( curHeight - 5 >= 0 )
	   		setTimeout( 'splashClose( "' + cId + '" );', 30 );
		if (curHeight - 5 < 5)
			{
			sExpand.style.height = 1 + 'px';
			sExpand.style.display = 'none';
			}
	}
	
}
//Set Variables for expanding the splash
function splashExpand( cId )
{			
		var sExpand = document.getElementById( cId ); // the element to expand
		sExpand.isOpen = true;
		var totHeight = 150; 
		setTimeout( 'animateOpen( "' + cId + '", ' + totHeight + ' );', 30 );
		sExpand.style.display = 'block';
}
//Set Variables to Collapse splash
function splashCollapse( cId )
{
	var sExpand = document.getElementById( cId ); // the element to expand
	sExpand.isOpen = false;
	setTimeout( 'animateClose( "' + cId + '" );', 30 );
	//sExpand.style.display = 'none';

}
//Main Function for Opening and Closing splashs
divToClose = 'defaultText'
function setToClose(toClose)
{
	divToClose = toClose;
}
function splashToggle(cId)
{
	sExpand = document.getElementById( cId );
	if (!sExpand.isOpen)
		{
			splashExpand( cId );
			if (divToClose != cId)
			splashCollapse(divToClose);
		}
	else
		{
			splashCollapse( cId );
		}
}
