
//var states = ['mout', 'mover', 'mdown'];
//var bgcolors = ['#4682B4', '#6699cc', '#99ccff'];
var customstates = ['', 'over', '']; //This is to tack on text after the base CSS class name.  If you want a separate Down class, use the 3rd array variable
var width = [130, 130, 160, 140]; //WIDTH needs to be same on menu_tpl.js

//The [90, null, 112, 39] sets of numbers on each item mean the following:
//	[distance left from previous position, distance down from previous position, width, height]
//Use negative numbers to move the opposite direction

//The text within the [] paired up with the url [URL, null, Alt Text] is simply mouseover alt text.  Can be different than visible text inside of wrap function.

var MENU_ITEMS = [
	['<img src="http://www.ihousecolor.com/Images/Template/but-home.gif">', 'http://www.ihousecolor.com/index.asp', [null, null, 90, 39]],
	['<img src="http://www.ihousecolor.com/Images/Template/but-services.gif">', 'http://www.ihousecolor.com/services.asp', [90, null, 112, 39],
		[wrap('Overview', 'cSrvcs', 1), ['http://www.ihousecolor.com/services.asp', null, 'Overview']],
		[wrap('Wide Format Printing', 'cSrvcs', 1), ['http://www.ihousecolor.com/services-wfp.asp', null, 'Wide Format Printing']],
		[wrap('Scanning', 'cSrvcs', 1), ['http://www.ihousecolor.com/services-scn.asp', null, 'Scanning']],	
		[wrap('Finishing Services', 'cSrvcs', 1), ['http://www.ihousecolor.com/services-fnsh.asp', null, 'Finishing Services']],
		[wrap('Trade Show Displays', 'cSrvcs', 1), ['http://www.ihousecolor.com/services-trdshw.asp', null, 'Trade Show Displays']]
	],
	['<img src="http://www.ihousecolor.com/Images/Template/but-about.gif">', 'http://www.ihousecolor.com/about.asp', [112, null, 110, 39],
		[wrap('History', 'cAbt', 1), ['http://www.ihousecolor.com/about.asp', null, 'History']],
		[wrap('Portfolio', 'cAbt', 1), ['http://www.ihousecolor.com/about-portfolio.asp', null, 'Portfolio']]
	],
	['<img src="http://www.ihousecolor.com/Images/Template/but-contact.gif">', 'http://www.ihousecolor.com/contact.asp', [110, null, 107, 39],
		[wrap('General', 'cCntct', 1), ['http://www.ihousecolor.com/contact.asp', null, 'General']],
		[wrap('Contact Us Form', 'cCntct', 1), ['http://www.ihousecolor.com/contact-frm.asp', null, 'Contact Us Form']],
		[wrap('Directions', 'cCntct', 1), ['http://www.ihousecolor.com/contact-dir.asp', null, 'Directions']]
	],
	['<img src="http://www.ihousecolor.com/Images/Template/but-client.gif">', 'http://www.ihousecolor.com/client-file-upld.asp', [107, null, 99, 39],
		[wrap('Upload Files', 'cClnt', 1), ['http://www.ihousecolor.com/client-file-upld.asp', null, 'Upload Files']]
	],
];

/*function wrap_parent (text, pos, icon) {
	var res = new Array;
	for (var i=0; i<states.length; i++)
		res[i] =  '<table cellpadding="1" cellspacing="0" border="0" bgcolor="#DBEAF5" width="100%"><tr><td><table cellpadding="2" cellspacing="0" border="0" width="100%" height="24" bgcolor="' + bgcolors[i] + '"><tr><td valign="middle" width="100%">&nbsp;' + (icon != null ? '<img src="img/'  + icon + '" height="16">&nbsp;' : '') + '<font face="tahoma, verdana, arial" color="black"><span style="font-size: 13px;">' + text + '</span></font></td><td valign="middle"><img src="img/' + states[i] + '_' + pos + 'arrow.gif" width="12" height="12"></td></tr></table></td></tr></table>';
	return res;
}
function wrap_parent (text, pos, icon) {
	var res = new Array;
	for (var i=0; i<states.length; i++)
		res[i] =  '<table cellspacing="0" border="0" bgcolor="#DBEAF5" width="100%"><tr><td><table ccellspacing="0" border="0" width="100%" bgcolor="' + bgcolors[i] + '"><tr><td valign="middle" width="100%">&nbsp;' + (icon != null ? '<img src="img/'  + icon + '" height="16">&nbsp;' : '') + '<font face="tahoma, verdana, arial" color="black"><span style="font-size: 13px;">' + text + '</span></font></td><td valign="middle"><img src="img/' + states[i] + '_' + pos + 'arrow.gif" width="12" height="12"></td></tr></table></td></tr></table>';
	return res;
}
function wrap_child (text, icon) {
	var res = new Array;
	for (var i=0; i<states.length; i++)
		res[i] =  '<table cellpadding="0" cellspacing="0" border="0" bgcolor="#DBEAF5" width="100%"><tr><td><table cellpadding="3" cellspacing="1" border="0" width="100%" height="24"><tr><td bgcolor="' + bgcolors[i] + '" style="padding: 3px;" valign="middle">&nbsp;' + (icon != null ? '<img src="img/'  + icon + '" height="16" align="absmiddle">&nbsp;' : '') + '<font face="tahoma, verdana, arial" color="black"><span style="font-size: 12px;">' + text + '</span></font></td></tr></table></td></tr></table>';
	return res;
}*/

//This function applies styles to the dropdown menus
//level needs to be menu level minus 1 to match position within width array
function wrap(text, cssClass, level) { //Pass in the text you want to display along with the CSS class.  You need to define 2 classes, one regular and one mouseover named the same as the regular plus 'over' tacked to the end of it
	var res = new Array;
	for (var i=0; i<customstates.length; i++)
		res[i] =  '<table cellpadding="0" cellspacing="0" width="100%"><tr><td><table cellpadding="0" cellspacing="0" width="100%"><tr><td height="20" width="' + width[level] + '" class="' + cssClass + customstates[i] + '">' + text + '</td></tr></table></td></tr></table>';
	return res;
}