//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,220);

//mainMenu.m_dec = '|';
mainMenu.m_dec = '';
//mainMenu.m_dec = '<img src="/programs/nlpip/lightingAnswers/img/LAarrowRightBlack.gif" width="8" height="11" alt="" border="0">';
mainMenu.m_vertical = true;
//mainMenu.sm_color  = 'url(img/icon_printer.gif)'; // Item color of submenus
//mainMenu.sm_a_color  = 'url(img/icon_printer.gif)'; // Item color when mouseOver
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(/programs/nlpip/lightingAnswers/lightSources/img/arrowUnder.gif)','backgroundA':'url(/programs/nlpip/lightingAnswers/lightSources/img/arrowOver.gif)','txtacolor':'#FFFFFF','onclick':"location='/programs/nlpip/index.asp'"},false);

	mainMenu.addItem ('Technologies',{'url':'/programs/nlpip/technologies.asp','target':'_blank','winOptions':'width=770, toolbar=yes, standard=yes, location=yes, status=yes, resizable=yes, scrollbars=yes','theHeight':30,'theWidth':150,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
	mainMenu.addItem ('Search',{'url':'/programs/nlpip/search.asp','target':'_blank','winOptions':'width=770, toolbar=yes, standard=yes, location=yes, status=yes, resizable=yes, scrollbars=yes','theHeight':30,'theWidth':150,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
	mainMenu.addItem ('FAQ',{'url':'/programs/nlpip/faqs/index.asp','target':'_blank','winOptions':'width=770, toolbar=yes, standard=yes, location=yes, status=yes, resizable=yes, scrollbars=yes', 'theHeight':30,'theWidth':150,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
	mainMenu.addItem ('Publications',{'url':'/programs/nlpip/publications.asp','target':'_blank','winOptions':'width=770, toolbar=yes, standard=yes, location=yes, status=yes, resizable=yes, scrollbars=yes','theHeight':30,'theWidth':150,'backgroundA':'#660066','txtacolor':'#FFFFFF'},true);
mainMenu.addItem ('-',{'url':'-','theHeight':15, 'theWidth':150},false);
mainMenu.addItem ('Light Sources and Color<br> Q & A',{'url':'', 'theHeight':35,'theWidth':150,'backgroundA':'url(/programs/nlpip/lightingAnswers/lightSources/img/arrowOver.gif)','background':'url(/programs/nlpip/lightingAnswers/lightSources/img/arrowUnder.gif)','txtacolor':'#FFFFFF','onclick':"location='abstract.asp'"},false);

		mainMenu.addItem ('Introduction',{'url':'abstract.asp','theHeight':30, 'theWidth':255,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('When is color important to lighting applications?',{'url':'importance.asp','theHeight':30, 'theWidth':255,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('What lamp color characteristics do lighting specifiers use to select light sources?',{'url':'characteristics.asp','theHeight':30, 'theWidth':255,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('How do we see color?',{'url':'seeColor.asp','theHeight':30, 'theWidth':255,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('How does the lighting industry measure color appearance?',{'url':'measure.asp','theHeight':30, 'theWidth':255,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('What is correlated color temperature?',{'url':'whatisCCT.asp','theHeight':30, 'theWidth':255,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('What is color consistency?',{'url':'whatisColorConsistency.asp','theHeight':30, 'theWidth':255,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('What is color stability?',{'url':'whatisColorStability.asp','theHeight':30, 'theWidth':255,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('How are the color rendering propertires of light sources defined?',{'url':'colorRendering.asp','theHeight':30, 'theWidth':255,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('What is color rendering index?',{'url':'whatisColorRenderingIndex.asp','theHeight':30, 'theWidth':255,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('What is full-spectrum index?',{'url':'whatisFullSpectrumIndex.asp','theHeight':30, 'theWidth':255,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('What is gamut area?',{'url':'whatisGamutArea.asp','theHeight':30, 'theWidth':255,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('What is the best way to communicate the color rendering properties of a light source?',{'url':'communicate.asp','theHeight':30, 'theWidth':255,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('What is the relationship between lamp efficacy and color rendering?',{'url':'relationship.asp','theHeight':30, 'theWidth':255,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('What is the relationship between color rendering and light levels?',{'url':'lightLevels.asp','theHeight':30, 'theWidth':255,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('Conclusion',{'url':'conclusion.asp','theHeight':30, 'theWidth':255,'backgroundA':'#660066','txtacolor':'#FFFFFF'},true);

mainMenu.addItem ('Appendices',{'url':'', 'theHeight':30,'theWidth':150,'backgroundA':'url(/programs/nlpip/lightingAnswers/lightSources/img/arrowOver.gif)','background':'url(/programs/nlpip/lightingAnswers/lightSources/img/arrowUnder.gif)','txtacolor':'#FFFFFF','onclick':"location='abstract.asp'"},false);
		mainMenu.addItem ('Appendix A: Calculating chromaticity coordinates',{'url':'appendixa.asp','theHeight':35, 'theWidth':255,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
		mainMenu.addItem ('Appendix B: Calculating color rendering metrics',{'url':'appendixb.asp','theHeight':35, 'theWidth':255,'backgroundA':'#660066','txtacolor':'#FFFFFF'},true);


mainMenu.addItem ('Resources',{'url':'resources.asp','theHeight':30, 'theWidth':150,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
mainMenu.addItem ('Sponsors and Credits',{'url':'sponsorsCredits.asp', 'theHeight':30, 'theWidth':150,'backgroundA':'#660066','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':'#660066','txtacolor':'#FFFFFF'},false);
mainMenu.addItem ('Legal Notices',{'url':'legal.asp','theHeight':30, 'theWidth':150,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);
mainMenu.addItem ('Site Map',{'url':'sitemap.asp','theHeight':30, 'theWidth':150,'backgroundA':'#660066','txtacolor':'#FFFFFF'},false);

mainMenu.doMenu();

//control
if (document.layers){
	document.onMouseDown = hideMenus;
} else {
	document.body.onclick = hideMenus;
}
