/*
dropdown menus based on son of suckerfish.

Beefed up a little by Grae to allow for multiple suckerfish drop downs within the one page, from one linked javascript.
Checks to ensure presence of element by id before attaching function.
*/

/* #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);
}
//<!-- Power Siphon PSURL: [http://sofoniomd.understandingplasticsurgery.com/js/common.js] / PSCache: [C:\Program Files\Power Siphon\thiswontwork\B6DA9EAF71BF73276F6F.js] / PSTimestamp: [11-03-2007 07:54:12]  --><!-- THIS FILE WAS GENERATED WITH THE FREE TRIAL VERSION OF POWER SIPHON. IT IS A VIOLATION OF THE LICENSE AGREEMENT FOR THESE FILES TO BE DISTRIBUTED TO ANYONE OTHER THAN THE USER WHO DIRECTLY PRODUCED THEM OR FOR COMMERCIAL PURPOSES. IT IS THE RESPONSIBILITY OF THE USER TO OBEY ALL COPYRIGHT LAWS. FAILURE TO DO SO IS ALSO A VIOLATION OF THE LICENSE AGREEMENT. FOR MORE INFORMATION, PLEASE VISIT HTTP://WWW.POWERSIPHON.COM -->