/************************************************************
 *		    Author: Neil Preedy (www.npreedy.co.uk)			*
 *		Created on: Monday 19th February 2007				* 
 *	   Modified on:	Saturday 24th February 2007				*
 *	   	   Version:	00.03.03	(unreleased)				*
 *					Copyright(C)							*
 *															*
 * 		  00.03.03: Created NPimage object. 				*
 *		  			As a tidy up.							*
 *															*
 * 		  00.03.02: location.hash change 					*
 *		  			for location.replace					*
 *					Note: Bug in current 					*
 *					version of  Safari!						*
 *															*
 ************************************************************/
var NPimage = {};
{
	NPimage.directory = "./Images/Awards/";
	NPimage.extension = "Large.jpg";
	NPimage.id = "AwardLargeView";
}
var NPcurrentHighlight;


/****************************************
 *				Roll Over				*
 ****************************************/
function NPshowLargeImage(NPimageName, NPjumpToText)
{
	document.images.AwardLargeView.src = NPimage.directory + NPimageName + NPimage.extension;
	
	if (document.getElementById(NPimageName) != null)
	{
		document.getElementById(NPimageName).className = "Highlight"; // Highlight the award in the text.

		NPhighlight(NPimageName, NPjumpToText);
	}
}


/* Used in People.html   */

function NPhighlight(NPimageName, NPjumpToText)
{
	
	if (NPcurrentHighlight != null)
	{
		NPunhighlight(NPcurrentHighlight);
	}
	
	
	if (document.getElementById(NPimageName) != null)
	{
		document.getElementById(NPimageName).className = "Highlight"; // Highlight the award in the text.
		NPcurrentHighlight = NPimageName;
	}

	/*
			Move location to to new location on the page.
			Uses location.replace as this does not add 
			the location to the history.
	*/
	if (NPjumpToText) document.location.replace("#"+NPimageName);

}

function NPunhighlight(NPimageName)
{
	if (document.getElementById(NPimageName) != null)
	{
		document.getElementById(NPimageName).className = ""; // Highlight the award in the text.
	}
	NPcurrenthighlight="";
}
