
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/nirh/";
	sNonSSLBaseSite = "http://" + "www.minisage.com/nirh/";
}
else
{
	sNonSSLBaseSite = "http://" + "www.nirhealth.org/";
	
	// live site. If https mode, use safesecureweb address
	if (sHttpPrefix=="https://")
	{
		sBaseSite = sHttpPrefix + "www300.safesecureweb.com/nirhealth/";
	}
	else
	{
		// non ssl mode, use normal address
		sBaseSite = sHttpPrefix + "www.nirhealth.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="#682C04";				// normal (non-hover) text color  
offbgcolor="#C9C1B8";			// normal (non-hover) background color  
onbgcolor="#682C04";			// hover background color  
oncolor="#FBB163";				// 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";				// 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="#8579A8"; 			// 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="#000000";		// separator color 
separatorsize="1";
subimage=sBaseSite + "menu/flyoutarrow.gif";
subimagepadding="2";
subimageposition="right";
}
//******************** OUR MISSION ***********************************
with(milonic=new menuname("mmourmission")){
//alwaysvisible=1;
//followscroll=1;
overflow="scroll";
style=siteMenuStyle;
itemwidth=190;  

top=-3;
left=35;
//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
//aI("text=Improving Reproductive Health Care;url=" + sNonSSLBaseSite + "sections/ourmission/ourmission_improving_healthcare.asp;");
aI("text=Changing Public Policy;url=" + sNonSSLBaseSite + "sections/ourmission/ourmission_changing_policy.asp;");
aI("text=Ensuring Access to Quality Care;url=" + sNonSSLBaseSite + "sections/ourmission/ourmission_access_to_contraception.asp;");
aI("text=Shifting Public Attitudes;url=" + sNonSSLBaseSite + "sections/ourmission/ourmission_shifting_attitudes.asp;");
aI("text=Training The Next Generation;url=" + sNonSSLBaseSite + "sections/ourmission/ourmission_training_nextgen.asp;");
}

//******************** HOW TO APPLY ***********************************
with(milonic=new menuname("mmourpartners")){
//alwaysvisible=1;
//followscroll=1;
overflow="scroll";
style=siteMenuStyle;
itemwidth=210;  

top=-3;
left=15;
//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
aI("text=How We Partner;url=" + sNonSSLBaseSite + "sections/howwepartner/howwepartner_howwepartner.asp;");
aI("text=Current/Past Partners;url=" + sNonSSLBaseSite + "sections/howwepartner/howwepartner_currentpast_partners.asp;");
//aI("text=Links To Partners;url=" + sNonSSLBaseSite + "sections/howwepartner/howwepartner_partnerlinks.asp;");
}
//******************** GRANTS IN ACTION ***********************************
with(milonic=new menuname("mmourprograms")){
//alwaysvisible=1;
//followscroll=1;
overflow="scroll";
style=siteMenuStyle;
itemwidth=210;  

top=-3;
left=15;
//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
aI("text=Adolescent Health Care Communication Program;url=" + sNonSSLBaseSite + "sections/ourprograms/ourprograms_adolescent_health.asp;");
aI("text=Contraception Access Program;url=" + sNonSSLBaseSite + "sections/ourprograms/ourprograms_contraceptive_pgm.asp;");
aI("text=Sexuality Education Project;url=" + sNonSSLBaseSite + "sections/ourprograms/ourprograms_sexuality_education.asp;");
aI("text=Abortion Access Program;url=" + sNonSSLBaseSite + "sections/ourprograms/ourprograms_lowincome_access.asp;");
aI("text=The Messaging Project;url=" + sNonSSLBaseSite + "sections/ourprograms/ourprograms_messaging_project.asp;");
aI("text=Urban Initiative For Reproductive Health;url=http://www.urbaninitiative.org/;");
}


//drawMenus();  will do this in main body so we don't lose the page background (milonic bug)


