// Because this menu is linked to from 3rd party sites, such as Peopleclick, we sometimes
// need full pathing to resolve back to www.worlpac.com.
// However, we want to use relative pathing if we're on www.worldpac.com, or staging.worldpac.com
// To solve this we do a regexp on the host. If we're on a 3rd party site, we append a full
// base URL to the paths.  If it's a worldpac.com domain, we wipe out the base variable so
// all paths turn relative
var	host = window.location.host;
var base = "http://www.worldpac.com";
wpacHost = new RegExp("[.+]worldpac\.com");
if(wpacHost.test(host)) base = "";
// base can now be appended to any URL for accurate pathing

_menuCloseDelay=400           // The time delay for menus to remain visible on mouse out
_menuOpenDelay=0            // 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=0            // Sub menu left offset
_scrollAmount=3               // Only needed for Netscape 4.x
_scrollDelay=20               // Only needed for Netcsape 4.x

with(mainStyle=new mm_style()){
	margin=17;
	offbgcolor="#F7F7F7";
	offcolor="#666";
	onbgcolor="#F7F7F7";
	oncolor="#FF0000";
	//separatorcolor="#F7F7F7";
	//separatorsize="3";
	padding=3;
	fontsize="10px";
	fontstyle="normal";
	fontfamily="Arial";
	fontweight="normal";
	//itemwidth="132px";
	//bordercolor="#296488";
	//borderstyle="solid";
	//borderwidth=1;
	//subimage="images/nav_arrow.gif";
	//subimagepadding="0";
	//image="images/dotted_arrow.gif";
	//imagepadding="6";
	//overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
	//outfilter="randomdissolve(duration=0.3)";
}

with(subStyle=new mm_style()){
	margin=0;
	offbgcolor="#F7F7F7";
	offcolor="#666";
	onbgcolor="#e4e5e6";
	oncolor="#FF0000";
	//separatorcolor="#CED2D7";
	//separatorsize=1;
	padding=6;
	fontsize="10px";
	fontstyle="normal";
	fontfamily="Arial";
	fontweight="normal";
	itemwidth="170px";
	bordercolor="#296488";
	borderstyle="solid";
	borderwidth=1;
	
	overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
	outfilter="randomdissolve(duration=0.3)";
}

with(subChildStyle=new mm_style()){
	margin=0;
	offbgcolor="#F7F7F7";
	offcolor="#666";
	onbgcolor="#e4e5e6";
	oncolor="#FF0000";
	//separatorcolor="#CED2D7";
	//separatorsize=1;
	padding=6;
	fontsize="10px";
	fontstyle="normal";
	fontfamily="Arial";
	fontweight="normal";
	itemwidth="170px";
	bordercolor="#296488";
	borderstyle="solid";
	borderwidth=1;
	overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
	outfilter="randomdissolve(duration=0.3)";
	//image="images/menu_sd.gif";
	//imagepadding=3;
}

with(subChildStyle1=new mm_style()){
	offbgcolor="#F7F7F7";
	offcolor="#666";
	onbgcolor="#e4e5e6";
	oncolor="#FF0000";
	separatorcolor="#000000";
	separatorsize=0;
	padding=3;
	fontsize="10px";
	fontstyle="normal";
	fontfamily="Arial";
	fontweight="normal";
	itemwidth="140px";
	overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
	outfilter="randomdissolve(duration=0.3)";
	
	bordercolor="#296488";
	borderstyle="solid";
	borderwidth=1;
}

with(milonic=new menuname("Main Menu")){
	style=mainStyle;
	margin="0px";
	itemheight="0px";
	alwaysvisible=1;
	orientation="horizontal";
	position="relative";
	aI("text=<img src='"+base+"/images/nav_arrow.gif' alt='' /><span style=\"display:inline-block;margin-right:48px\">PARTS &amp; ACCESSORIES</span>;url="+base+"/parts.html;showmenu=products;");
	aI("text=<img src='"+base+"/images/nav_arrow.gif' alt='' /><span style=\"display:inline-block;margin-right:48px\">SERVICES</span>;url="+base+"/services.html;showmenu=services;");
	aI("text=<img src='"+base+"/images/nav_arrow.gif' alt='' /><span style=\"display:inline-block;margin-right:48px\">SUPPORT</span>;url="+base+"/support.html;showmenu=support;");
	aI("text=<img src='"+base+"/images/nav_arrow.gif' alt='' /><span style=\"display:inline-block\">OUR COMPANY</span>;showmenu=company;url="+base+"/corpinfo.html;");
}

