//=======================================================================================================
//-------------------------------------------------------------------------------------------------------
//	Custom Javascript functions
//-------------------------------------------------------------------------------------------------------
//=======================================================================================================
function quickfindover()
{
	toggle('quickfind','block');
	swapImg('quickfindbutton','/images/quickfind_over.gif')
}

function quickfindout()
{
	toggle('quickfind','none');
	swapImg('quickfindbutton','/images/quickfind.gif')
}

function quickfindouthome()
{
	toggle('quickfind','none');
	swapImg('quickfindbutton','/images/quickfindhome.gif')
}

function toggle(id,display)
{
	if( document.getElementById)
	{
		document.getElementById(id).style.display = display;
	}
}

//-------------------------------------------------------------------------------------------------------
//	Image swap 2
//-------------------------------------------------------------------------------------------------------
function swapImg2(id)
{
	if( document.getElementById)
	{
		obj	= document.getElementById(id);
		baseImg	= obj.getAttribute( 'base' );
		obj.setAttribute( 'src', baseImg );
	}
}

//---------------------------------------------------------------------------------------------------------
//	Window open/close
//---------------------------------------------------------------------------------------------------------
function toggleInOut(setting)
{
	if( setting == '*' )
	{
		document.getElementById('ioreturntime').style.display = 'inline';
	}
	else
	{
		document.getElementById('ioreturntime').style.display = 'none';
	}
}

//---------------------------------------------------------------------------------------------------------
//	Pop - Up Window
//---------------------------------------------------------------------------------------------------------
function showDetails(content,target)
{
	window.open(content,target,"menubar=0,statusbar=0,scrollbars=1,toolbar=0,location=0,width=550,height=500");
}

//---------------------------------------------------------------------------------------------------------
//	Pop - Up Window Gallery
//---------------------------------------------------------------------------------------------------------
	
function showLgImage(content,target,features)
{
	window.open(content,target,features);
}

//-------------------------------------------------------------------------------------------------------
//	app Selector
//-------------------------------------------------------------------------------------------------------

//	track what app is highlighted in the sponsor a app selector
currentapp	= 0;

function showapp(what)
{
	appId			= "app" + what;
	
	if(document.getElementById)
	{
		if ( !document.getElementById(appId) )
		{
			return;
		}

		document.getElementById(appId).style.display	= "block";
		if (currentapp != what)
		{
			previousappId		= "app" + currentapp;
			document.getElementById(previousappId).style.display	= "none";
		}
	}

	currentapp	= what;
}

//-------------------------------------------------------------------------------------------------------
//	lccolors Selector
//-------------------------------------------------------------------------------------------------------

//	track what lccolors is highlighted in the sponsor a lccolors selector
currentlccolors	= 0;

function showlccolors(what)
{
	lccolorsId			= "lccolors" + what;

	if(document.getElementById)
	{
		if ( !document.getElementById(lccolorsId) )
		{
			return;
		}

		document.getElementById(lccolorsId).style.display	= "block";
		if (currentlccolors != what)
		{
			previouslccolorsId		= "lccolors" + currentlccolors;
			document.getElementById(previouslccolorsId).style.display	= "none";
		}
		
		currentlccolors		= what;
	
	}

	//	Netscape 4.x hack
	else if (document.layers)
	{
		if ( !document.layers[lccolorsId] )
		{
			return;
		}

		document.layers[lccolorsId].display	= "block";
		if (currentlccolors != what)
		{
			previouslccolorsId		= "lccolors" + currentlccolors;
			document.layers[previouslccolorsId].display	= "none";
		}
	}
}

//-------------------------------------------------------------------------------------------------------
//	gallery Selector
//-------------------------------------------------------------------------------------------------------
//	track what photo in the gallery is highlighted in the sponsor a gallery selector
currentphoto	= 1;

function showphoto(what)
{
	photoId			= "photo" + what;
	
	if(document.getElementById)
	{
		if ( !document.getElementById(photoId) )
		{
			return;
		}

		document.getElementById(photoId).style.display	= "block";
		if (currentphoto != what)
		{
			previousphotoId		= "photo" + currentphoto;
			document.getElementById(previousphotoId).style.display	= "none";
		}
	}
	currentphoto	= what;
}

//-------------------------------------------------------------------------------------------------------
//	Redirect
//-------------------------------------------------------------------------------------------------------
function redirectToSelf( nav )
{
	//	Selected a url?
	dropdown	= nav.options;
	value		= dropdown[dropdown.selectedIndex].value;

	if ( value )
	{
		window.open(value,'_self');	
	}
}

//-------------------------------------------------------------------------------------------------------
//	Redirect
//-------------------------------------------------------------------------------------------------------
function openNewWindow( nav )
{
	//	Selected a url?
	dropdown	= nav.options;
	value		= dropdown[dropdown.selectedIndex].value;

	if ( value )
	{
		window.open(value,'_blank');	
	}
}
//---------------------------------------------------------------------------------------------------------
// Row colorchange
//---------------------------------------------------------------------------------------------------------
 
activeCellColor		= "#C96500";
inactiveCellColor   = "#97A0C2";
 
function cellover(id)
{
	 obj = document.getElementById(id);
	 obj.style.backgroundColor = activeCellColor;
}
 
function cellout(id)
{
	 obj = document.getElementById(id);
	 obj.style.backgroundColor = inactiveCellColor;
}

//