//*--------------------------------------------------------------------------
//* This top bit is custom and not part of the standard Milonic Menu System
//*--------------------------------------------------------------------------
// Dynamically get the file name of the displayed page.
// Hence the "file" argument is not needed.
    var homepage = 0; // default to not the home page
	var dir = location.href.substring(0,location.href.lastIndexOf('/')+1);
	var filenm = location.href.substring(dir.length,location.href.length+1);
    urlname = "www.commercedesktop.com"
// Have to use a slightly different page when it's the homepage since the index.html file
// is not in the /html directory.

    if (filenm.substring(0,5) == "index" || filenm == "" || filenm == urlname) homepage = 1;
 	if (homepage) {
 	   imagedir = "images";
 	   htmldir = "content/";
 	}
 	else {
 	   imagedir = "../images";
	   htmldir = "";
	}

//*----------------------------------------------
//*  General Menu Parms
//*----------------------------------------------
_menuCloseDelay=500           // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150            // The time delay before menus open on mouse over
_followSpeed=5                // Follow scrolling speed
_followRate=40                // Follow scrolling Rate
_subOffsetTop=0              // Sub menu top offset
_subOffsetLeft=-4            // Sub menu left offset
_scrollAmount=3               // Only needed for Netscape 4.x
_scrollDelay=20               // Only needed for Netcsape 4.x


//*----------------------------------------------
//*  MENU STYLE for Drop Downs
//*----------------------------------------------
with(menuStyle=new mm_style()){
onbgcolor="#FA5F17";
oncolor="#FFFFFF";
offbgcolor="#FFFFFF";
offcolor="#396375";
bordercolor="#FA5F17";
borderstyle="solid";
borderwidth=1;
separatorcolor="#FFB578";
separatorstyle="dashed";
separatorsize="1";
padding=3;
fontSize="11px";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="#396375";
pagebgcolor="#FFEFDF";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage= imagedir + "/menu-arrow.gif"; 				//*** Note these images are stored in the /images directory.
onsubimage= imagedir + "/menu-arrow-on.gif";
subimagepadding="2";
onsubimagepadding="2";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
outfilter="randomdissolve(duration=0.3)";
}

//*----------------------------------------------
//*  MENU STYLE for POPUPS - PDF
//*----------------------------------------------
with(menuStylePOPUP=new mm_style()){
onbgcolor="#E8EFF5";
oncolor="#000000";
offbgcolor="#E8EFF5";
offcolor="#000000";
bordercolor="#296488";
borderstyle="solid";
borderwidth=1;
separatorcolor="#2D729D";
separatorsize="1";
padding=5;
fontsize="11px";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="black";
pagebgcolor="#82B6D7";
headercolor="#000000";
headerbgcolor="#FFD400";
subimage="arrow.gif";
subimagepadding="2";
overfilter="Fade(duration=0.2);Alpha(opacity=100);Shadow(color='#777777', Direction=135, Strength=5)";
outfilter="randomdissolve(duration=0.3)";
}

//*----------------------------------------------
//*  MENU STYLE for SIDE MENU
//*----------------------------------------------
with(sideMenuStyle=new mm_style()){
onbgcolor="#A4C2D0";
oncolor="#FFFFFF";
offbgcolor="#FFFFFF";
offcolor="#515151";
bordercolor="#5E96AE";
borderstyle="solid";
borderwidth=1;
separatorcolor="#2D729D";
separatorsize="1";
padding=3;
//fontsize="75%";
fontsize="11px";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="black";
pagebgcolor="#F1F4F8";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="arrow.gif";
subimagepadding="2";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
outfilter="randomdissolve(duration=0.3)";
}

//*----------------------------------------------
//*  MENU STYLE for FLOATING "TOP" Link in FAQ
//*----------------------------------------------
with(menuStyleTop=new mm_style()){
onbgcolor="#A4C2D0";
oncolor="#FFFFFF";
offbgcolor="#FFFFFF";
offcolor="#515151";
bordercolor="#DDDDDD";
borderstyle="solid";
borderwidth=1;
separatorcolor="#FFB578";
separatorstyle="solid";
separatorsize="1";
padding=0;
fontSize="8px";
fontstyle="normal";
fontfamily="Arial, Verdana, Tahoma, Arial";
pagecolor="black";
pagebgcolor="#FFEFDF";
}

