
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/editionsps/";
	sNonSSLBaseSite = "http://" + "www.minisage.com/editionsps/";
}
else
{
	sNonSSLBaseSite = "http://" + "www.editions-ps.com/";
	
	// live site. If https mode, use safesecureweb address
	if (sHttpPrefix=="https://")
	{
		sBaseSite = sHttpPrefix + "www.editions-ps.com/";
	}
	else
	{
		// non ssl mode, use normal address
		sBaseSite = sHttpPrefix + "www.editions-ps.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="#d2cda1";			// normal (non-hover) background color  
onbgcolor="#d2cda1";			// hover background color  
oncolor="#271f00";				// 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="#d2cda1"; 			// 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="#dfdbb6";		// separator color 
separatorsize="1";
subimage=sBaseSite + "menu/flyoutarrow.gif";
subimagepadding="2";
subimageposition="right";
}
//******************** PUBLISHING ***********************************
with(milonic=new menuname("mmpublishing")){
//alwaysvisible=1;
//followscroll=1;
overflow="scroll";
style=siteMenuStyle;
itemwidth=210;  

top=0;
left=15;
//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
aI("text=Our Mission;url=" + sNonSSLBaseSite + "pages/publishing/publishing_ourmission.asp;");
aI("text=Manuscript Submission;url=" + sNonSSLBaseSite + "pages/publishing/publishing_manuscript.asp;");
aI("text=Review Copies;url=" + sNonSSLBaseSite + "pages/publishing/publishing_reviewcopies.asp;");
aI("text=Rights &amp; Permissions;url=" + sNonSSLBaseSite + "pages/publishing/publishing_permissions.asp;");
}
//******************** ORDER ***********************************
with(milonic=new menuname("mmorder")){
//alwaysvisible=1;
//followscroll=1;
overflow="scroll";
style=siteMenuStyle;
itemwidth=210;  

top=0;
left=15;
//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
aI("text=Order Online;url=" + sNonSSLBaseSite + "pages/order/order_cassius.asp;");
aI("text=Carry Our Books;url=" + sNonSSLBaseSite + "pages/order/order_carryourbooks.asp;");
aI("text=Find Us Near You;url=" + sNonSSLBaseSite + "pages/order/order_findus.asp;");
}

//******************** BOOKS ***********************************
with(milonic=new menuname("mmbooks")){
//alwaysvisible=1;
//followscroll=1;
overflow="scroll";
style=siteMenuStyle;
itemwidth=210;  

top=0;
left=15;
//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
aI("text=Cassius &amp; Claudio;url=" + sNonSSLBaseSite + "pages/books/books_cassius.asp;");
}

//******************** AUTHORS ***********************************
with(milonic=new menuname("mmauthors")){
//alwaysvisible=1;
//followscroll=1;
overflow="scroll";
style=siteMenuStyle;
itemwidth=210;  

top=0;
left=15;
//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
aI("text=Edward David;url=" + sNonSSLBaseSite + "pages/authors/authors_edwarddavid.asp;");
}

//drawMenus();  will do this in main body so we don't lose the page background (milonic bug)

