/*Copyright(c) 2007 Daniel Lear all Rights Reservedlear@flamingpoodle.com.auPermission is hereby granted by the author and owner that this script may be modified and used for any purpose that Hawaii Online Services LLC have on their owned websitesThis copyright should remain*//*	Description:		This is a fix for IE5 and IE6. This is only needed for Multiple Dropdown menus that use unordered lists		To use insert the following in the HTML header:<!--[if lt IE 7]><script language='JavaScript' type='text/javascript' src='js/my-DDmenu.js'></script><![endif]-->	Requirements:		IE detection in js/default.js		Put following in header before other scripts:			<script language='JavaScript' type='text/javascript' src='js/my-default.js'></script>	usage:		put afetr above:			<!--[if lt IE 7]><script language='JavaScript' type='text/javascript' src='js/my-DDmenu.js'></script><![endif]-->		put this in html directly AFTER UL menu with id in this case of "menu_id":			<!—- after ul menu -->			<!--[if lt IE 7]>			<script language='JavaScript' type='text/javascript'> 			my_multi_menu.register("menu_id",IE.major_version)			</script>			<![endif]-->*/var my_multi_menu ={	ie : -1,	main_z : 0,	z_1 : 0,	z_2 : 0,	x: 0,	y: 0,	width: 0,	height: 0,	depth_widths : [],	depth_heights : [],	depths_to_skip : [],	depth_margin_lefts : [],	x_accum: 0,	y_accum_1 : 0,	y_accum_2 : 0,	register: function( menu_id, ie_major_version, settings )	{//		if(ie_major_version != 5 && ie_major_version != 6) return;		this.ie = ie_major_version		this._setup_vars(settings)		this._burrow( document.getElementById(menu_id), 0 )	},	_setup_vars: function(vars)	{		if(typeof vars !='undefined')		{			if(typeof vars.x !='undefined') this.main_z = vars.z			if(typeof vars.x !='undefined') this.x = vars.x			if(typeof vars.y !='undefined') this.y = vars.y			if(typeof vars.width !='undefined') this.width = vars.width			if(typeof vars.height !='undefined') this.height = vars.height			if(typeof vars.depths_to_skip !='undefined') this.depths_to_skip = vars.depths_to_skip			if(typeof vars.depth_widths !='undefined') this.depth_widths = vars.depth_widths			if(typeof vars.depth_heights !='undefined') this.depth_heights = vars.depth_heights			if(typeof vars.depth_margin_lefts !='undefined') this.depth_margin_lefts = vars.depth_margin_lefts		}		this.z_2 = 1	},	_burrow: function( node, depth )	{		if(this.depths_to_skip[depth]) return;		var width = (typeof this.depth_widths[depth] =='number') ? this.depth_widths[depth] : this.width ;		var height = (typeof this.depth_heights[depth] =='number') ? this.depth_heights[depth] : this.height ;		var margin_left = (typeof this.depth_margin_lefts[depth] =='number') ? this.depth_margin_lefts[depth] : 0 ;			switch(node.nodeName)			{				case "LI": case "UL": case "A":					node.style.position = 'absolute'					node.style.top = '0px'					node.style.left = margin_left+'px'					node.style.width = width+'px';					node.style.height = height+'px';					break				default:					return;			}		switch( depth )// assign by current depth		{			case 0:// top level UL				switch(node.nodeName)				{					case "UL":// 1st level Block						this.x_accum = 0						node.style.display = 'block'						node.style.left = (margin_left+this.x)+'px'						node.style.top = this.y+'px'						node.style.zIndex = this.main_z						break				}				break			case 1:				switch( node.nodeName )				{					case "LI": // main menu item						//this.y_accum_1 = parseInt( node.style.height.replace(/px/,'') )						node.style.left = this.x_accum+'px'						this.x_accum += margin_left+width						this.y_accum_1 = 0						//alert('node.style.left = '+node.style.left)						this._create_events_for_LI(node)						this.z_1 = 1000						break				}				break			case 2:				switch(node.nodeName)				{					case "A": // main menu Link						this.y_accum_1 += height						break					case "UL": // 2nd level Block						node.style.display = 'none'						//node.style.top = height+'px'						break				}				break			case 3:				switch(node.nodeName)				{					case "LI": // 2nd level items						node.style.top = this.y_accum_1+'px'						this.y_accum_1 += height						node.style.zIndex = this.z_1--						this._create_events_for_LI(node)						break				}				break			case 4:				switch(node.nodeName)				{					case"A": // 2nd level Link						break					case "UL": // 3rd level Block						node.style.display = 'none'						node.style.left = (margin_left+width)+'px'						node.style.top = 3+'px'						this.y_accum_2 = 0						break				}				break			case 5:				switch(node.nodeName)				{					case "LI": // 3rd level items						node.style.top = this.y_accum_2+'px'						this.y_accum_2 += height						break				}				break			case 6:				switch(node.nodeName)				{					case "A": // 3rd level Link						return;				}				break		}		depth++		for(var i=0; i<node.childNodes.length; i++)			switch(node.childNodes[i].nodeName)			{				case "UL": case "LI": case "A":					this._burrow(node.childNodes[i], depth)			}	},	_create_events_for_LI: function(node)	{		node.onmouseover = function()		{			for(var i=0; i<this.childNodes.length; i++)				if(this.childNodes[i].nodeName=="UL") this.childNodes[i].style.display = 'block'		}		node.onmouseout = function()		{			for(var i=0; i<this.childNodes.length; i++)				if(this.childNodes[i].nodeName=="UL") this.childNodes[i].style.display = 'none'		}	}}