var menuitems = [
					["Home","index.asp"],
					["About TCG", "aboutus.htm"],
					["Why TCG","whytcg.htm"],
					["Business Solutions","solutions.htm"],
					["IT Services","services.htm"],
					["Free Consultation","free_consultation.asp"],
					["Contact Us","Contactus.htm"]
				];


function menu(currentmenuitem)
{
var html='';
var ln='';
ln=ln + '<table border="0" cellpadding="0" cellspacing="0" width="100%">';
ln=ln + ' <tr><td width="100%" bgcolor=#ffffff>';
ln=ln + '  <table border="0" cellpadding="0" cellspacing="0" width="100%">';
ln=ln + '   <tr><td width="100%" bgcolor=#ffffff></td></tr></table>';
ln=ln + ' </td></tr></table>';

for (i=0;i<menuitems.length;i++)
{

	if (i==currentmenuitem)		//Current Item
	{
		if (i==menuitems.length-1)	//last item
		{
			html=html + ' <table border="0" cellpadding="0" cellspacing="0" width="100%" class=cell1>'
			html=html + ' <tr>'
			html=html + '  <td width="12%" align=right bgcolor=999999><Img src="images/menuselected.gif" border=0 width=5 height=9></td>'
			html=html + '  <td width="88%" bgcolor=999999>'
			html=html + '   <table cellpadding=0 cellspacing=0 border=0 width=100%>'
			html=html + '     <tr>'
			html=html + '        <td width=80%><font face="arial" size=2>&nbsp;' + menuitems[i][0] + '</font></td>'
			html=html + '        <td width=20% valign=bottom align="right" height=20><img name="navcorner" src="images/corner2.gif" border="0" width="18" height="17"></td>'
			html=html + '        </tr></table>'
			html=html+ '</font></td></tr></table>';
		}
		else
		{
			html=html + ' <table border="0" cellpadding="0" cellspacing="0" width="100%" class=cell1>'
			html=html + ' <tr>'
			html=html + ' <td width="10%" bgcolor=999999 align=right><Img src="images/menuselected.gif" border=0 width=5 height=9></td><td width=1% bgcolor=999999><font size=1 face=arial>&nbsp;</font></td>'
			html=html + ' <td width="91%" height="20" bgcolor=999999>'
			html=html + ' <font face=arial size=2>' + menuitems[i][0] 
			html=html + '  </font></td></tr></table>';
			html=html + ln
		}
	}
	else
	{
		if (i==menuitems.length-1)
		{
			html=html + ' <table border=0 cellpadding="0" cellspacing="0" width="100%" class=cell1 '
			html=html + ' onmouseout=Swapbgwithcorneroff(this) onmouseover=Swapbgwithcorneron(this)'
			html=html + ' onclick=go("' + menuitems[i][1] + '") >'
			html=html + ' <tr>'
			html=html + '  <td width="12%">&nbsp;</td>'
			html=html + '  <td width="88%">'
			html=html + '   <table cellpadding=0 cellspacing=0 border=0 width=100%>'
			html=html + ' <tr>'
			html=html + ' <td width=80%><font face="arial" size=2><a href="' + menuitems[i][1] + '">' + menuitems[i][0] + '</a></font></td>'
			html=html + ' <td width=20% valign=bottom align="right" height=22><img name="navcorner" src="images/corner1.gif" border="0" width="18" height="17"></td>'
			html=html + ' </tr></table>'
			html=html + '</td></tr></table>';
		}
		else
		{
			html=html + ' <table border=0 cellpadding=0 cellspacing=0 width=100% class=cell1 '
			html=html + ' onmouseout=Swapbgoff(this) onmouseover=Swapbgon(this)'
			html=html + ' onclick=go("' + menuitems[i][1] + '") >'
			html=html + ' <tr>'
			html=html + ' <td width="12%">&nbsp;</td>'
			html=html + ' <td width="88%" height="23">'
			html=html + ' <font face=arial size=2>'
			html=html + ' <a href="' + menuitems[i][1] + '">' + menuitems[i][0] + '</a></font>'
			html=html + '</td></tr></table>';
			html=html + ln
		}
	}
}
document.write(html);
}	









	
function Swapbgon(cell)
{
	cell.className = "cell2";
}
function Swapbgoff(cell)
{
	cell.className = 'cell1';
}
function go(url)
{
	window.location.href=url;
}

function Swapbgwithcorneron(cell)
{
	cell.className='cell2';
	navcorner.src='images/corner3.gif';
}
function Swapbgwithcorneroff(cell)
{
	cell.className='cell1';
	navcorner.src='images/corner1.gif';
}	

function SwapbgImgon(cell,img,src)
{
	cell.className='cell2';
	img.src=src;
}
function SwapbgImgoff(cell)
{
	cell.className='cell1';
	img.src=src;
}	

function Swapbgcontectuson(cell)
{
	cell.className='cell2';
	imgcontectus.src='images/corner5.gif';
}
function Swapbgcontectusoff(cell)
{
	cell.className='cell1';
	imgcontectus.src='images/corner.gif';
}	
