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=142;				// 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/gpg/";
	sNonSSLBaseSite = "http://" + "www.minisage.com/gpg/";
}
else
{
	sNonSSLBaseSite = "http://" + "www.globalphilanthropy.com/";
	
	// live site. If https mode, use safesecureweb address
	if (sHttpPrefix=="https://")
	{
		sBaseSite = sHttpPrefix + "www.globalphilanthropy.com/";
	}
	else
	{
		// non ssl mode, use normal address
		sBaseSite = sHttpPrefix + "www.globalphilanthropy.com/";
	}
} 

//****************************************************
// 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="#c1d6dd";			// normal (non-hover) background color  
onbgcolor="#92b7c3";			// hover background color  
oncolor="#333333";				// hover text color 
offclass="mmpadding";			// custom style attached to menu
onclass="mmpadding";			// custom style attached to menu
bordercolor="#A89C91";			// border color 
borderstyle="solid";
borderwidth=1;
fontfamily="Arial,Verdana,sans-serif";				// 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="#c1d6dd"; 			// this is the (non-hover) background color of the menu item last clicked 
pagecolor="#333333";  			// this is the (non-hover) text color of the menu item last clicked 
separatorcolor="#FFFFFF";		// separator color 
separatorsize="1";
subimage=sBaseSite + "menu/flyoutarrow.gif";
subimagepadding="2";
subimageposition="right";
}
//******************** News & Info ***********************************
with(milonic=new menuname("mmNewsInfo")){
//alwaysvisible=1;
//followscroll=1;
overflow="scroll";
style=siteMenuStyle;
itemwidth=142;  

top=0;
left=15;
//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
aI("text=GPG in the news;url=" + sNonSSLBaseSite + "pages/newsinfo/newsinfo_gpginthenews.asp;");
aI("text=Watch &quot;Giving&quot;url=" + sNonSSLBaseSite + "pages/newsinfo/newsinfo_watchgiving.asp;");
aI("target=_blank;text=Giving Beast;url=http://www.thedailybeast.com/newsmaker/giving-beast?cid=hp:featureline;");
aI("text=Barron's Top Givers;url=" + sNonSSLBaseSite + "pages/newsinfo/barrons_top_givers.asp;");
//aI("text=Media;url=" + sNonSSLBaseSite + "pages/newsinfo/newsinfo_media.asp;");
}

//drawMenus();  will do this in main body so we don't lose the page background (milonic bug)

