/********************************************************
 *  Warhammer Realm War									*
 *														*
 *  Character Info Scripts & Functions					*
 ********************************************************/

/**
 *  toggleCharDetails switches the item detail pane on and off on
 *  the CharacterInfo display page of the herald.<b> 
 *
 *	@param status	Status of the detail pane to be changed to (on/off)
 *	@param layer	Layer name of div being moused over
 * 	@param panel	Panel level whether item icon is being moused over 
 *					or detail pane being moused over.  This allows the
 *					method to know if any suffixes should be added to
 *					the layer object.
 */
function toggleCharDetails(status,layer,panel)
{
	if(panel == "item")
		var currentLayer = document.getElementById(layer + "-hover");
	else
		var currentLayer = document.getElementById(layer);
	
	
	if(status == "on")
		currentLayer.style.display = "block";
	else
		currentLayer.style.display = "none";
}

/**
 * toggleRankDetails takes a text status and a layer name
 * and turns the rank details on or off based on the
 * status.
 * 
 * @param status - On/Off intended status of the layer
 * @param layer - Id of the layer to show hover pane for
 */
function toggleRankDetails(status,layer)
{
	var currentLayer = document.getElementById(layer + "-hover");
	
	if(status == "on")
		currentLayer.style.display = "block";
	else
		currentLayer.style.display = "none";
}

/**
 * toggleStatDetails takes a text status and a layer name
 * and turns the stats details on or off based on the
 * status.
 * 
 * @param status - On/Off intended status of the layer
 * @param layer - Id of the layer to show hover pane for
 */
function toggleStatDetails(status,layer)
{
	var currentLayer = document.getElementById(layer + "-hover");
	
	if(currentLayer != null)
	{
		if(status == "on")
		{
			currentLayer.style.display = "block";
		}
		else
		{
			currentLayer.style.display = "none";
		}
	}
}