// Write Style to browser
HTMLComponent.writeStyle({
	MNUItm: 		'border-top: solid 1px white;',
	//MNUItm: 		'cursor: pointer; background: url("images/border_dotted_1px_white.gif") top left repeat-x;',
	MNUItmText:	'cursor: pointer; padding: 3px 0 0 15px; text-decoration: none; color: #555; font: 12px Arial, Helvetica;',
	MNUItmNoBrdr: 'border: none; padding:0; cursor: pointer;'
});

var  p ={align:"top"}

var iSatori1 = dynapi.functions.getImage('images/tab_products.gif',86,40,p);
var iSatori2 = dynapi.functions.getImage('images/tab_nutrition.gif',148,40,p);
var iSatori3 = dynapi.functions.getImage('images/tab_fitness.gif',141,40,p);
var iSatori4 = dynapi.functions.getImage('images/tab_about.gif',80,40,p);
//var iSatori5 = dynapi.functions.getImage('images/tab_about_sub1_top.gif',165,4,p);

var mnu = dynapi.document.addChild(new HTMLMenu(),'mnu');
mnu.backCol = '#c0c0c2';
mnu.selBgCol = '#d7d7d9';
mnu.cssMenu = 'MNU';
mnu.cssMenuText = 'MNUItmText';
mnu.cssMenuItem = 'MNUItm';

