
/* menu start position */
var menuy = 415; // left (y)
var menux = 96; // top (x)
IE4 = (document.all) ? 1 : 0;
//if (IE4==1) menuy = menuy + 10; // if center, I think

/*  below are colors and styles, each in an array of [out, over, hit]  */
	// top menu level
var bgcolors = ['#000000', '#000000', '#000000']; // top level bgcolors
var textcolors = ['#cccccc', '#ffffff', '#ffffff']; // top level text color
var fontStyles = ['font-family: tahoma, arial, helvetcia, sans-serif; font-weight: bold; font-size: 10px;','font-family: tahoma, arial, helvetcia, sans-serif; font-size: 10px; font-weight: bold; text-decoration: underline','font-family: tahoma, arial, helvetcia, sans-serif; font-size: 10px; font-weight: bold;'];
	// primary menu drill-down level (level 1)
var bgcolors1 = ['#36356F', '#8C87D3', '#8C87D3']; // level 1 bgcolors
var textcolors1 = ['#ffffff', '#ffffff', '#ffffff']; // level 1 text color
var fontStyles1 = ['font-family: verdana, arial, helvetcia, sans-serif; font-weight: bold; font-size: 10px;','font-family: verdana, arial, helvetcia, sans-serif; font-weight: bold; font-size: 10px','font-family: verdana, arial, helvetcia, sans-serif; font-size: 10px;font-weight: bold;'];
	// secondary menu drill-down level (level 2)
var bgcolors2 = ['#cccccc', '#990000', '#990000']; // level 2 bgcolors
var textcolors2 = ['#000000', '#ffffff', '#ffffff']; // level 2 text color
var fontStyles2 = ['font-family: verdana, arial, helvetcia, sans-serif; font-size: 10px;','font-family: verdana, arial, helvetcia, sans-serif; font-size: 10px','font-family: verdana, arial, helvetcia, sans-serif; font-size: 10px;font-weight: bold;'];

var states = 3; // how many states there are, onMouseOut, onMouseOver, onClick

/*
The array below includes any number of submenu levels.  Just add another array beneath the submenu item.
	[wrap_parent('Menu Text'), '/path/to/url', [150, null, 100] ],
								|				 |    |     |
								can be null		 |    |     this menu width
												 |    |
												 |    Overrides y locaion, not used here
												 |
												 number: previous menu width, or null

	[wrap_child1('Menu Text'), '/path/to/url', null],
                                |              \
                                can be null    can have [null, null, 100] notation
								               to override width of that item to be 100
*/

