/*<!--[CDATA[*/

/*
--------------------------------------------------------------
Thang Nguyen 2005 (c) All right reserved.
Contact: thang_toronto@yahoo.com
--------------------------------------------------------------
*/


var leftMenuTexts = new Array(
	"Our Sensei",
	"Tourney 2009",	
	"Photo Gallery",
	"Guest Book",
	"Tell Your Friends", 
	"Belt Levels"
	
	
);

var leftMenuLinks = new Array(
	
	"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);		
	/*
	// Special offer left panel
	document.write("<br><br><div style=' width: 130px;background-color:#C7C7C7'>" +
		"<div onclick=\"window.open('news/schoolflyer1.doc')\" style='background-color:white;cursor:pointer; "+
		"width: 130px; text-align:left; color: #000080; border: solid 1px #000080; padding: 2px; "+
		" top:-3px; left:-3px; position:relative;'><img src='images/kick.gif'><br><br>");
	document.write("Programs include a Free Karate Uniform, School Crest and a White Belt. ");
	document.write("Spaces are limited, so call now to  register:<br><br><div style='text-align:center'>"+
		"<b>416-875-9820<br>416-488-5662</b><br><br>");
	document.write("<a href='news/schoolflyer1.doc' target='_blank'>View details</a></div></div></div>");
	*/	
	// trafic ranking
	//document.write("<p><SCRIPT type='text/javascript' language='JavaScript' src='http://xslt.alexa.com/site_stats/js/t/a?url=www.northtorontokarate.com'></SCRIPT><br><a href='http://pages.alexa.com/exec/faqsidos/help/index.html?index=1'>What is this?</a></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 +"');"
	}
}

/*// ]]-->*/
