/*** 
This is the menu creation code - place it right after you body tag
Feel free to add this to a stand-alone js file and link it to your page.
**/

//Menu object creation
oCMenu=new makeCM("oCMenu") //Making the menu object. Argument: menuname

oCMenu.frames = 1

//Menu properties   
oCMenu.pxBetween=0
oCMenu.fromLeft=0 
oCMenu.fromTop=5   
oCMenu.rows=1
oCMenu.menuPlacement="center"
                                                             
oCMenu.offlineRoot="file:///C|/Inetpub/wwwroot/dhtmlcentral/projects/coolmenus/examples/" 
oCMenu.onlineRoot="/en" 
oCMenu.resizeCheck=1 
oCMenu.wait=1000 
oCMenu.fillImg="cm_fill.gif"
oCMenu.zIndex=20

//Background bar properties
oCMenu.useBar=0 //BAR turned OFF
oCMenu.barWidth="100%"
oCMenu.barHeight="menu" 
oCMenu.barClass="clBar"
oCMenu.barX=0 
oCMenu.barY=30
oCMenu.barBorderX=0
oCMenu.barBorderY=0
oCMenu.barBorderClass="" //Level properties - ALL properties have to be spesified in level 0
oCMenu.level[0]=new cm_makeLevel() //Add this for each new level
oCMenu.level[0].width=160
oCMenu.level[0].height=18
oCMenu.level[0].regClass="clLevel0"
oCMenu.level[0].overClass="clLevel0over"
oCMenu.level[0].borderX=0
oCMenu.level[0].borderY=0
oCMenu.level[0].borderClass="clLevel0border"
oCMenu.level[0].offsetX=00
oCMenu.level[0].offsetY=-oCMenu.level[0].height+18
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" //EXAMPLE 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=170
oCMenu.level[1].height=20
oCMenu.level[1].regClass="clLevel1"
oCMenu.level[1].overClass="clLevel1over"
oCMenu.level[1].borderX=0
oCMenu.level[1].borderY=0
oCMenu.level[1].align="right" //oCMenu.level[1].offsetX=-(oCMenu.level[0].width-2)/2+20
oCMenu.level[1].offsetX=0
oCMenu.level[1].offsetY=0
oCMenu.level[1].borderClass="clLevel1border"
oCMenu.level[1].arrow="/pics/arrow2.gif"
oCMenu.level[1].arrowWidth=10
oCMenu.level[1].arrowHeight=10


//EXAMPLE SUB LEVEL[2] PROPERTIES - You have to spesify the properties you want different from LEVEL[1] OR LEVEL[0] - If you want all items to look the same just remove this
oCMenu.level[2]=new cm_makeLevel() //Add this for each new level (adding one to the number)
oCMenu.level[2].width=155
oCMenu.level[2].height=20
oCMenu.level[2].offsetX=-(oCMenu.level[1].width-2)/2+20
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) 
*************************************/
var firstdir=firstdirectory() ;

if (firstdir=='about'){
 oCMenu.makeMenu('top1','','ABOUT NEWMONT','/about/index.asp','',134,22,'/pics/menus/about_over.gif','/pics/menus/about_over.gif');
} else {
 oCMenu.makeMenu('top1','','ABOUT NEWMONT','/about/index.asp','',134,22,'/pics/menus/about.gif','/pics/menus/about_over.gif');
}
if (firstdir=='ourbusiness'){
oCMenu.makeMenu('top2','','OUR BUSINESS','/ourbusiness/index.asp','',100,22,'/pics/menus/ourbusiness_over.gif','/pics/menus/ourbusiness_over.gif')
}else{
oCMenu.makeMenu('top2','','OUR BUSINESS','/ourbusiness/index.asp','',100,22,'/pics/menus/ourbusiness.gif','/pics/menus/ourbusiness_over.gif')
}