var MENU_ITEMS = [
	[wrap_parent('<img src=/clearpixel.gif width=88 height=42>'), '/products/', [null, null, 88],
		[wrap_child1('Sierra'), '/products/sierra/', [null, null, 130] ],
		[wrap_child1('Alpine'), '/products/alpine/', [null, null, 130] ],
		[wrap_child1('Cascade'), '/products/cascade/', [null, null, 130] ],
		[wrap_child1('Mohave'), '/products/mohave/', [null, null, 130] ],
		[wrap_child1('Complete Systems'), '/products/completesystems/', [null, null, 130] ],
		[wrap_child1('Condensing Units'), '/products/condensingunits/', [null, null, 130] ],
		
	],
	[wrap_parent('<img src=/clearpixel.gif width=98 height=42>'), '/company/', [88, null, 98],
		[wrap_child1('About Us'), '/company/about.php', [null, null, 98] ],
		[wrap_child1('Electronics'), '/company/electronics.php', [null, null, 98] ],
		[wrap_child1('History'), '/company/history.php', [null, null, 98] ],
		[wrap_child1('FAQs'), '/company/faqs.php', [null, null, 98] ],
		[wrap_child1('Employment'), '/company/employment.php', [null, null, 98] ],
		[wrap_child1('Contact Us'), '/company/contact.php', [null, null, 98] ],
	],
	[wrap_parent('<img src=/clearpixel.gif width=68 height=42>'), '/news/', [170, null, 68], 
		[wrap_child1('Latest News'), '/news/latest.php', [null, null, 115] ],
		[wrap_child1('Technical Articles'), '/news/articles.php', [null, null, 115] ],
	],
	[wrap_parent('<img src=/clearpixel.gif width=88 height=42>'), '/tech/', [69, null, 98], 
		[wrap_child1('Sierra'), '/tech/sierra.php', [null, null, 155] ],
		[wrap_child1('Alpine'), '/tech/alpine.php', [null, null, 155] ],
		[wrap_child1('Cascade'), '/tech/cascade.php', [null, null, 155] ],
		[wrap_child1('Mohave'), '/tech/mohave.php', [null, null, 155] ],
		[wrap_child1('Condensing Units'), '/tech/condensingunits.php', [null, null, 155] ],
		[wrap_child1('Controllers & Electronics'), '/tech/controllers.php', [null, null, 155] ],
		[wrap_child1('Articles'), '/tech/articles.php', [null, null, 155] ],
		[wrap_child1('Warranty'), '/tech/warranty.php', [null, null, 155] ],
		[wrap_child1('Naming Convention'), '/tech/modelnamingconvention.php', [null, null, 155] ],
		[wrap_child1('Miscellaneous Parts'), '/tech/miscparts.php', [null, null, 155] ],
	],
];

var MENU_POS = {
	'height'     : [24, 24, 24, 24, 24, 24, 24], // default heights, not used
	'width'      : [100, 130, 100, 120, 130, 160, 160], // default widths, if not specified above
	'block_top'  : [menux, 39, 0, 0, 0, 0, 0], // x distance between menu levels, used to make horiz or vert menus
	'block_left' : [menuy, 0, 155, 155, 155, 155, 155], // y distance between menu levels, used to make horiz or vert menus
	'top'        : [0, 22, 25, 25, 25, 25, 25], // x space between each item, can space out menu (like leading)
	'left'       : [0, 0, 0, 0, 0, 0, 0], // y space between each menu item, used to make horiz or vert menus
	'hide_delay' : [300, 300, 300, 300, 300, 300, 300],
	'expd_delay' : [300, 300, 300, 300, 300, 300, 300],
	'pixel_path' : '/clearpixel.gif', // path to clear pizel
	'align'      : 'left' // left, center, right
};

/*
Parents are items with submenu items.  Children are menu items without submenu items.
The difference is graphic, and only in some cases.  We use it to put an arrow on the right side of
a pull down menu to show that there are sub menu items.

Each function below writes three states, so each state could be if/then to show pictures, etc. 

Usage: wrap_parent ('text in menu','path/icon.gif') // icon is optional
*/