var mbar;
var MBAR_LENGTH = 22;
// Main Menu
//createMenuBar(id,itmWidth,itmHeight,subMnuOffset,padding)
mbar= mnu.createMenuBar('main',0,40,null,0);
//mbar.addItem(css,text,linkId,callback,length,spacing,backCol,selBgCol,cssText)
mbar.addItem('MNUItmNoBrdr',iSatori1.getHTML(),'products','go("products.aspx")',null,48,null,null,'MNUItmNoBrdr');
mbar.addItem('MNUItmNoBrdr',iSatori2.getHTML(),'nutritionTraining','go("nutritionAndTraining.aspx")',null,110,null,null,'MNUItmNoBrdr');
mbar.addItem('MNUItmNoBrdr',iSatori3.getHTML(),'fitnessCommunity','go("fitnessCommunity.aspx")',null,103,null,null,'MNUItmNoBrdr');
mbar.addItem('MNUItmNoBrdr',iSatori4.getHTML(),'about','go("aboutus.aspx")',null,42,null,null,'MNUItmNoBrdr');
	//Products menu
	mbar = mnu.createMenuBar('products',150);
	mbar.addItem('MNUItmNoBrdr','Shop By Category', 'browseProduct','go("browseByProductCategory.aspx")',MBAR_LENGTH);
	mbar.addItem(null,'Shop By Goal', 'browseGoal','go("browseByGoal.aspx")',MBAR_LENGTH);
	mbar.addItem(null,'Diet &amp; Training', 'dietTraining','go("nutritionAndTraining.aspx")',MBAR_LENGTH);
	//mbar.addItem(null,'Accessories', 'productAccessories','go("accessories.aspx")',MBAR_LENGTH);
	mbar.addItem(null,'Special Deals',null,'go("specialDeals.aspx")',MBAR_LENGTH);
	mbar.addItem(null, 'Products A-Z', 'productsAZ', 'go("Category.aspx?SID=8&Category_ID=5")', MBAR_LENGTH);
	
		//Browse by Product menu
		mbar = mnu.createMenuBar('browseProduct',170);
		mbar.addItem('MNUItmNoBrdr','Performance Products', 'performanceProducts','go("performanceProducts.aspx")',MBAR_LENGTH);
		mbar.addItem(null,'Lifestyle Products', 'lifestyleProducts','go("lifestyleProducts.aspx")',MBAR_LENGTH);
		//mbar.addItem(null,'Energy Products', 'energyProducts','go("energyProducts.aspx")',MBAR_LENGTH);
		//mbar.addItem(null,'Meal Replacements', 'mealReplacements','go("mealReplacements.aspx")',MBAR_LENGTH);
			
			
			// Performance Products menu
			mbar = mnu.createMenuBar('performanceProducts',180);
			mbar.addItem('MNUItmNoBrdr','3-XL',null,'go("product1.aspx?SID=8&Product_ID=33")',MBAR_LENGTH);
			mbar.addItem(null, 'Amino-Phase', null, 'go("product1.aspx?SID=8&Product_ID=147")', MBAR_LENGTH);
			mbar.addItem(null,'Energize Bullet',null,'go("product1.aspx?SID=8&Product_ID=107")',MBAR_LENGTH);
			mbar.addItem(null,'H+Blocker',null,'go("product1.aspx?SID=8&Product_ID=32")',MBAR_LENGTH);
			mbar.addItem(null,'ISA-Test GF',null,'go("product1.aspx?SID=8&Product_ID=121")',MBAR_LENGTH);
			//mbar.addItem(null,'Meta-Cel',null,'go("product1.aspx?SID=8&Product_ID=34")',MBAR_LENGTH);
			mbar.addItem(null,'MORPH',null,'go("product1.aspx?SID=8&Product_ID=82")',MBAR_LENGTH);
			mbar.addItem(null,'MORPH Liquid+',null,'go("product1.aspx?SID=8&Product_ID=122")',MBAR_LENGTH);
			mbar.addItem(null, 'MORPH MegaDrive', null, 'go("product1.aspx?SID=8&Product_ID=166")', MBAR_LENGTH);
			mbar.addItem(null, 'Ultra-Concentrated MX-LS7', null, 'go("product1.aspx?SID=8&Product_ID=193")', MBAR_LENGTH);
			mbar.addItem(null, 'MX-LS7', null, 'go("product1.aspx?SID=8&Product_ID=37")', MBAR_LENGTH);
			mbar.addItem(null, 'Pre-Workout Revolution', null, 'go("product1.aspx?SID=8&Product_ID=179")', MBAR_LENGTH);
			mbar.addItem(null, 'Sub-Test', null, 'go("product1.aspx?SID=8&Product_ID=165")', MBAR_LENGTH);
			
			// Lifestyle Products menu
			mbar = mnu.createMenuBar('lifestyleProducts',145);
			mbar.addItem('MNUItmNoBrdr','Curvelle',null,'go("product1.aspx?SID=8&Product_ID=38")',MBAR_LENGTH);
			mbar.addItem(null, 'Eat Smart', null, 'go("product1.aspx?SID=8&Product_ID=57")', MBAR_LENGTH);
			mbar.addItem(null,'Eat Smart Bar', null, 'go("product1.aspx?SID=8&Product_ID=167")', MBAR_LENGTH);
			mbar.addItem(null,'Energize',null,'go("product1.aspx?SID=8&Product_ID=31")',MBAR_LENGTH);	
			mbar.addItem(null,'Lean System 7 - CS',null,'go("product1.aspx?SID=8&product_id=67")',MBAR_LENGTH);
		
			// Energy Products menu
			//mbar = mnu.createMenuBar('energyProducts',130);
			//mbar.addItem('MNUItmNoBrdr','Energize',null,'go("Energize-P138C64.aspx")',MBAR_LENGTH);			
			// Energy Products menu
			//mbar = mnu.createMenuBar('mealReplacements',130);
			//mbar.addItem('MNUItmNoBrdr','Eat Smart',null,'go("Eat-Smart-P222C64.aspx")',MBAR_LENGTH);
			//mbar.addItem(null,'MRP & Protein Kit',null,'go("MRP-Protein-Kit-P225C64.aspx")',MBAR_LENGTH);
		
		
		//Browse by goal
		mbar = mnu.createMenuBar('browseGoal',160);
		mbar.addItem('MNUItmNoBrdr','Build Muscle', 'buildMuscle','go("buildMuscle.aspx")',MBAR_LENGTH);
		mbar.addItem(null,'Lose Fat', 'loseFat','go("loseFat.aspx")',MBAR_LENGTH);
		mbar.addItem(null,'Boost Performance', 'boostPerformance','go("boostPerformance.aspx")',MBAR_LENGTH);
		mbar.addItem(null,'Increase Energy', 'increaseEnergy','go("increaseEnergy.aspx")',MBAR_LENGTH);
			
			// Build Muscle menu
			mbar = mnu.createMenuBar('buildMuscle',180);
			mbar.addItem('MNUItmNoBrdr', '3-XL', null, 'go("product1.aspx?SID=8&Product_ID=33")', MBAR_LENGTH);
			mbar.addItem(null, 'Amino-Phase', null, 'go("product1.aspx?SID=8&Product_ID=147")', MBAR_LENGTH);
			mbar.addItem(null,'H+Blocker',null,'go("product1.aspx?SID=8&Product_ID=32")',MBAR_LENGTH);
			mbar.addItem(null,'ISA-Test GF',null,'go("product1.aspx?SID=8&Product_ID=121")',MBAR_LENGTH);
            //mbar.addItem(null,'Meta-Cel',null,'go("product1.aspx?SID=8&Product_ID=34")',MBAR_LENGTH);
			mbar.addItem(null,'MORPH',null,'go("product1.aspx?SID=8&Product_ID=82")',MBAR_LENGTH);
			mbar.addItem(null,'MORPH Liquid+',null,'go("product1.aspx?SID=8&Product_ID=122")',MBAR_LENGTH);
			mbar.addItem(null, 'MORPH MegaDrive', null, 'go("product1.aspx?SID=8&Product_ID=166")', MBAR_LENGTH);
			mbar.addItem(null, 'Pre-Workout Revolution', null, 'go("product1.aspx?SID=8&Product_ID=179")', MBAR_LENGTH);
            mbar.addItem(null, 'Sub-Test', null, 'go("product1.aspx?SID=8&Product_ID=165")', MBAR_LENGTH);
			
			// Lose Fat menu
			mbar = mnu.createMenuBar('loseFat',180);
			mbar.addItem('MNUItmNoBrdr', 'Curvelle', null, 'go("product1.aspx?SID=8&Product_ID=38")', MBAR_LENGTH);
			mbar.addItem(null, 'Eat Smart Bar', null, 'go("product1.aspx?SID=8&Product_ID=167")', MBAR_LENGTH);
			mbar.addItem(null,'Lean System 7 - CS',null,'go("product1.aspx?SID=8&product_id=67")',MBAR_LENGTH);
			mbar.addItem(null, 'Ultra-Concentrated MX-LS7', null, 'go("product1.aspx?SID=8&Product_ID=193")', MBAR_LENGTH);
			mbar.addItem(null, 'MX-LS7', null, 'go("product1.aspx?SID=8&Product_ID=37")', MBAR_LENGTH);
			
			// Boost Performance menu
			mbar = mnu.createMenuBar('boostPerformance',180);
			mbar.addItem('MNUItmNoBrdr','Energize Bullet',null,'go("product1.aspx?SID=8&Product_ID=107")',MBAR_LENGTH);
			mbar.addItem(null, 'H+Blocker', null, 'go("product1.aspx?SID=8&Product_ID=32")', MBAR_LENGTH);
			mbar.addItem(null,'ISA-TEST GF',null,'go("product1.aspx?SID=8&Product_ID=121")',MBAR_LENGTH);
			//mbar.addItem(null,'Meta-Cel',null,'go("product1.aspx?SID=8&Product_ID=34")',MBAR_LENGTH);
			mbar.addItem(null,'MORPH',null,'go("product1.aspx?SID=8&Product_ID=82")',MBAR_LENGTH);
			mbar.addItem(null,'MORPH Liquid+',null,'go("product1.aspx?SID=8&Product_ID=122")',MBAR_LENGTH);
			mbar.addItem(null, 'MORPH MegaDrive', null, 'go("product1.aspx?SID=8&Product_ID=166")', MBAR_LENGTH);
			mbar.addItem(null, 'Ultra-Concentrated MX-LS7', null, 'go("product1.aspx?SID=8&Product_ID=193")', MBAR_LENGTH);
			mbar.addItem(null, 'MX-LS7', null, 'go("product1.aspx?SID=8&Product_ID=37")', MBAR_LENGTH);
			mbar.addItem(null, 'Pre-Workout Revolution', null, 'go("product1.aspx?SID=8&Product_ID=179")', MBAR_LENGTH);
			mbar.addItem(null, 'Sub-Test', null, 'go("product1.aspx?SID=8&Product_ID=165")', MBAR_LENGTH);
			
			// Increase Energy menu
			mbar = mnu.createMenuBar('increaseEnergy',130);
			mbar.addItem('MNUItmNoBrdr','Energize',null,'go("product1.aspx?SID=8&Product_ID=31")',MBAR_LENGTH);
			mbar.addItem(null,'Energize Bullet',null,'go("product1.aspx?SID=8&Product_ID=107")',MBAR_LENGTH);
		
		
		//Diet and Training Solutions menu
		mbar = mnu.createMenuBar('dietTraining',180);
		mbar.addItem('MNUItmNoBrdr','21-Day Energy Plan','twentyOneDay','go("product1.aspx?SID=8&Product_ID=45")',MBAR_LENGTH);
		mbar.addItem(null,'Carnosine Book','carnosineBook','go("product1.aspx?SID=8&Product_ID=40")',MBAR_LENGTH);
		mbar.addItem(null,'Curvelle Lifestyle','curvelleLifestyle','go("product1.aspx?SID=8&Product_ID=69")',MBAR_LENGTH);
		mbar.addItem(null,'Lean System Success Plan','leanSysSuccPlan','go("product1.aspx?SID=8&Product_ID=43")',MBAR_LENGTH);
		mbar.addItem(null,'Max Growth Volume II','maxGrowth','go("product1.aspx?SID=8&Product_ID=39")',MBAR_LENGTH);
		mbar.addItem(null,'Real Solutions Magazine','realSoluMag','go("product1.aspx?SID=8&Product_ID=41")',MBAR_LENGTH);
		mbar.addItem(null,'Sports Supplement Buyer\'s Guide','ssbg','go("product1.aspx?SID=8&Product_ID=111")',MBAR_LENGTH);
		//mbar.addItem(null,'Testosterone Solution','testSolution','go("product1.aspx?SID=8&Product_ID=15")',MBAR_LENGTH);
		
		//Accessories menu
		//mbar = mnu.createMenuBar('productAccessories',120);
		//mbar.addItem('MNUItmNoBrdr','T-Shirts','tshirts',null,MBAR_LENGTH);
		//mbar.addItem(null,'Caps','caps',null,MBAR_LENGTH);
		//mbar.addItem('MNUItmNoBrdr','Shaker Cup','shakerCup','go("Shaker-Cup-P240C64.aspx")',MBAR_LENGTH);
		//mbar.addItem(null,'Stein','stein','go("Stein-P241C64.aspx")',MBAR_LENGTH);
		//mbar.addItem(null,'Myotape','myotape','go("Myotape-P239C64.aspx")',MBAR_LENGTH);
		//Special Deals menu
		//Products A-Z menu
		
		
		
	//Nutrition and Training menu
	//mbar = mnu.createMenuBar('nutritionTraining',160);
	//mbar.addItem('MNUItmNoBrdr','Nutrition &amp; Diet', 'nutritionDiet','go("nutritionAndDiet.aspx")',MBAR_LENGTH);
	//mbar.addItem(null,'Training &amp; Workouts', 'trainingWorkouts','go("trainingAndWorkouts.aspx")',MBAR_LENGTH);
		
		//Nutrition and Diet menu
		//mbar = mnu.createMenuBar('nutritionDiet',120);
		//mbar.addItem('MNUItmNoBrdr','Recipes', 'recipes','go("dietRecipes.aspx")',MBAR_LENGTH);
		//mbar.addItem(null,'Journals', 'journals','go("dietJournals.aspx")',MBAR_LENGTH);
		//mbar.addItem(null,'Articles', 'articles1','go("dietArticles.aspx")',MBAR_LENGTH);
		//mbar.addItem(null,'Book Excerpts', 'bookExcerpts1','go("dietBookExcerpts.aspx")',MBAR_LENGTH);
		//Training and Workouts menu
		//mbar = mnu.createMenuBar('trainingWorkouts',170);
		//mbar.addItem('MNUItmNoBrdr','Recommended Workouts', 'workouts','go("trainingRecommendedWorkouts.aspx")',MBAR_LENGTH);
		//mbar.addItem(null,'Training Tips', 'trainingTips','go("trainingTips.aspx")',MBAR_LENGTH);
		//mbar.addItem(null,'Articles', 'articles2','go("trainingArticles.aspx")',MBAR_LENGTH);
		//mbar.addItem(null,'Book Excerpts', 'bookExcerpts2','go("trainingBookExcerpts.aspx")',MBAR_LENGTH);
	
	//Fitness Community menu
	mbar = mnu.createMenuBar('fitnessCommunity',170);
	mbar.addItem('MNUItmNoBrdr','Real Solutions Magazine','realSolMag','go("product1.aspx?SID=8&Product_ID=62")',MBAR_LENGTH);
	mbar.addItem(null,'Real Solutions Newsletter','realSolNews','go("RealSOLUTIONSNewsletter.aspx")',MBAR_LENGTH);
	mbar.addItem(null,'Ask an Expert','askExpert','go("askExpert.aspx")',MBAR_LENGTH);
	mbar.addItem(null,'Community Forum','commForum','goNew("http://www.realsolutionsmag.com/idealbb")',MBAR_LENGTH);
	
	

	//About iSatori
	mbar = mnu.createMenuBar('about',165);
	//mbar.addItem(css,text,linkId,callback,length,spacing,backCol,selBgCol,cssText)
	//mbar.addItem('height: 4px; margin: 0; padding: 0;',iSatori5.getHTML(),null,null,null, 0);
	mbar.addItem('MNUItmNoBrdr','Vision &amp; Values', 'visionValues','go("visionAndValues.aspx")',MBAR_LENGTH);
	mbar.addItem(null,'News &amp; Events', 'newsEvents','go("newsAndEvents.aspx")',MBAR_LENGTH);
	mbar.addItem(null,'Experts &amp; Affiliations', 'expertsAffiliations','go("expertsAndAffiliations.aspx")',MBAR_LENGTH);
	mbar.addItem(null,'Leadership Team', 'leadershipTeam','go("leadershipTeam.aspx")',MBAR_LENGTH);
	mbar.addItem(null,'Testimonials', 'testimonials','go("testimonials.aspx")',MBAR_LENGTH);
	mbar.addItem(null,'Careers', 'careers','go("careers.aspx")',MBAR_LENGTH);
		
		//Vision and Values menu
		
		//News and Events menu
