fixMozillaZIndex=false; //Fixes Z-Index problem  with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps

var bTestSite=false;
var sHttpPrefix="http://";

// establish test vs live site
if (window.location.toString().toLowerCase().indexOf("minisage.com") > -1)
{
	bTestSite=true;
}
// establish http vs https
if (window.location.toString().toLowerCase().indexOf("https") > -1)
{
	sHttpPrefix = "https://";
}

var nSubMenuAdditionalWidthMedium = 150;   	//mfindlay
var nSubMenuAdditionalWidthWide = 200;    	//mfindlay

var nMenuWidth=200;				// width of menus to appear. Set to zero to ignore
var sBaseSite="";
var sNonSSLBaseSite="";

// If test site, just use 1 base site
if (bTestSite) 
{
	sBaseSite = sHttpPrefix + "www.minisage.com/gp/";
	sNonSSLBaseSite = "http://" + "www.minisage.com/gp/";
}
else
{
	sNonSSLBaseSite = "http://" + "www.globalpartnerships.org/";
	
	// live site. If https mode, use safesecureweb address
	if (sHttpPrefix=="https://")
	{
		sBaseSite = sHttpPrefix + "www.globalpartnerships.org/";  
	}
	else
	{
		// non ssl mode, use normal address
		sBaseSite = sHttpPrefix + "www.globalpartnerships.org/";
	}
} 

// set home page identifier, necessary to set the 'left' offset for the flyout between
// the home page and all internal pages
var sHomePage = sBaseSite + "index.asp";

// Set default locations for flyout menu
var nflyout_top = -1;   // -18
var nflyout_left = 15;  //185


// override for mac ie
if (browser.isMac && browser.isIE)
{
	nflyout_top -= 6;
	nflyout_left -= 30;
}



//********************
// TD Top nav onclick
//********************
function NavigateTo(sTarget)
{
	//window.location.href = sBaseSite + sTarget;
	window.location.href = sNonSSLBaseSite + sTarget;
	return true;
}


//var submenuTopOffset = "offset=5";  see iym for reference use in submenu flyouts
//var submenuLeftOffset = "offset=1";

// milonic
_menuCloseDelay=250;           	// The time delay for menus to remain visible on mouse out
_menuOpenDelay=50;             	// The time delay before menus open on mouse over
_subOffsetTop=4;             	// Sub menu top offset from bottom of image associated with it
_subOffsetLeft=-4;            	// Sub menu left offset

// MAIN STYLE
with(mainMenuStyle=new mm_style()){
onbgcolor="#855E42";			// hover background color 
offbgcolor="#B59973";			// normal (non-hover) background color  
offcolor="#ffffff";				// normal (non-hover) text color  333333
oncolor="#FFFFFF";				// hover text color  
//offclass="mmpadding";			// custom style attached to menu
//onclass="mmpadding";			// custom style attached to menu
bordercolor="#855E42";			// border color #B59973
borderstyle="solid";
borderwidth=2;			//1
fontfamily="Arial";				// font / font family
fontsize="11px";				// font size
fontstyle="normal";				// font style   
fontweight="bold";				// font weight (bold)   
//outfilter="Fade(duration=0.1)";
overfilter="Fade(duration=0.1);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
padding=3;						// menu item cell padding
pagebgcolor="#855E42"; 			// this is the (non-hover) background color of the menu item last clicked #B59973
pagecolor="#FFFFFF";  			// this is the (non-hover) text color of the menu item last clicked 
separatorcolor="#B59973";		// separator color #D2B48C
separatorsize="1";
subimage=sBaseSite + "graphics/common/flyoutarrow.gif";
subimagepadding="2";
}
//******************** ABOUT US ***********************************
with(milonic=new menuname("mm_aboutus")){
//alwaysvisible=1;
//followscroll=1;
//overflow="scroll";  // Do not use scrollbars on this flyout since it can be so close to bottom of page
style=mainMenuStyle;
itemwidth=200;  
top=nflyout_top;
left=nflyout_left;

//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
aI("text=mission;url=" + sNonSSLBaseSite + "sections/aboutus/aboutus_mission.htm;");
aI("text=fast facts;url=" + sNonSSLBaseSite + "sections/aboutus/aboutus_facts.htm;");
aI("text=staff;url=" + sNonSSLBaseSite + "sections/aboutus/aboutus_staff.htm;");
aI("text=board;url=" + sNonSSLBaseSite + "sections/aboutus/aboutus_board.htm;");
aI("text=contact us;url=" + sNonSSLBaseSite + "sections/aboutus/aboutus_contact.htm;");
//aI("text=strategy;url=" + sNonSSLBaseSite + "sections/aboutus/aboutus_strategy.htm;");
}

//******************** WHAT WE DO ***********************************
with(milonic=new menuname("mm_whatwedo")){
//alwaysvisible=1;
//followscroll=1;
//overflow="scroll";  // Do not use scrollbars on this flyout since it can be so close to bottom of page
style=mainMenuStyle;
itemwidth=200;  
top=nflyout_top;
left=nflyout_left;

//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
aI("text=our strategy;url=" + sNonSSLBaseSite + "sections/what/what_strategy.htm;");
aI("text=social investment model;url=" + sNonSSLBaseSite + "sections/what/what_investment_model.htm;");
aI("text=beyond microfinance;url=" + sNonSSLBaseSite + "sections/what/what_beyond_microfinance.htm;");
}

