/*
	$Id: initialise.js 4266 2007-12-17 00:39:30Z mjhorne $
*/

function initialiseFeatureBoxes()
{
	initialiseFeatureBox("featureBox1");
	initialiseFeatureBox("featureBox2");
	initialiseFeatureBox("featureBox3");
	initialiseFeatureBox("featureBox4");
}


function initialiseFeatureBox(id)
{
	var element = document.getElementById(id);
	if(element)
	{	
		var linkPresent = false;
		
		if(element.childNodes)
		{
			for(var i = 0; i < element.childNodes.length; i++)
			{
				if((element.childNodes[i].nodeName == "A") && (element.childNodes[i].className == "feature"))
				{
					linkPresent = true;
					break;
				}
			}
		}

		if(linkPresent)
		{
			element.onmouseover = function()	{
				if(this.className.indexOf("featureBoxRight") > -1)
				{
					this.className = "featureBoxRight featureBoxHover clear";
				}
				else
				{
					this.className = "featureBoxHover clear";
				}
			}

			element.onmouseout = function()	{
				if(this.className.indexOf("featureBoxRight") > -1)
				{
					this.className = "featureBox featureBoxRight clear";
				}
				else
				{
					this.className = "featureBox clear";
				}
			}
		}
	}
}

function feature(url)
{
	document.location = url;
}

