/*****************************************************************************
CoolMenus v4 - setup for broccosprouts.com
updated June 3, 2008 jw

version with wwbias added to cmpage.x2 bw.ie add 20px, bw.moz add -15px
******************************************************************************/

//Menu object creation
oCMenu=new makeCM("oCMenu") //Making the menu object. Argument: menuname

oCMenu.frames = 0

// Menu placement properties   
oCMenu.rows=1 			// rows (1) vs columns (0)
oCMenu.fromLeft="4%" 
oCMenu.fromTop=83   	// position of menu from top of page window
oCMenu.pxBetween=0
// oCMenu.menuPlacement="right"

// place the level0 items.  turn border on to see better.
var jwbias = 0
if (bw.ie) jwbias=20; else if (bw.moz) jwbias=-15; else jwbias=0; 
var testvar = jwbias

var btn1="((cmpage.x2*4/100)+2)" 			// (4% pagewidth) +2px
var availrt="(( (cmpage.x2+jwbias)*96/100)-2)" 		// pagewidth-(4% pagewidth) -2px
var testvar=(cmpage.x2*96/100) 			// a test variable
var btn6=availrt+"-93"						// -93 px -2px for the border
var btn5=btn6+"-2-93"
var btn4=btn5+"-2-93"
var btn3=btn4+"-2-93"
var btn2=btn3+"-2-93"
oCMenu.menuPlacement=new Array(btn1,btn2,btn3,btn4,btn5,btn6) 
// NOTE: the above works well with mozilla, but the right ones are off in MSIE.
// might be an integer math thing.
//  *** looks like cmpage.x2 is different on msie & mozilla, 
//       diff on collmenus3 vs v4 too with moz
// 		see diff between function cm_page (v4) and function makePageCoords (v3)


// have to change these when we move out of the new subdir
oCMenu.offlineRoot="file:///D|/web.broccosprouts/broccosprouts.com/"
// oCMenu.onlineRoot="/broccosprouts/"    // "use with localhost/broccosprouts/
oCMenu.onlineRoot="/"    // "http://www.broccosprouts.com/"
oCMenu.resizeCheck=1		// refresh the menu on page resize in IE and NS6 and reload the page in the rest of the browsers.
oCMenu.wait=600 
oCMenu.fillImg="menu4/cm_fill.gif"
oCMenu.zIndex=0

//Background bar properties
oCMenu.useBar=1				// 1=use bar, 0=no bar
oCMenu.barWidth="92%" 		// need 2 more pixels from each side for table cellspacing
oCMenu.barHeight="menu" 
oCMenu.barClass="clBar"
oCMenu.barX="menu"
oCMenu.barY="menu"
oCMenu.barBorderX=0
oCMenu.barBorderY=0
oCMenu.barBorderClass=""

// Level 0 properties - ALL properties have to be specified in level 0
// lower levels inherit unless spec'd
oCMenu.level[0]=new cm_makeLevel() //Add this for each new level
oCMenu.level[0].width=93 		// 93-2 (for border) when border=1
oCMenu.level[0].height=58
oCMenu.level[0].regClass="clLevel0"
oCMenu.level[0].overClass="clLevel0over"
oCMenu.level[0].borderX=0		// turn borders on to test cell positioning
oCMenu.level[0].borderY=0		// turn borders on to test cell positioning
oCMenu.level[0].borderClass="clLevel0border"
oCMenu.level[0].offsetX=0
oCMenu.level[0].offsetY=0
oCMenu.level[0].rows=0
oCMenu.level[0].arrow=0
oCMenu.level[0].arrowWidth=0
oCMenu.level[0].arrowHeight=0
oCMenu.level[0].align="bottom"	// controls the alignment of the subitems of this level
oCMenu.level[0].roundBorder=0

// SUB LEVEL[1] PROPERTIES - You have to specify the properties you want different from LEVEL[0] - 
// If you want all items to look the same just remove this
oCMenu.level[1]=new cm_makeLevel() //Add this for each new level (adding one to the number)
oCMenu.level[1].width=120  // oCMenu.level[0].width-2
oCMenu.level[1].height=24
oCMenu.level[1].regClass="clLevel1"
oCMenu.level[1].overClass="clLevel1over"
oCMenu.level[1].borderX=1
oCMenu.level[1].borderY=1
oCMenu.level[1].align="right" 
oCMenu.level[1].offsetX=0	// -(oCMenu.level[0].width-2)/2+20
oCMenu.level[1].offsetY=4
oCMenu.level[1].borderClass="clLevel1border"


// SUB LEVEL[2] PROPERTIES - You have to specify the properties you want different from LEVEL[1] OR LEVEL[0] 
oCMenu.level[2]=new cm_makeLevel() 
oCMenu.level[2].width=153
oCMenu.level[2].height=24
oCMenu.level[2].offsetX=0
oCMenu.level[2].offsetY=0
oCMenu.level[2].regClass="clLevel2"
oCMenu.level[2].overClass="clLevel2over"
oCMenu.level[2].borderClass="clLevel2border"