if (firstdir=='investor'){
oCMenu.makeMenu('top3','','INVESTOR INFORMATION','/investor/index.asp','',165,22,'/pics/menus/investor_over.gif','/pics/menus/investor_over.gif')
}else{
oCMenu.makeMenu('top3','','INVESTOR INFORMATION','/investor/index.asp','',165,22,'/pics/menus/investor.gif','/pics/menus/investor_over.gif')
}


if (firstdir=='social'){
oCMenu.makeMenu('top5','','SOCIAL RESPONSIBILITY','/social/index.asp','',191,22,'/pics/menus/social_over.gif','/pics/menus/social_over.gif')
}else{
oCMenu.makeMenu('top5','','SOCIAL RESPONSIBILITY','/social/index.asp','',191,22,'/pics/menus/social.gif','/pics/menus/social_over.gif')
}
if (firstdir=='gold'){
oCMenu.makeMenu('top6','','ABOUT GOLD','/gold/index.asp','',92,22,'/pics/menus/aboutgold_over.gif','/pics/menus/aboutgold_over.gif')
}else{
oCMenu.makeMenu('top6','','ABOUT GOLD','/gold/index.asp','',92,22,'/pics/menus/aboutgold.gif','/pics/menus/aboutgold_over.gif')
}


if (bw.ie && !bw.mac) { 
	//these sub menus are only used if it is IE on PC!!!!

	oCMenu.makeMenu('sub10','top1','Introduction','/about/index.asp')
	oCMenu.makeMenu('sub11','top1','Vision &amp; Values','/about/vision/index.asp')
	oCMenu.makeMenu('sub12','top1','Profile','/about/profile/index.asp')
	oCMenu.makeMenu('sub13','top1','Governance','/investor/governance/index.asp')
			oCMenu.makeMenu('sub131','sub13','Board of Directors','/investor/governance/board.asp')
			oCMenu.makeMenu('sub132','sub13','Officers','/investor/governance/executives.asp')
			oCMenu.makeMenu('sub133','sub13','Ethics Code','/investor/governance/ethics.asp')
//	oCMenu.makeMenu('sub14','top1','Human Resources','/about/hr/index.asp')		
	oCMenu.makeMenu('sub15','top1','Corporate Identity','/about/identity/index.asp')
	oCMenu.makeMenu('sub16','top1','History','/about/history/index.asp')
	oCMenu.makeMenu('sub17','top1','Other Newmont Sites','/about/sites/index.asp')
	oCMenu.makeMenu('sub18','top1','Contact Us','/about/contact/index.asp')
	
	oCMenu.makeMenu('sub21','top2','Introduction','/ourbusiness/index.asp')
	oCMenu.makeMenu('sub22','top2','Summary','/ourbusiness/summary/index.asp')
	oCMenu.makeMenu('sub23','top2','Operations','/ourbusiness/operations/index.asp')
			oCMenu.makeMenu('sub231','sub23','North America','/ourbusiness/operations/nthamerica/index.asp')
			oCMenu.makeMenu('sub232','sub23','South America','/ourbusiness/operations/sthamerica/index.asp')
			oCMenu.makeMenu('sub233','sub23','Australia','/ourbusiness/operations/australia/index.asp')
			oCMenu.makeMenu('sub234','sub23','Indonesia','/ourbusiness/operations/indonesia/index.asp')
			oCMenu.makeMenu('sub235','sub23','Other','/ourbusiness/operations/other/index.asp')
	oCMenu.makeMenu('sub24','top2','Exploration','/ourbusiness/exploration/index.asp')
			oCMenu.makeMenu('sub241','sub24','Advanced Projects','/ourbusiness/exploration/advanced/index.asp')
			oCMenu.makeMenu('sub242','sub24','Reserves','/ourbusiness/exploration/reserves/index.asp')
			oCMenu.makeMenu('sub243','sub24','Making Discoveries','/ourbusiness/exploration/discoveries/index.asp')
			oCMenu.makeMenu('sub244','sub24','Joint Ventures','/ourbusiness/exploration/jointventures/index.asp')
			oCMenu.makeMenu('sub245','sub24','Research &amp; Development','/ourbusiness/exploration/research/index.asp')
	
	
	
	oCMenu.makeMenu('sub25','top2','Newmont Capital','/ourbusiness/newmontcapital/index.asp')
		oCMenu.makeMenu('sub251','sub25','About Newmont Capital','/ourbusiness/newmontcapital/index.asp')
		oCMenu.makeMenu('sub252','sub25','Royalties Explained','/ourbusiness/newmontcapital/royalties/index.asp')
		oCMenu.makeMenu('sub253','sub25','Oil &amp; gas royalties','/ourbusiness/newmontcapital/royalties/oilgas.asp')
	
	
	oCMenu.makeMenu('sub26','top2','eBusiness','/ourbusiness/ebusiness/index.asp')
			
	
	oCMenu.makeMenu('sub31','top3','Introduction','/investor/index.asp')
	oCMenu.makeMenu('sub32','top3','Stock Information','/investor/stock/index.asp')
	oCMenu.makeMenu('sub33','top3','News Releases','/investor/releases/index.asp')
	oCMenu.makeMenu('sub34','top3','Presentations','/investor/presentations/index.asp')
	oCMenu.makeMenu('sub35','top3','Event Calendar','/investor/calendar.asp')
	oCMenu.makeMenu('sub36','top3','Financial Reports','/investor/financial/index.asp')
	oCMenu.makeMenu('sub37','top3','Analyst Coverage','/investor/analyst/index.asp')
	oCMenu.makeMenu('sub38','top3','Fundamentals','/investor/fundamental/index.asp')
	oCMenu.makeMenu('sub39','top3','Shareholder Information','/investor/shareholder/index.asp')
	oCMenu.makeMenu('sub310','top3','Email Alerts','/investor/alerts.asp')
//	oCMenu.makeMenu('sub311','top3','Why Invest in Gold?','/investor/invest/index.asp') to be added later !!
	oCMenu.makeMenu('sub312','top3','Corporate Governance','/investor/governance/index.asp')
			oCMenu.makeMenu('sub3121','sub312','Board of Directors','/investor/governance/board.asp')
			oCMenu.makeMenu('sub3122','sub312','Officers','/investor/governance/executives.asp')
			oCMenu.makeMenu('sub3123','sub312','Ethics Code','/investor/governance/ethics.asp')
//	oCMenu.makeMenu('sub313','top3','Ethical Investment','/investor/ethical/index.asp') to be added later!!
//	oCMenu.makeMenu('sub314','top3','FAQs','/investor/faq/index.asp') to be added later !!
	
	oCMenu.makeMenu('sub50','top5','Introduction','/social/index.asp')
	oCMenu.makeMenu('sub51','top5','Sustainable Development','/social/sustainable/index.asp')
			oCMenu.makeMenu('sub511','sub51','Our Definition','/social/sustainable/ourdefinition/index.asp')
			oCMenu.makeMenu('sub512','sub51','Strategy and Future','/social/sustainable/strategy/index.asp')
			oCMenu.makeMenu('sub513','sub51','Challenges','/social/sustainable/challenges/index.asp')
			oCMenu.makeMenu('sub514','sub51','Initiatives','/social/sustainable/initiatives/index.asp')
			oCMenu.makeMenu('sub515','sub51','Related Topics','/social/sustainable/relatedtopics/index.asp')
	oCMenu.makeMenu('sub52','top5','Safety','/social/safety/index.asp')
			oCMenu.makeMenu('sub521','sub52','Policy and Governance','/social/safety/policygovernance/index.asp')
			oCMenu.makeMenu('sub522','sub52','Performance','/social/safety/performance/index.asp')
			oCMenu.makeMenu('sub523','sub52','Challenges','/social/safety/challenges/index.asp')
			oCMenu.makeMenu('sub524','sub52','Initiatives','/social/safety/initiatives/index.asp')
			oCMenu.makeMenu('sub525','sub52','Case Studies','/social/safety/casestudies/index.asp')
	oCMenu.makeMenu('sub53','top5','Employee Wellbeing','/social/employee/index.asp')
			oCMenu.makeMenu('sub531','sub53','Policy and Governance','/social/employee/policygovernance/index.asp')
//			oCMenu.makeMenu('sub532','sub53','Performance','/social/employee/performance/index.asp') to be included at a later date
			oCMenu.makeMenu('sub533','sub53','Challenges','/social/employee/challenges/index.asp')
			oCMenu.makeMenu('sub534','sub53','Initiatives','/social/employee/initiatives/index.asp')
			oCMenu.makeMenu('sub535','sub53','Case Studies','/social/employee/casestudies/index.asp')
	oCMenu.makeMenu('sub54','top5','Community Relations','/social/community/index.asp')
			oCMenu.makeMenu('sub541','sub54','Policy and Governance','/social/community/policygovernance/index.asp')
			oCMenu.makeMenu('sub542','sub54','Performance','/social/community/performance/index.asp')
			oCMenu.makeMenu('sub543','sub54','Challenges','/social/community/challenges/index.asp')
			oCMenu.makeMenu('sub544','sub54','Initiatives','/social/community/initiatives/index.asp')
			oCMenu.makeMenu('sub545','sub54','Case Studies','/social/community/casestudies/index.asp')
	oCMenu.makeMenu('sub55','top5','Environment Management','/social/environment/index.asp')
			oCMenu.makeMenu('sub551','sub55','Policy and Governance','/social/environment/policygovernance/index.asp')
			oCMenu.makeMenu('sub552','sub55','Performance','/social/environment/performance/index.asp')
			oCMenu.makeMenu('sub553','sub55','Challenges','/social/environment/challenges/index.asp')
			oCMenu.makeMenu('sub554','sub55','Initiatives','/social/environment/initiatives/index.asp')
			oCMenu.makeMenu('sub555','sub55','Case Studies','/social/environment/casestudies/index.asp')
	oCMenu.makeMenu('sub56','top5','Economic Benefits','/social/economic/index.asp')
			oCMenu.makeMenu('sub561','sub56','Case Studies','/social/economic/casestudies.asp')
	//myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 

	oCMenu.makeMenu('sub60','top6','Introduction','/gold/index.asp','',130,'','','','','','left')
	oCMenu.makeMenu('sub61','top6','Gold Facts','/gold/goldfacts/index.asp','',130,'','','','','','left')
			oCMenu.makeMenu('sub611','sub61','History of Gold','/gold/goldfacts/history/index.asp')
			oCMenu.makeMenu('sub612','sub61','What is Gold?','/gold/goldfacts/whatis/index.asp')
			oCMenu.makeMenu('sub613','sub61','Uses of Gold','/gold/goldfacts/usesof/index.asp')
	oCMenu.makeMenu('sub62','top6','How Gold is Mined','/gold/howmined/index.asp','',130,'','','','','','left')
	oCMenu.makeMenu('sub63','top6','Virtual Tour','/gold/virtualtour/index.asp','',130,'','','','','','left')
	oCMenu.makeMenu('sub64','top6','Photo Library','/gold/library/index.asp','',130,'','','','','','left')
	oCMenu.makeMenu('sub65','top6','Glossary','/gold/glossary/index.asp','',130,'','','','','','left')

// end of conditional for PC only menus
}
			function firstdirectory() {// returns the name of the first directory (except the language!
			var lenPath 
			lenPath = location.pathname.indexOf('/',4)- location.pathname.indexOf('/',3)  ;
			return location.pathname.substr(location.pathname.indexOf('/',3)+1 ,lenPath -1)
		}
	
	//Leave this line - it constructs the menu
oCMenu.construct();		

