if(window.attachEvent) window.attachEvent('onload', rendermenu);
else window.addEventListener('load', rendermenu, false);

var vTemp = window.location.href.split("/");
var vHREF = vTemp[vTemp.length-1];
if(vHREF.indexOf('#')!=-1) vHREF = vHREF.substring(0, vHREF.indexOf('#'));

var vMenu = [
				[
					['Print', 'Print', '#', 'print', 200],
					[
						['<b><u>I</u></b>dentity Design', 'Identity Design', 'identity.htm'],
						['<b><u>B</u></b>rochure / Literature', 'Brochure / Literature', 'brochure.htm'],
						['<b><u>A</u></b>dvertisement', 'Advertisement', 'advertisement.htm'],
						['<b><u>H</u></b>oardings / Posters', 'Hoardings / Posters', 'hoardings.htm'],
						['<b><u>P</u></b>romotional Items', 'Promotional Items', 'promotionalitems.htm']
						//['<b><u>S</u></b>tationery', 'Stationery', 'stationery.htm']
					]
				],
				[
					['Web', 'Web', '#', 'web', 200],
					[
						['<b><u>W</u></b>ebsite Design', 'Website Design', 'website.htm'],
						['<b><u>I</u></b>nteractive Presentation', 'Interactive Presentation', 'interactive.htm'],
						['<b><u>W</u></b>eb Application', 'Web Application', 'webapplication.htm'],
						['<b><u>E</u></b>mailer &amp; Newsletter', 'Emailer &amp; Newsletter', 'emailer.htm'],
						['<b><u>D</u></b>omain &amp; Hosting Services', 'Domain &amp; Hosting Services', 'hosting.htm']
					]
				],
				[
					['Exhibitions', 'Exhibitions', '#', 'Exhibitions', 200],
					[
						[' <b><u>S</u></b>tall Design', 'Stall Design', 'stalldesign.htm'],
						['<b><u>P</u></b>ermanent Display', 'Permanent Display', 'permanentdisplay.htm'],
						['<b><u>T</u></b>ableau', 'Tableau', 'tableau.htm'],
						['<b><u>S</u></b>ignage', 'Signage', 'signage.htm']
					]
				],
				[
					['Audio-Visual', 'Audio-Visual', '#', 'audio-visual', 200],
					[
						['<b><u>C</u></b>orporate Film', 'Corporate Film', 'corporatefilm.htm'],
						['<b><u>P</u></b>rocess / Product Film', 'Process / Product Film', 'processfilm.htm'],
						['<b><u>D</u></b>ocumentary', 'Documentary', 'documentary.htm'],
						['<b><u>3</u></b>D / Walkthrough', '3D / Walkthrough', '3d_walkthrough.htm'],
						['<b><u>J</u></b>ingle', 'Jingle', 'jingle.htm']
					]
				]
			];
			
function rendermenu()
{
	var obj = document.getElementById('top');
	if(obj) obj.innerHTML += '<div id="topmenu"><a href="http://www.markcomm.co.in" target="_blank">Markcomm</a><a href="./contact.php">Contact</a></div>';

	var obj = document.getElementById('menu');
	if(!obj) return;
	
	var vTemp = '';
	var IsFound = false;
	var vHTML = '<div></div><ul>';
	
	for(i=0; i<vMenu.length; i++)
	{
		vTemp = '';
		IsFound = false;
		
		for(j=0; j<vMenu[i][1].length; j++)
		{
			if(vHREF==vMenu[i][1][j][2]) IsFound = true;
			
			vTemp += '<li><a title="' + vMenu[i][1][j][1] + '" href="' + vMenu[i][1][j][2] + '">' + vMenu[i][1][j][0] + '</a></li>';
		}
		
		vHTML += '<li' + (IsFound ? ' class="over active"' : '') + ' onmouseover="this.className=\'over\';" onmouseout="this.className=\'' + (IsFound ? 'over active' : '') + '\';"><a title="' + vMenu[i][0][1] + '" href="' + vMenu[i][0][2] + '">' + vMenu[i][0][0] + '</a><ul>' + vTemp + '</ul></li>';
	}
	
	vHTML += '</ul>';
	
	obj.innerHTML = vHTML;
}