/******************************************
Menu item creation:
myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, 
	regImage, overImage, regClass, overClass, align, rows, nolink, 
	onclick, onmouseover, onmouseout) 
*************************************/

// -------------------------------------
// now define the elements in the menu
// -------------------------------------
// With the new onlineRoot and offlineRoot all links now have  
// to be relative to the root of your web. 
// -------------------------------------

oCMenu.makeMenu('top0','','','about/sitemap.htm') // Site
	oCMenu.makeMenu('sub01','top0','SiteMap','about/sitemap.htm','','90') // override width
//	oCMenu.makeMenu('sub02','top0','Contact Us','about/contact.htm','','90') // override width
	oCMenu.makeMenu('sub03','top0','Feedback','about/feedback.htm','','90') // override width
	oCMenu.makeMenu('sub04','top0','Whats New','about/whatsnew.asp','','90') // override width)
	oCMenu.makeMenu('sub05','top0','Site Design','about/sitedesign.htm','','90') // override width)
	oCMenu.makeMenu('sub06','top0','Keyword Search','about/search.htm','','90','36') // override width)

// oCMenu.makeMenu('topbl','','(blank)','','','93') // blank cell

oCMenu.makeMenu('top1','','','health/health.htm') // Health<br>Benefits
	oCMenu.makeMenu('sub10','top1','Benefits','health/health.htm')
	oCMenu.makeMenu('sub11','top1','SGS Fact Sheet','health/sgsfactsheet.htm')
	oCMenu.makeMenu('sub12','top1','Nutritional content','health/nutricontent.htm','','','36') // override height
	oCMenu.makeMenu('sub13','top1','Brassica.Com','http://www.brassica.com/')
	
oCMenu.makeMenu('top2','','','sprouts/sprouts.htm') // Buying<br>Brocco<br>Sprouts
	oCMenu.makeMenu('sub21','top2','Our Product','sprouts/packages.htm')
	oCMenu.makeMenu('sub22','top2','Store Locator','find/stores.asp')
	oCMenu.makeMenu('sub23','top2','Grower Locator','find/sprouters.asp')
	oCMenu.makeMenu('sub24','top2','Home Growing Kits','find/homekits.htm','','','36') // override height
	oCMenu.makeMenu('sub25','top2','Supplements','http://www.brassica.com/products/supplements.htm')

	oCMenu.makeMenu('sub26','top2','For Produce -&gt; Managers','sprouts/producemgr.htm','','','36') // override height
		// oCMenu.makeMenu('sub260','sub26','Sell Sheets','sprouts/sellsheet.htm')
		// oCMenu.makeMenu('sub261','sub26','Brochure','sprouts/brochure.htm')
		oCMenu.makeMenu('sub260','sub26','Promo Kit (PDF)','img/mkting/promokit.pdf')
		oCMenu.makeMenu('sub261','sub26','Recipe Cards','sprouts/recipecard.htm')
		oCMenu.makeMenu('sub262','sub26','Safety Program','sprouts/spsafetyprog.htm')
		oCMenu.makeMenu('sub263','sub26','How a Seed...','sprouts/prgrowing.htm')
		
oCMenu.makeMenu('top3','','','sprouts/faq.htm')  // Sprout<br>FAQs
	oCMenu.makeMenu('sub31','top3','FAQs','sprouts/faq.htm')
// 	oCMenu.makeMenu('sub32','top3','Broccoli Blog','sprouts/faq.htm')
	oCMenu.makeMenu('sub33','top3','Recipes ','recipes/recipes.htm')
	oCMenu.makeMenu('sub34','top3','Nutritional content','health/nutricontent.htm','','','36') // override height
	oCMenu.makeMenu('sub35','top3','The Story','sprouts/story.htm')
	oCMenu.makeMenu('sub36','top3','Safety','sprouts/spsafety.htm')
	oCMenu.makeMenu('sub37','top3','Brassica Blog','http://brassicatea.com/blog')

oCMenu.makeMenu('top4','','','company/about.htm') // Company<br>Info
	oCMenu.makeMenu('sub41','top4','About Us','company/about.htm')
	oCMenu.makeMenu('sub42','top4','Press Room','http://www.brassica.com/press/press.htm')
	oCMenu.makeMenu('sub43','top4','Partners','http://www.brassica.com/partners/partners.htm')
	oCMenu.makeMenu('sub44','top4','Brassica.Com','http://www.brassica.com/')
	oCMenu.makeMenu('sub45','top4','BrassicaTea.Com','http://www.brassicatea.com/')

oCMenu.makeMenu('top5','','','default.asp') // Home, could get rid of this button since it has no subs
// right now if I do then mozilla doesn't work to click on the home box link.

//Leave this line - it constructs the menu
oCMenu.construct()		

