// JavaScript Document

var timeout	= 750;  //time in milisceonds for menu to remain open after mouse has left active areas 1000=1sec
var closetimer	= 0; //starts close timer at 0 for initial variable
var ddmenuitem	= 0; //Sets ddmenuitem to 0 during initial setup

var mopen_id;

function mopen(id)// open hidden layer
{	
	mcancelclosetime();// cancel close timer
	
	if(ddmenuitem) ddmenuitem.style.display = 'none'; //causes menu item that is cuurrently open to reset visiblity to none
	
	ddmenuitem = document.getElementById(id); //assigns new element to the ddmenuitem variable, based item rollovered
	
	if( typeof(jQuery) == "undefined")
	{
	   Effect.SlideDown(ddmenuitem, {queue: {position:'end', scope: 'openmenu', limit:2 }, duration: .1 }); return false; //Sets up queue to have only one animation of menu droping, scope defines specific queue id, duration is from begining state to complete open DIV state, measured in seconds. Queue settings allow for only two animations to be in que and .
	}
	else
	{
	    mopen_id = id;
	    jQuery('#dropdown1,#dropdown2,#dropdown3,#dropdown4,#dropdown5,#dropdown6,#dropdown7').not('#' + id).slideUp('fast',mopen_id_callback);
	}
}
function mopen_id_callback()
{
    	jQuery('#' + mopen_id).slideDown('fast');
}

function mclose()// close showed layer
{
	if( typeof(jQuery) == "undefined")
	{
	    Effect.SlideUp(ddmenuitem, {queue: {position:'end', scope: 'closemenu', limit:1}, duration: .1 });  //same as the slidedown effect, but takes current open menu, slides up and resets all menus to off
	}
	else
	{
        jQuery(ddmenuitem).slideUp('fast');
	}
	ddmenuitem	= 0;
	mReset();
	
	
}

function mclosetime()// go close timer
{
	closetimer = window.setTimeout(mclose, timeout);
}

function mcancelclosetime()// if mouseover an element with this script the timer is canceled and rested
{
	if(closetimer)
	{
		window.clearTimeout(closetimer);
		closetimer = null;
	}
}

//document.onclick = mclose; //optional component. If the document is clicked outside the menu the menu closes. 



<!--
/**
  * Dual/Tri/Quad state rollovers from www.javascript-fx.com
  * You may use this code on any page but please leave this comment
  * in the code.
  */
var img	= new Array();
var di	= document.images;
var currOn	= null;

function Rollover(imgName, imgOut, imgOver, imgClick, imgClickOut)
{
	if(imgClick    == null)	imgClick 	= imgOver;
	if(imgClickOut == null)	imgClickOut	= imgClick;

	var roll = new Object;

	roll.out	= imgOut;
	roll.over	= new Image();
	roll.over.src	= imgOver;
	roll.click	= new Image();
	roll.click.src	= imgClick;
	roll.click_out	= new Image();
	roll.click_out.src = imgClickOut;

	

	img[imgName] = roll;	
}
function mOver(imgName)
{
	di[imgName].src = (imgName != currOn) ? img[imgName].over.src : img[imgName].click.src;
}
function mOut(imgName)
{
	di[imgName].src = (imgName != currOn) ? img[imgName].out : img[imgName].click_out.src;
}
function mClick(imgName)
{
	if(currOn != null) di[currOn].src = img[currOn].out;
	currOn = imgName;
	di[currOn].src = img[currOn].click.src;
}
function mSelect(imgName)
{
	mClick(imgName);
	mOut(imgName);
}
function mReset()
{
	if(currOn != null) di[currOn].src = img[currOn].out;
	currOn = null;
	}