with(milonic=new menuname("company")){
	style=subStyle;
	overflow="scroll";
	aI("text=Our Company Home;url="+base+"/corpinfo.html;");
	//aI("text=&nbsp;&nbsp;-&nbsp;Vendor Relations;url="+base+"/vendor_relations.html;");
	aI("text=&nbsp;&nbsp;-&nbsp;Corporate Brochure;url="+base+"/brochure.html;");
	aI("text=&nbsp;&nbsp;-&nbsp;Corporate Literature Library;url="+base+"/literature/;");
	aI("text=<hr>;");
	aI("text=&nbsp;&nbsp;-&nbsp;Value Statement;url="+base+"/values.html;");
	//aI("text=Vendor Community;fontweight=bold;url="+base+"/URL HERE;");
	aI("text=&nbsp;&nbsp;-&nbsp;Employment Opportunities;url="+base+"/careers/;");
	aI("text=<hr>;url=http://www.redlineweber.com/;");
	aI("text=WORLDPAC Canada;url=http://www.worldpac.ca/;");
	aI("text=REDLINE Division;url=http://www.redlineweber.com/;");
}

with(milonic=new menuname("products")){
	style=subStyle;
	overflow="scroll";
	aI("text=Parts & Accessories Home;url="+base+"/parts.html;");
	aI("text=&nbsp;&nbsp;-&nbsp;speedDIAL Software;url="+base+"/sd.html;");
	aI("text=&nbsp;&nbsp;-&nbsp;Professional Tools & Equipment;url="+base+"/parts.html#te;");
	aI("text=&nbsp;&nbsp;-&nbsp;Supplier Community;url="+base+"/suppliers.html;");
	aI("text=&nbsp;&nbsp;-&nbsp;REDLINE Division;url=http://www.redlineweber.com/;");
	aI("text=<hr>;");
	aI("text=&nbsp;&nbsp;-&nbsp;OEM Line Card (Brand);url="+base+"/pdfs/brand.pdf; target=_blank;");
	aI("text=&nbsp;&nbsp;-&nbsp;OEM Line Card (Category);url="+base+"/pdfs/linecard.pdf; target=_blank;");
	aI("text=<hr>");
	aI("text=Material Safety Data Sheets (MSDS);url="+base+"/msds.html;");
	aI("text=<hr>");
	aI("text=Contact Sales Department;url="+base+"/sales.html;");
	aI("text=<hr>");
	aI("text=VAD Scan Tool;url="+base+"/vad/;");
}
	
with(milonic=new menuname("support")){
	style=subStyle;
	overflow="scroll";
	aI("text=Support Home;url="+base+"/support.html;");
	aI("text=&nbsp;&nbsp;-&nbsp;Customer Support;url="+base+"/support.html;");
	aI("text=&nbsp;&nbsp;-&nbsp;speedDIAL Support;url="+base+"/support.html;");
	aI("text=&nbsp;&nbsp;-&nbsp;Training Support;url="+base+"/support.html;");
	aI("text=&nbsp;&nbsp;-&nbsp;Sales Management;url="+base+"/sales.html;");
	aI("text=&nbsp;&nbsp;-&nbsp;Contact Us;url="+base+"/contactus.html;");
}

with(milonic=new menuname("services")){
	style=subStyle;
	overflow="scroll";
	aI("text=Services Home;url="+base+"/services.html;");
	aI("text=&nbsp;&nbsp;-&nbsp;Same-Day Parts Delivery;url="+base+"/dd.html;");
	aI("text=&nbsp;&nbsp;-&nbsp;Customer Marketing Solutions;url="+base+"/cms.html;showmenu=cms");
	aI("text=&nbsp;&nbsp;-&nbsp;WORLDPAC Training Institute;url="+base+"/training;showmenu=wti");
	aI("text=<hr>Contact Sales Department;url="+base+"/sales.html;");
}

with(milonic=new menuname("wti")){
	style=subChildStyle1;
	overflow="scroll";
	aI("text=Technical Training Program;url="+base+"/training/classes/technical/;");
	aI("text=Business Management Classes;fontweight=bold;url="+base+"/training/classes/business/;");
	aI("text=SMART Groups;fontweight=bold;url="+base+"/training/smart-groups/;");
	aI("text=Business Calculators;fontweight=bold;url="+base+"/training/calculators/;");
	aI("text=WORLDPAC Assist Program;fontweight=bold;url="+base+"/assist/index.html;");
}

with(milonic=new menuname("cms")){
	style=subChildStyle1;
	overflow="scroll";
	aI("text=Consumer Satisfaction Index (CSI);fontweight=bold;url="+base+"/csi.html;");
	aI("text=MechanicNet - Customer Retention Programs;fontweight=bold;url="+base+"/mng_crs.html;");
	aI("text=New Mover Program;url="+base+"/new_mover.html;");
	aI("text=Direct Mail Customer Acquisition Programs  <img src='images/new.gif' alt='Direct Mail Customer Acquisition Programs' width='18' height='7' border='0' />;url="+base+"/cms_acquisition.html;");
	aI("text=RepairPal Customer Acquisition Program  <img src='images/new.gif' alt='RepairPal Program' width='18' height='7' border='0' />;url="+base+"/repairpal/;");
	aI("text=Shop Calendars;url="+base+"/cms_calendar.html;");
	aI("text=WORLDPAC Assist Program;fontweight=bold;url="+base+"/assist/index.html;");
}

drawMenus();

