
var bTestSite=false;
var sHttpPrefix="http://";

// establish test vs live site
if ((window.location.toString().toLowerCase().indexOf("minisage.com") > -1) || 
   (window.location.toString().toLowerCase().indexOf("3448aad2388c21be") > -1))  // sitelevel test ID
{
	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=190;				// 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/sif/";
	sNonSSLBaseSite = "http://" + "www.minisage.com/sif/";
}
else
{
	sNonSSLBaseSite = "http://" + "www.seaif.org/";
	
	// live site. If https mode, use safesecureweb address
	if (sHttpPrefix=="https://")
	{
		sBaseSite = sHttpPrefix + "www314.safesecureweb.com/seattleif/";
	}
	else
	{
		// non ssl mode, use normal address
		sBaseSite = sHttpPrefix + "www.seaif.org/";
	}
} 

//****************************************************
// reloadCAPTCHA
//****************************************************
function reloadCAPTCHA() 
{
	document.getElementById('CAPTCHA').src=sBaseSite + 'include/CAPTCHA/CAPTCHA_image.asp?'+Date();
}

//********************
// 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";

// Fix for firefox Mac with Flash
fixMozillaZIndex=true;

// 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=0;            	// Sub menu left offset

// Site Menu Style
with(siteMenuStyle=new mm_style()){
offcolor="#333333";				// normal (non-hover) text color  
offbgcolor="#dfdbb6";			// normal (non-hover) background color  
onbgcolor="#dfdbb6";			// hover background color  
oncolor="#FFFFFF";				// hover text color 
offclass="mmpadding";			// custom style attached to menu
onclass="mmpadding";			// custom style attached to menu
bordercolor="#dfdbb6";			// border color 
borderstyle="solid";
borderwidth=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=2;						// menu item cell padding
pagebgcolor="#dfdbb6"; 			// this is the (non-hover) background color of the menu item last clicked 
pagecolor="#FFFFFF";  			// this is the (non-hover) text color of the menu item last clicked 
separatorcolor="#dfdbb6";		// separator color 
separatorsize="1";
subimage=sBaseSite + "menu/flyoutarrow.gif";
subimagepadding="2";
subimageposition="right";
}
//******************** HOW TO APPLY ***********************************
with(milonic=new menuname("mmhowtoapply")){
//alwaysvisible=1;
//followscroll=1;
overflow="scroll";
style=siteMenuStyle;
itemwidth=165;  

top=0;
left=15;
//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
aI("text=Global Program;url=" + sNonSSLBaseSite + "sections/howtoapply/howtoapply_smallgrants.asp;");
aI("text=Central America Program;url=" + sNonSSLBaseSite + "sections/howtoapply/howtoapply_major_initiatives.asp;");
}
//******************** WHO WE ARE ***********************************
with(milonic=new menuname("mmwhoweare")){
//alwaysvisible=1;
//followscroll=1;
overflow="scroll";
style=siteMenuStyle;
itemwidth=140;  

top=0;
left=15;
//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
aI("text=About Us;url=" + sNonSSLBaseSite + "sections/whoweare/whoweare_aboutus.asp;");
aI("text=Founders;url=" + sNonSSLBaseSite + "sections/whoweare/whoweare_founders.asp;");
aI("text=Board of Directors;url=" + sNonSSLBaseSite + "sections/whoweare/whoweare_board.asp;");
aI("text=Staff;url=" + sNonSSLBaseSite + "sections/whoweare/whoweare_staff.asp;");
}
//******************** WHAT WE SUPPORT ***********************************
with(milonic=new menuname("mmwhatwesupport")){
//alwaysvisible=1;
//followscroll=1;
overflow="scroll";
style=siteMenuStyle;
itemwidth=165;  

top=0;
left=15;
//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
aI("text=Global Program;url=" + sNonSSLBaseSite + "sections/whatwesupport/whatwesupport_global_program.asp;");
aI("text=Central America Program;url=" + sNonSSLBaseSite + "sections/whatwesupport/whatwesupport_central_america_program.asp;");
//aI("text=Theory of Change;url=" + sNonSSLBaseSite + "sections/whatwesupport/whatwesupport_theory_of_change.asp;");
aI("showmenu=SMALLGRANTS;text=Grantees;pointer=default;");
}
	with(milonic=new menuname("GRANTEES")){
	style=siteMenuStyle;
	itemwidth=140;  
	//itemwidth += nSubMenuAdditionalWidthWide;
	aI("text=Major Initiatives;url=" + sNonSSLBaseSite + "sections/whatwesupport/whatwesupport_major_initiatives.asp;");
	aI("showmenu=SMALLGRANTS;text=Small Grants;pointer=default;");
	}
		with(milonic=new menuname("SMALLGRANTS")){
		style=siteMenuStyle;
		itemwidth=140;  
		//itemwidth += nSubMenuAdditionalWidthWide;
		aI("text=2008;url=" + sNonSSLBaseSite + "sections/whatwesupport/whatwesupport_small_grants_2008.asp;");
		aI("text=2009;url=" + sNonSSLBaseSite + "sections/whatwesupport/whatwesupport_small_grants_2009.asp;");
		aI("text=2010;pointer=default;");
		}

//******************** NEWS ***********************************
with(milonic=new menuname("mmnews")){
//alwaysvisible=1;
//followscroll=1;
overflow="scroll";
style=siteMenuStyle;
itemwidth=140;  

top=0;
left=15;
//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
aI("text=Press Releases;url=" + sNonSSLBaseSite + "sections/news/news_pressreleases.asp;");
}
//drawMenus();  will do this in main body so we don't lose the page background (milonic bug)

