
//
// Used to determine if Internet Explorer is being used to view the page
//

var IE = /*@cc_on!@*/false;

//
// Returns the version of Internet Explorer
//

function getIEVersion()
{
	if(navigator.appVersion.indexOf('MSIE') >= 0)
	{
		return parseFloat(navigator.appVersion.split('MSIE')[1]);
	}

	return -1;
}

//
// Returns the document element
//

function getDocumentElement()
{
	return (document.documentElement) ? document.documentElement : document.body;
}

//
// Returns true if the specified value is a string
//

function isString(value)
{
	return (typeof(value) === 'string') || (value instanceof String);
}

//
// Returns true if the specified value is a number
//

function isNumber(value)
{
	return (typeof(value) === 'number') || (value instanceof Number);
}

//
// Modifies the background positions of the specified element and its children
//

function onHover(element, is_hovering)
{
	if(element)
	{
		var background_position = is_hovering ? 'left bottom' : 'left top';

		element.style.backgroundPosition = background_position;

		var node = element.firstChild;

		while(node)
		{
			if(node.nodeType === 1)
			{
				node.style.backgroundPosition = background_position;
			}

			node = node.nextSibling;
		}
	}
}