//		mbar = mnu.createMenuBar('newsEvents',120);
//		mbar.addItem('MNUItmNoBrdr','News Articles', 'newsArticles','go("newsArticles.aspx")',MBAR_LENGTH);		
//		//mbar.addItem(null,'Events', 'events','go("events.aspx")',MBAR_LENGTH);
		//mbar.addItem(null,'Media Center', 'mediaCenter','go("mediaCenter.aspx")',MBAR_LENGTH);
		//Experts and Affiliations menu
		//mbar = mnu.createMenuBar('expertsAffiliations',120);
		//mbar.addItem('MNUItmNoBrdr','Biographies', 'biographies','go("expertsBiographies.aspx")',MBAR_LENGTH);
		//Leadership Team menu
		//mbar = mnu.createMenuBar('leadershipTeam',120);
		//mbar.addItem('MNUItmNoBrdr','Biographies', 'biographies','go("teamBiographies.aspx")',MBAR_LENGTH);
		//Testimonials menu
		//Careers menu
		mbar = mnu.createMenuBar('careers',120);
		mbar.addItem('MNUItmNoBrdr','Job Descriptions', 'jobDescriptions','go("jobDescriptions.aspx")',MBAR_LENGTH);







		function goNew(uri) {
		    window.open(uri);
		}
		
		
		function go(uri)
		{
			window.location = uri;
		}