function wrap_parent (text, icon) {
	var res = new Array;
	for (var i=0; i<states; i++) {
		tempvar =  '<table cellpadding="0" cellspacing="0" border="0" width="100%" height="18"><tr><td valign="middle" width="100%">&nbsp;' + (icon != null ? '<img src="'  + icon + '" height="16">&nbsp;' : '') + '<font face="verdana, arial" color=' + textcolors[i] + '><span style="' + fontStyles[i] + '">' + text + '</span></font></td>';
		//if (text != 'Accessories') tempvar = tempvar + '<td><font color=' + textcolors[i] + ' face=arial size=2>|</td></tr>';
		tempvar = tempvar + '</table>';
		res[i] = tempvar;
		}
	return res;
}
function wrap_parent1 (text, icon) {
	var res = new Array;
	for (var i=0; i<states; i++)
		res[i] =  '<table cellpadding="2" cellspacing="0" border="0" width="100%" height="22" bgcolor="' + bgcolors1[i] + '"><tr><td valign="middle" width="100%">&nbsp;' + (icon != null ? '<img src="'  + icon + '" height="16">&nbsp;' : '') + '<font face="tahoma, verdana, arial" color="' + textcolors1[i] + '"><span style="' + fontStyles1[i] + '">' + text + '</span></font></td><td><font size=2 face=arial,helvetica color=' + textcolors[i] + '><nobr><b>></b>&nbsp;</nobr></font></td></tr></table>';
	return res;
}
function wrap_parent2 (text, icon) {
	var res = new Array;
	for (var i=0; i<states; i++)
		res[i] =  '<table cellpadding="2" cellspacing="0" border="0" width="100%" height="24" bgcolor="' + bgcolors2[i] + '"><tr><td valign="middle" width="100%">&nbsp;' + (icon != null ? '<img src="'  + icon + '" height="16">&nbsp;' : '') + '<font face="tahoma, verdana, arial" color="' + textcolors2[i] + '"><span style="' + fontStyles2[i] + '">' + text + '</span></font></td></tr></table>';
	return res;
}
function wrap_parent3 (text, icon) {
	var res = new Array;
	for (var i=0; i<states; i++)
		res[i] =  '<table cellpadding="2" cellspacing="0" border="0" width="100%" height="24" bgcolor="' + bgcolors2[i] + '"><tr><td valign="middle" width="100%">&nbsp;' + (icon != null ? '<img src="'  + icon + '" height="16">&nbsp;' : '') + '<font face="tahoma, verdana, arial" color="' + textcolors2[i] + '"><span style="' + fontStyles2[i] + '">' + text + '</span></font></td></tr></table>';
	return res;
}
function wrap_child (text, icon) {
	var res = new Array;
	for (var i=0; i<states; i++)
		res[i] =  '<table cellpadding="" cellspacing="0" border="0" width="100%" height="20"><tr><td bgcolor="' + bgcolors[i] + '" valign="middle">&nbsp;' + (icon != null ? '<img src="'  + icon + '" height="16" align="absmiddle">&nbsp;' : '') + '<font face="tahoma, verdana, arial" color="' + textcolors[i] + '"><span style="' + fontStyles[i] + '">' + text + '</span></font></td></tr></table>';
	return res;
}
function wrap_child1 (text, icon) {
	var res = new Array;
	for (var i=0; i<states; i++)
		res[i] =  '<table cellpadding="2" cellspacing="0" border="0" width="100%" height="22"><tr><td bgcolor="' + bgcolors1[i] + '" valign="middle">&nbsp;' + (icon != null ? '<img src="'  + icon + '" height="16" align="absmiddle">&nbsp;' : '') + '<font face="tahoma, verdana, arial" color="' + textcolors1[i] + '"><span style="' + fontStyles1[i] + '">' + text + '</span></font></td></tr></table>';
	return res;
}
function wrap_child2 (text, icon) {
	var res = new Array;
	for (var i=0; i<states; i++)
		res[i] =  '<table cellpadding="2" cellspacing="0" border="0" width="100%" height="24"><tr><td bgcolor="' + bgcolors2[i] + '" valign="middle">&nbsp;' + (icon != null ? '<img src="'  + icon + '" height="16" align="absmiddle">&nbsp;' : '') + '<font face="tahoma, verdana, arial" color="' + textcolors2[i] + '"><span style="' + fontStyles2[i] + '">' + text + '</span></font></td></tr></table>';
	return res;
}
function wrap_child3 (text, icon) {
	var res = new Array;
	for (var i=0; i<states; i++)
		res[i] =  '<table cellpadding="2" cellspacing="0" border="0" width="100%" height="24"><tr><td bgcolor="' + bgcolors2[i] + '" valign="middle">&nbsp;' + (icon != null ? '<img src="'  + icon + '" height="16" align="absmiddle">&nbsp;' : '') + '<font face="tahoma, verdana, arial" color="' + textcolors2[i] + '"><span style="' + fontStyles2[i] + '">' + text + '</span></font></td></tr></table>';
	return res;
}


