//javascript mapb_menu_def.js

if (document.layers) {
	var newWindowWidth = window.innerWidth;
}
else if(document.all){
	var newWindowWidth = document.body.clientWidth;
}
else if(document.getElementById){
	var newWindowWidth = window.innerWidth;
}

var finalSPosition = newWindowWidth/2-380;

if (finalSPosition <= 15){
	finalSPosition = 15
}

mainMenu = new Menu ('mainMenu',finalSPosition,200);

//mainMenu.m_dec = '<img src="/programs/nlpip/lightingAnswers/img/LAarrowRightBlack.gif" width="8" height="11" alt="" border="0">';
mainMenu.m_dec = '';
mainMenu.m_vertical = true;
mainMenu.txt_color  = '#000000';  // Color of initial menu
mainMenu.txt_a_color  = '#FFFFFF'; // Item color of submenus

//Menu definition
mainMenu.addItem ('NLPIP Home',{'url':'', 'theHeight':30,'theWidth':150,'background':'url(img/arrowUnder.gif)','backgroundA':'url(img/arrowOver.jpg)','txtacolor':'#FFFFFF','onclick':"location='/programs/nlpip/index.asp'"},false);

	mainMenu.addItem ('Technologies',{'url':'/programs/nlpip/technologies.asp','target':'_blank','winOptions':'width=770, toolbar=yes, resizable=yes, scrollbars=yes','theHeight':30,'theWidth':150,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
	mainMenu.addItem ('Search',{'url':'/programs/nlpip/search.asp','target':'_blank','winOptions':'width=770, toolbar=yes, resizable=yes, scrollbars=yes','theHeight':30,'theWidth':150,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
	mainMenu.addItem ('FAQ',{'url':'/programs/nlpip/faqs/index.asp','target':'_blank','winOptions':'width=770, toolbar=yes, resizable=yes, scrollbars=yes', 'theHeight':30,'theWidth':150,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
	mainMenu.addItem ('Publications',{'url':'/programs/nlpip/publications.asp','target':'_blank','winOptions':'width=770, toolbar=yes, resizable=yes, scrollbars=yes','theHeight':30,'theWidth':150,'backgroundA':'#663300','txtacolor':'#FFFFFF'},true);
mainMenu.addItem ('-',{'url':'-','theHeight':15, 'theWidth':150},false);
mainMenu.addItem ('Light Pollution Q & A',{'url':'', 'theHeight':30,'theWidth':150,'backgroundA':'url(img/arrowOver.jpg)','background':'url(img/arrowUnder.gif)','txtacolor':'#FFFFFF','onclick':"location='abstract.asp'"},false);

		mainMenu.addItem ('Introduction',{'url':'abstract.asp','theHeight':20, 'theWidth':350,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('What is light pollution?',{'url':'lightPollution.asp','theHeight':20, 'theWidth':350,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('What is sky glow?',{'url':'skyGlow.asp','theHeight':20, 'theWidth':350,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('How is sky glow measured or calculated?',{'url':'skyGlowMeasured.asp','theHeight':20, 'theWidth':350,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('What is light tresspass?',{'url':'lightTrespass.asp','theHeight':20, 'theWidth':350,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('How is light trespass measured or calculated?',{'url':'lightTrespassMeasured.asp','theHeight':20, 'theWidth':350,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('What is glare?',{'url':'glare.asp','theHeight':20, 'theWidth':350,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('How is the issue of light pollution being addressed?',{'url':'lightPollutionAddressed.asp','theHeight':20, 'theWidth':350,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('What are lighting environmental zones?',{'url':'environmentalZones.asp','theHeight':20, 'theWidth':350,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('How can sky glow be reduced?',{'url':'skyGlowReduced.asp','theHeight':20, 'theWidth':350,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('How is light trespass controlled?',{'url':'lightTrespassControlled.asp','theHeight':20, 'theWidth':350,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('How is glare controlled?',{'url':'glareControlled.asp','theHeight':20, 'theWidth':350,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('What are the IESNA cutoff classifications?',{'url':'cutoffClassifications.asp','theHeight':20, 'theWidth':350,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('Are cutoff classifications a good indicator of direct uplight?',{'url':'indicatorDirectUplight.asp','theHeight':20, 'theWidth':350,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('What is the difference between full cutoff and fully shielded?',{'url':'cutoffShielded.asp','theHeight':30, 'theWidth':350,'backgroundA':'#663300','txtacolor':'#FFFFFF'},true);
		
mainMenu.addItem ('Resources',{'url':'resources.asp','theHeight':30, 'theWidth':150,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
mainMenu.addItem ('Sponsors and Credits',{'url':'sponsorsCredits.asp', 'theHeight':30, 'theWidth':150,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
mainMenu.addItem ('Glossary',{'url':'glossary.asp', 'target':'_blank','winOptions':'status=no, toolbar=no, resizable=yes, location=no, scrollbars=yes, width=780, height=500','theHeight':30, 'theWidth':150,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
mainMenu.addItem ('Legal Notices',{'url':'legalNotices.asp','theHeight':30, 'theWidth':150,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);
mainMenu.addItem ('Site Map',{'url':'sitemap.asp','theHeight':30, 'theWidth':150,'backgroundA':'#663300','txtacolor':'#FFFFFF'},false);

mainMenu.doMenu();


if (document.layers){
	document.onMouseDown = hideMenus;
} else {
	document.body.onclick = hideMenus;
}
