/*
Filename: pulldown_menus.js
Desc:     Pulldown menu definitions for GACC
Author:   Relevant Arts Enterprise, Inc. <http://www.relevantarts.com/>
          John A. Lock <jlock@relevantarts.com>
Created:  2004-July-08
Modified: 
*/

_menuCloseDelay=500;           // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150;            // The time delay before menus open on mouse over
_followSpeed=5;                // Follow scrolling speed
_followRate=40;                // Follow scrolling Rate
_subOffsetTop=10;             // Sub menu top offset
_subOffsetLeft=-10;            // Sub menu left offset
_scrollAmount=3;               // Only needed for Netscape 4.x
_scrollDelay=20;               // Only needed for Netcsape 4.x

// Set some default values
var RealWidth = 0;
var aboutX = 0;
var programsX = 0;
var childlawX = 0;
var commonY = 0;

// If it's the admin pages, set Y to correct position
if (location.pathname.indexOf("/admin") != -1) {
	commonY = 144;
}
// If it's the home page, set Y to correct position
else {
	if ((location.pathname.indexOf("index.php") != -1) ||
			(location.pathname.indexOf("contact.php") != -1) || 
			(location.pathname.indexOf("contact_ack.html") != -1) || 
			(location.pathname.indexOf("sitemap.html") != -1) || 
			(location.pathname.length < 8)) {
		commonY = 197;
	}
	// Otherwise, set Y for the rest of the pages
	else {
		commonY = 144;
	}
}

// Get the actual window width depending on browser
(navigator.appName.indexOf("Netscape") != -1) ? RealWidth = window.innerWidth + 4 : RealWidth = document.body.scrollWidth;

// Recalculate the menu horizontal positions corrected for window width
aboutX = ((RealWidth - 746) / 2);
if (aboutX < 3) { aboutX = 0 }

programsX = aboutX + 182;
childlawX = programsX + 181;
memberX = childlawX + 181;

with(AboutStyle=new mm_style()) {
onbgcolor="#CE65FF";
oncolor="#FFFFFF";
offbgcolor="#CE9AFF";
offcolor="#000000";
// separatorsize=1;
// separatorcolor="#7c7c7c";
// borderwidth=1;
// bordercolor="#000000";
padding=2;
fontsize="12";
fontstyle="normal";
fontweight="bold";
fontfamily="Verdana,Helvetic,sans-serif";
//overfilter="Alpha(style=0,opacity=85)";
}

with(ProgramsStyle=new mm_style()) {
onbgcolor="#01CFCD";
oncolor="#FFFFFF";
offbgcolor="#009F9C";
offcolor="#000000";
// separatorsize=1;
// separatorcolor="#7c7c7c";
// borderwidth=1;
// bordercolor="#000000";
padding=2;
fontsize="12";
fontstyle="normal";
fontweight="bold";
fontfamily="Verdana,Helvetic,sans-serif";
//overfilter="Alpha(style=0,opacity=85)";
}

with(ChildlawStyle=new mm_style()) {
onbgcolor="#0263D1";
oncolor="#FFFFFF";
offbgcolor="#649BFD";
offcolor="#000000";
// separatorsize=1;
// separatorcolor="#7c7c7c";
// borderwidth=1;
// bordercolor="#000000";
padding=2;
fontsize="12";
fontstyle="normal";
fontweight="bold";
fontfamily="Verdana,Helvetic,sans-serif";
//overfilter="Alpha(style=0,opacity=85)";
}

with(MemberStyle=new mm_style()) {
onbgcolor="#FE6501";
oncolor="#FFFFFF";
offbgcolor="#FF9A32";
offcolor="#000000";
// separatorsize=1;
// separatorcolor="#7c7c7c";
// borderwidth=1;
// bordercolor="#000000";
padding=2;
fontsize="12";
fontstyle="normal";
fontweight="bold";
fontfamily="Verdana,Helvetic,sans-serif";
//overfilter="Alpha(style=0,opacity=85)";
}

with(milonic=new menuname("about")) {
style=AboutStyle;
top=commonY;
left=aboutX;
itemwidth=182;
aI("text=Purpose and Mission;url=mission.html;");
aI("text=Board of Directors;url=directors.html;");
aI("text=Collaboration;url=collaboration.html;");
aI("text=NACC Affiliation;url=affiliation.html;");
aI("text=Membership;url=membership.html;");
aI("text=Join GACC;url=join.html;");
aI("text=GACC Member Search;url=search.php;");
aI("text=Contact GACC;url=contact.php;");
aI("text=Home;url=index.php;");
}

with(milonic=new menuname("programs")) {
style=ProgramsStyle;
top=commonY;
left=programsX;
itemwidth=181;
aI("text=Overview;url=nacc_programs.html;");
aI("text=Publications;url=nacc_pubs.html;");
aI("text=Certification;url=certification.html;");
aI("text=Affiliates;url=nacc_affiliates.html;");
}

with(milonic=new menuname("childlaw")) {
style=ChildlawStyle;
top=commonY;
left=childlawX;
itemwidth=181;
aI("text=Overview;url=child_law_resources.html;");
aI("text=News & Events;url=news.html;");
aI("text=Other Training and Conferences;url=conferences.html;");
aI("text=Children and the Law;url=child_law_links.html;");
aI("text=GACC Member Search;url=search.php;");
}

with(milonic=new menuname("members")) {
style=MemberStyle;
top=commonY;
left=memberX;
itemwidth=182;
aI("text=<em>(Password Required)</em>;");
aI("text=Publications;url=members/publications.html;");
aI("text=Appellate Law;url=members/appellatelaw.html;");
aI("text=Legislative Updates;url=members/legis_updates.html;");
aI("text=Practice Standards;url=members/standards.html;");
aI("text=Deprivation Trial Manual;url=members/trialmanual3index.html;");
aI("text=Documents;url=members/documents.html;");
}

drawMenus();