//*----------------------------------------------
//*  COMMERCE DESKTOP
//*----------------------------------------------
with(milonic=new menuname("cdesk")){
style=menuStyle;menuwidth=167;
//left=-50;
//  alwaysvisible=1;
aI("text=Commerce Desktop;url=" + htmldir + "commercedesktop.jsp;showmenu=cdesksub");
aI("text=Browser Mode;url=" + htmldir +  "browsermode.jsp;");
aI("text=Integrated Mode;url=" + htmldir + "integratedmode.jsp;");
aI("text=FAQ;url=" + htmldir +  "faq.jsp");
aI("text=Demo / Info Request;url=" + htmldir + "reqform.jsp;");
}
//*----------------------------------------------
//*  COMMERCE DESKTOP - SUBMENU
//*----------------------------------------------

with(milonic=new menuname("cdesksub")){
style=menuStyle;
aI("text=Key Features;url=" + htmldir +  "cd-features.jsp;");
aI("text=Services;url=" + htmldir +  "cd-services.jsp;");
aI("text=How We're Priced;url=" + htmldir +  "cd-pricing.jsp");
}
//*----------------------------------------------
//*  CONNECTIONS
//*----------------------------------------------
with(milonic=new menuname("conn")){
style=menuStyle; itemwidth=180;
//left=-30;
aI("text=View over 225 companies connected to Commerce&nbsp;Desktop;url=" + htmldir +  "connections.jsp;");
}

//*----------------------------------------------
//*  COMPANY
//*----------------------------------------------
with(milonic=new menuname("comp")){
style=menuStyle;menuwidth=102;
//left=-30;
aI("text=Contact Us;url=" + htmldir +  "contact.jsp;");
aI("text=Testimonials;url=" + htmldir +  "testimonials.jsp;");
aI("text=Partner Program;url=" + htmldir +  "partners.jsp;");
}

//*----------------------------------------------
//*  POPUP Box for PDF Icon
//*----------------------------------------------
with(milonic=new menuname("pdfhelp")){
style=menuStylePOPUP; left=32; itemwidth=232; top=-170;
aI("text=<img src='../images/pdficonsmall.gif' width=15 height=16 border=0 align='absmiddle'> <b>About PDF Files</b>;type=header;align=center;");
aI("text=To download PDF files to your hard disk for <b>offline viewing</b>, right-click on the link, then select \"Save Target As...\" from the pop-up menu. To view the PDF in a new browser window, just click on the link.");
aI("text=Adobe Acrobat Reader is required to view the Portable Document Format (PDF) files found on this web site.<br><br>Download the latest free version of Acrobat Reader by clicking the button below:");
aI("text=<center><img src='../images/getacrobat.gif' width=88 height=31 border=0 align='absmiddle' alt='Get Acrobat Reader'></center>;url=http://www.adobe.com/products/acrobat/readstep.html;target=_new");
}

//*----------------------------------------------
//*  POPUP Box for Privacy Policy
//*----------------------------------------------
with(milonic=new menuname("Privacy")){
style=menuStylePOPUP; left=-212; itemwidth=200; top=-160;
aI("text=<b>Privacy Policy</b>;type=header;align=center;");
aI("text=We will never share, sell, or rent your personal information with anyone. Information submitted to us is only available to our employees for the purpose of contacting you or sending you emails related to Commerce Desktop.");
}

//*----------------------------------------------
//*  Top of Page Floating Menu for FAQ page
//*----------------------------------------------
if (filenm == "faq.jsp") {
	with(milonic=new menuname("top")){
	style=menuStyleTop;
	menuwidth=10;
	itemheight=6;
	left="offset=185";
	screenposition="bottom, center";
	top="offset=-50";
	followscroll=1;
	alwaysvisible=1;
	orientation="horizontal";
	aI("text=&nbsp;Top of Page&nbsp;url=#top");
	}
}
drawMenus();
