var aClientLogos = new Array();

function adjustContentHeight( nHeight )
{
	var oImage = document.getElementById( 'contentHeight' );
	
	oImage.height = nHeight;
}

function registerClientLogo( sLogo )
{
	aClientLogos.push( sLogo );
	
	var oLogoLink 	= document.getElementById( sLogo );
	var oLogo 		= document.getElementById( sLogo + 'Logo' );
	
	oLogoLink.style.cursor 			= 'hand';
	oLogoLink.style.textDecoration 	= 'underline';
	oLogoLink.onmouseout 			= onLogoMouseOut;
	oLogoLink.onmouseover 			= onLogoMouseOver;

	oLogo.style.visibility = 'hidden';					
}

function onLogoMouseOut()
{
	var oLink = this;
	var oLogo = document.getElementById( oLink.id + 'Logo' );
	
	oLink.style.color = '#00788A';
	oLogo.style.visibility = 'hidden';
}

function onLogoMouseOver()
{
	var oLink = this;
	var oLogo = document.getElementById( oLink.id + 'Logo' );
	
	oLink.style.color = '#9B0033';
	oLogo.style.visibility = 'visible';
}				


var aCallOuts = new Array();

function registerCallOut( sCallOut )
{
	aCallOuts.push( sCallOut );
	
	var sCallOutLayer 	= sCallOut + 'CallOut';
	var oCallOutLayer 	= document.getElementById( sCallOutLayer );
	var oCallOutLink 	= document.getElementById( sCallOut );
	
	oCallOutLink.style.cursor 			= 'hand';
	oCallOutLink.style.textDecoration 	= 'underline';
	oCallOutLink.onmouseout 			= onCallOutMouseOut;
	oCallOutLink.onmouseover 			= onCallOutMouseOver;
	
	hideLayer( sCallOutLayer );
}					
		
function onCallOutHide( oObject )
{
	if( typeof( oObject ) == 'string' )
		oObject = document.getElementById( oObject );
		
	oObject.style.color = '#00788A';
	hideLayer( oObject.id + 'CallOut' );										
}

function onCallOutMouseOut( oObject )
{	
	onCallOutHide( this );				
}

function onCallOutDisplay( oObject )
{
	for( var nIndex = 0; nIndex < aCallOuts.length; nIndex++ )
		onCallOutHide( aCallOuts[ nIndex ] );
		
	if( typeof( oObject ) == 'string' )
		oObject = document.getElementById( oObject );
		
	oObject.style.color = '#9B0033';
	showLayer( oObject.id + 'CallOut' );		
}	

function onCallOutMouseOver()
{
	onCallOutDisplay( this );				
}	

var aRoundCornerClasses = new Array( 'roundCorners', 'roundCornerBodyCopy', 'roundCornerContacts' );

function roundCorners()
{
	var aLayers = document.getElementsByTagName( "div" );

	for( var nIndex = 0; nIndex < aLayers.length; nIndex++ )
	{
		var oLayer = aLayers[ nIndex ];
		
		for( var nClassIndex = 0; nClassIndex < aRoundCornerClasses.length; nClassIndex++ )
		{
			if( oLayer.className == aRoundCornerClasses[ nClassIndex ] )
			{
				var oTop 	= document.createElement( 'span' );
				var oBottom = document.createElement( 'span' );
				
				oTop.className		= 'cornerTop';
				oBottom.className 	= 'cornerBottom';
				
				for( var nCorner = 0; nCorner < 4; nCorner++ )
				{
					var oTopCorner 		= document.createElement( 'span' );
					var oBottomCorner 	= document.createElement( 'span' );
					
					oTopCorner.className 	= 'corner' + nCorner;
					oBottomCorner.className = 'corner' + ( 3 - nCorner );
					
					oTopCorner.style.backgroundColor 		= oLayer.style.backgroundColor;
					oBottomCorner.style.backgroundColor 	= oLayer.style.backgroundColor;
					
					oTop.appendChild( oTopCorner );
					oBottom.appendChild( oBottomCorner );
				}
				
				oLayer.insertBefore( oTop, oLayer.firstChild );
				oLayer.appendChild( oBottom, oLayer.firstChild );
			}
		}					
	}
}		
