/*<!--[CDATA[*/

/*
--------------------------------------------------------------
Thang Nguyen 2005 (c) All right reserved.
Contact: thang_toronto@yahoo.com
--------------------------------------------------------------
*/


var leftMenuTexts = new Array(
	"Student Page",
	"Our Sensei",
//	"Tourney 2009",	
	"Photo Gallery",
//	"Guest Book",
	"Tell Your Friends", 
	"Belt Levels"
	
	
);

var leftMenuLinks = new Array(
	"http://www.northtorontokarate.com/shttp/home.php",
	"sensei.php",
//	"tourney.htm",	
	"gallery.php",
	//"gb/index.php",
	"tellfriend.php",
	"beltlevels_breakdown.htm"
);

var leftMenuWidth = new Array(110,110,110,110);


function createLeftMenu()
{
	var mm = "<table cellpadding=0 cellspacing=0>";
		

	for (var i=0; i < leftMenuTexts.length; i++)
	{
		mm += "<tr>";
		mm += "<td class='Menu' style='text-align:left;' width="+ leftMenuWidth[i] + " ";
		
		mm += "onmouseover=\"HiliteCellBg(event, '#FFCC33', '#FFFFFF', '#FF9900')\" ";
		mm += "onmouseout=\"javscript: UnHiliteCellBg(event, '#FFFFFF', '#FFCC33', '#FF9900');\" ";

		if (leftMenuLinks[i].indexOf("news/") != -1) // display news page in a new window
		{
			mm += "><a href=\""+ leftMenuLinks[i] +"\" class='MnuItmHref' target='_blank'>" + leftMenuTexts[i]+ "</a>";
		}
		else
		{
			mm += "><a href=\""+ leftMenuLinks[i] +"\" class='MnuItmHref'>" + leftMenuTexts[i]+ "</a>";
		}
		
		mm += "</td>";
		mm += "<td width=2></td>";
		mm += "</tr>";
		mm += "<tr height=2><td></td></tr>";
	}

	
	mm += "</table>";

	document.write(mm);		
	document.write("<p><a href='http://www.facebook.com/group.php?gid=2400872972'><img src='http://www.nationalmartialartscircuit.com/img/facebook.gif' border='0' width='114' height='34' style='vertical-align:middle;'>");		
	document.write("<br><a href='http://twitter.com/ntkarate'><img src='http://www.northtorontokarate.com/images/twitter.png' border='0' style='vertical-align:middle; margin-top:5px;' alt='NTKS on Twitter'>");		
	document.write("</p>");		
	
}




/* ----------------------------------------------------------*/
/*	Secition: Hight light a TD menu when mouse over and out  */
/* ----------------------------------------------------------*/

var NS6=document.getElementById && !document.all;
var IE=document.all;

function ContainsNS6(mainwin, subwin) { 
  //check if subwin is contained by mainwin
	while (subwin.parentNode)
	if ((subwin = subwin.parentNode) == mainwin)
		return true;
	return false;
}

function HiliteCellBg(event, sStartBgColor, sEndBgColor, sBdrColor){    
	
	source=IE? event.srcElement : event.target;
	if (source.tagName=="TR"||source.tagName=="TABLE")
	return
	while(source.tagName!="TD"&&source.tagName!="HTML")
	source=NS6? source.parentNode : source.parentElement
	
	if (source.style.backgroundColor!= sStartBgColor &&source.id!="ignore") 
	{		
		source.style.borderColor = sBdrColor;
		source.style.borderWidth = "1px";
		source.style.borderStyle = "solid";
		//source.style.backgroundColor = hlBgColor;
		source.style.filter		 = "progid:DXImageTransform.Microsoft.Gradient("+
									"GradientType=0,"+
									"StartColorStr='"+ sStartBgColor +"',"+
									"EndColorStr='"+ sEndBgColor +"');"
	}
}

function UnHiliteCellBg(event, sStartBgColor, sEndBgColor, sBdrColor){    
	
	source=IE? event.srcElement : event.target;
	if (source.tagName=="TR"||source.tagName=="TABLE")
	return
	while(source.tagName!="TD"&&source.tagName!="HTML")
	source=NS6? source.parentNode : source.parentElement
	
	if (source.style.backgroundColor!= sStartBgColor &&source.id!="ignore") 
	{		
		source.style.borderColor = sBdrColor;
		source.style.borderWidth = "1px";
		source.style.borderStyle = "solid";
		//source.style.backgroundColor = hlBgColor;
		source.style.filter		 = "progid:DXImageTransform.Microsoft.Gradient("+
									"GradientType=0,"+
									"StartColorStr='"+ sStartBgColor +"',"+
									"EndColorStr='"+ sEndBgColor +"');"
	}
}

/*// ]]-->*/

