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 + "bf.minisage.com/";
	sNonSSLBaseSite = "http://" + "bf.minisage.com/";
}
else
{
	sNonSSLBaseSite = "http://" + "www.barefootfoundation.com/";
	
	// live site. If https mode, use safesecureweb address
	if (sHttpPrefix=="https://")
	{
		sBaseSite = sHttpPrefix + "www.barefootfoundation.com/";  
	}
	else
	{
		// non ssl mode, use normal address
		sBaseSite = sHttpPrefix + "www.barefootfoundation.com/";
	}
} 

// 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_en.php";

// Set default locations for flyout menu
var nflyout_top = 7;   // -5
var nflyout_left = -5;  //0




//********************
// 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=5;            	// Sub menu left offset

// MAIN STYLE
with(mainMenuStyle=new mm_style()){
onbgcolor="#bcb294";			// hover background color  // 6E5F3F 
offbgcolor="#bcb294";			// normal (non-hover) background color  #D2B48C
offcolor="#2b2b2b";				// normal (non-hover) text color  
oncolor="#FFFFFF";				// hover text color  
offclass="mmpadding";			// custom style attached to menu
onclass="mmpadding";			// custom style attached to menu
bordercolor="#bcb294";			// 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=95);";
//overfilter="Fade(duration=0.1);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
padding=3;						// menu item cell padding
pagebgcolor="#bcb294"; 			// this is the (non-hover) background color of the menu item last clicked #D2B48C
pagecolor="#FFFFFF";  			// this is the (non-hover) text color of the menu item last clicked 
separatorcolor="#bcb294";		// separator color #D2B48C
separatorsize="1";
subimage=sBaseSite + "graphics/common/flyoutarrow.gif";
subimagepadding="2";
subimageposition="right";
}

//******************** 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=staff;url=" + sNonSSLBaseSite + "pages/about/about_staff_en.php;");
aI("text=board;url=" + sNonSSLBaseSite + "pages/about/about_board_en.php;");
aI("text=our founder;url=" + sNonSSLBaseSite + "pages/about/about_founder_en.php;");
aI("text=mission &amp; history;url=" + sNonSSLBaseSite + "pages/about/about_mission_en.php;");
}
	
//******************** 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=the issues;url=" + sNonSSLBaseSite + "pages/whatwedo/whatwedo_issues_en.php;");
aI("text=programs;url=" + sNonSSLBaseSite + "pages/whatwedo/whatwedo_programs_en.php;");
aI("text=projects;url=" + sNonSSLBaseSite + "pages/whatwedo/whatwedo_projects_main_en.php;");
aI("text=success stories;url=" + sNonSSLBaseSite + "pages/whatwedo/whatwedo_success_stories_en.php;");
aI("text=photos;url=" + sNonSSLBaseSite + "pages/whatwedo/whatwedo_photos_en.php;");
}
	
//******************** HOW YOU CAN HELP ***********************************
with(milonic=new menuname("mm_howhelp")){
//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=join;url=" + sNonSSLBaseSite + "pages/howhelp/howhelp_join_en.php;");
aI("showmenu=HOWHELP_SPONSORACHILD;text=sponsor a child;url=" + sNonSSLBaseSite + "pages/howhelp/howhelp_sponsor_child_en.php;");
aI("text=donate;url=" + sNonSSLBaseSite + "pages/howhelp/howhelp_donate_en.php;");
aI("text=spread the word;url=" + sNonSSLBaseSite + "pages/howhelp/howhelp_spreadword_en.php;");
aI("text=corporate sponsorship;url=" + sNonSSLBaseSite + "pages/howhelp/howhelp_corporate_sponsorship_en.php;");
aI("text=volunteer;url=" + sNonSSLBaseSite + "pages/howhelp/howhelp_volunteer_en.php;");
aI("text=shop;url=" + sNonSSLBaseSite + "pages/howhelp/howhelp_shop_en.php;");

}
	with(milonic=new menuname("HOWHELP_SPONSORACHILD")){
	style=mainMenuStyle;
	//itemwidth += nSubMenuAdditionalWidthWide;
	aI("text=sponsored children;url=" + sNonSSLBaseSite + "pages/howhelp/howhelp_sponsored_children_en.php;");
	}
	
//******************** PARTNERSHIPS ***********************************
with(milonic=new menuname("mm_partnerships")){
//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=recommended organizations;url=" + sNonSSLBaseSite + "pages/partnerships/partnerships_organizations_en.php;");
aI("text=our sponsors;url=" + sNonSSLBaseSite + "pages/partnerships/partnerships_sponsors_en.php;");
}

//******************** NEWS ***********************************
//with(milonic=new menuname("mm_news")){
//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("showmenu=NEWS_EVENTS;text=events;url=" + sNonSSLBaseSite + "pages/news/news_events_en.php;");
//aI("text=press releases;url=" + sNonSSLBaseSite + "pages/news/news_press_releases_en.php;");
//}
	//with(milonic=new menuname("NEWS_EVENTS")){
	//style=mainMenuStyle;
	//itemwidth += nSubMenuAdditionalWidthWide;
	//aI("text=email event to a friend;url=" + sNonSSLBaseSite + "pages/news/news_events_email_en.php;");
	//}

//drawMenus();  will do this in main body so we don't lose the page background (milonic bug)