//******************** OUR PARTNERS ***********************************
with(milonic=new menuname("mm_ourpartners")){
//alwaysvisible=1;
//followscroll=1;
//overflow="scroll";  // Do not use scrollbars on this flyout since it can be so close to bottom of page
style=mainMenuStyle;
itemwidth=200;  
top=nflyout_top;
left=nflyout_left;

//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
aI("text=our partners;url=" + sNonSSLBaseSite + "sections/ourpartners/ourpartners_interactive_map.asp;");
}

//******************** OUR IMPACT ***********************************
with(milonic=new menuname("mm_impact")){
//alwaysvisible=1;
//followscroll=1;
//overflow="scroll";  // Do not use scrollbars on this flyout since it can be so close to bottom of page
style=mainMenuStyle;
itemwidth=200;  

top=nflyout_top;
left=nflyout_left;
//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
aI("text=results;url=" + sNonSSLBaseSite + "sections/impact/impact_results.htm;");
aI("text=success stories;url=" + sNonSSLBaseSite + "sections/impact/impact_success_stories.htm;");
aI("text=videos;url=" + sNonSSLBaseSite + "sections/impact/impact_videos.htm;");
}

	
//******************** News & Information ***********************************
with(milonic=new menuname("mm_newsinfo")){
//alwaysvisible=1;
//followscroll=1;
//overflow="scroll";  // Do not use scrollbars on this flyout since it can be so close to bottom of page
style=mainMenuStyle;
itemwidth=200;  

top=nflyout_top;
left=nflyout_left;
//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
	aI("text=overview;url=" + sNonSSLBaseSite + "sections/newsinfo/newsinfo_information_center.htm;");
	aI("text=newsletters;url=" + sNonSSLBaseSite + "sections/newsinfo/newsinfo_newsletters.htm;");
	aI("text=news releases;url=" + sNonSSLBaseSite + "sections/newsinfo/newsinfo_news_releases.htm;");
	aI("text=in the news;url=" + sNonSSLBaseSite + "sections/newsinfo/newsinfo_news_articles.htm;");
	aI("text=annual report;url=" + sNonSSLBaseSite + "sections/newsinfo/newsinfo_annual_report.htm;");
	//aI("text=videos;url=" + sNonSSLBaseSite + "sections/newsinfo/newsinfo_videos.htm;");
	aI("text=FAQs;url=" + sNonSSLBaseSite + "sections/newsinfo/newsinfo_faq.htm;");
}
	
	
//******************** GET INVOLVED ***********************************
with(milonic=new menuname("mm_getinvolved")){
//alwaysvisible=1;
//followscroll=1;
//overflow="scroll";  // Do not use scrollbars on this flyout since it can be so close to bottom of page
style=mainMenuStyle;
itemwidth=200;  

top=nflyout_top;
left=nflyout_left;

aI("text=overview;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_overview.htm;");
aI("text=donate;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_donate.htm;");
aI("text=come to an event;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_events.htm;");
aI("text=Business of Hope Luncheon;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_boh.htm;");
aI("text=travel with us;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_partnertrips.htm;");
aI("text=volunteer;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_volunteer.htm;");
aI("text=work for us;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_employment.htm;");
aI("text=buy our coffee;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_opportunityblend.htm;");
aI("text=corporate partners;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_corporate_partners.htm;");
//aI("showmenu=boh;text=business of hope luncheon;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_boh.htm;");
aI("text=stay connected;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_signup.asp;");
}

	with(milonic=new menuname("boh")){
	style=mainMenuStyle;
	itemwidth += nSubMenuAdditionalWidthWide;
	//aI("text=register;url=" + "https://dnbweb1.blackbaud.com/OPXREPHIL/EventDetail.asp?cguid=5CA424AE-6F8D-449E-8DAF-5D31511AC5A6&eid=16440;");
	aI("text=business of hope luncheon;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_boh.htm;");
aI("target=_blank;text=special guest;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_boh_borrower10.htm;");
aI("text=table captains;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_boh_table_captains.htm;");
aI("text=corporate partners;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_corporate_partners.htm");
aI("text=event committee;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_boh_host_committee.htm");
	/*
	aI("text=register;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_boh_register.htm;");
	aI("text=volunteer;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_boh_volunteer.htm;");
	aI("text=2007 highlights;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_boh_2007_highlights.htm;");
	aI("text=directions/parking;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_boh_directions.htm;");
	*/
	}
	with(milonic=new menuname("partnertrips")){
	style=mainMenuStyle;
	itemwidth += nSubMenuAdditionalWidthWide;
	aI("text=partnertrips;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_partnertrips.htm;");
	aI("text=travelogue;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_partnertrip_travelogue.htm;");
	aI("text=testimonials;url=" + sNonSSLBaseSite + "sections/getinvolved/getinvolved_partnertrips_testimonials.htm;");
	}
//drawMenus();  will do this in main body so we don't lose the page background (milonic bug)


