/* #nav dropdown */
function dropDownNav()
{
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++)
	{
		sfEls[i].onmouseover=function()
		{
			this.className+=" sfhover";
			this.style.zIndex=200;
		}
		sfEls[i].onmouseout=function()
		{
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

/* #navFeature dropdown */
function dropDownNavFeature()
{
	var sfEls = document.getElementById("navFeature").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++)
	{
		sfEls[i].onmouseover=function()
		{
			this.className+=" sfhover";
			this.style.zIndex=100;
		}
		sfEls[i].onmouseout=function()
		{
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

/* #navGallery dropdown */
function dropDownNavGallery()
{
	var sfEls = document.getElementById("navGallery").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++)
	{
		sfEls[i].onmouseover=function()
		{
			this.className+=" sfhover";
			this.style.zIndex=100;
		}
		sfEls[i].onmouseout=function()
		{
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

/* Check for elements to attach drop down functions to */
function elementChecker()
{
	/* check for main nav */
	if (document.getElementById('nav') != null)
	{
		dropDownNav();
	}

	/* check for feature navigation */
	if (document.getElementById('navFeature') != null)
	{
		dropDownNavFeature();
	}

	/* check for gallery navigation */
	if (document.getElementById('navGallery') != null)
	{
		dropDownNavGallery();
	}
}

/* onload run element checker function */
if (window.attachEvent)
{
	window.attachEvent("onload", elementChecker);
}


function displayPrintVersion() {
	var c=document.createElement('link');
	c.type='text/css';
	c.rel='stylesheet';
	c.href='fileadmin/templates/css/print-standard_sms.css';
	void(document.getElementsByTagName('head')[0].appendChild(c));
	window.scrollTo(0, 0);
}

