/*<!--[CDATA[*/

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


var menuTexts = new Array(
	"Home", 
	"Getting Started", 
	"News", 
	"Tournaments", 
	"Schedules", 
	"Locations",
	"C.M.A. Network"
);

var menuLinks = new Array(
	"home.htm", 
	"gettingstarted.htm",
	"news.php",
	"tourney.php",
	"schedule.htm",
	"locations.htm",
	"cman.htm"
);

var menuWidth = new Array(60, 120, 60, 90, 80, 80, 110);


function createMainMenu()
{
	var mm = "<table cellpadding=0 cellspacing=0>";
		mm += "<tr>";

	for (var i=0; i < menuTexts.length; i++)
	{
		mm += "<td class='Menu' width="+ menuWidth[i] + " align='center' ";
		
		mm += "onmouseover=\"HiliteCellBg(event, '#FFCC33', '#FFFFFF', '#FF9900')\" ";
		mm += "onmouseout=\"javscript: UnHiliteCellBg(event, '#FFFFFF', '#FFCC33', '#FF9900');\" ";
	//	mm += "onmouseover=\"HiliteCellBg(event, '#FFCC00', '#FFCC00', '#FF9900')\" ";
	//	mm += "onmouseout=\"javscript: UnHiliteCellBg(event, '#FFFFFF', '#FFCC33', '#FF9900');\" ";
		mm += "><a href='"+ menuLinks[i] +"' class='MnuItmHref'>" + menuTexts[i]+ "</a>";
		mm += "</td>";
		mm += "<td width=2></td>";
	}

	mm += "</tr>";
	mm += "</table>";

	document.write(mm);

}



/* ----------------------------------------------------------*/
/*	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 +"');"
	}
}

// Image gallery
function viewImage(url)
{
	url = "http://www.northtorontokarate.com/"+ url;
	features = "width=650,height=550,location=no,menubar=no,resizable=yes,scrollbars=yes,titlebar=no,toolbar=no,status=no,top=50, left=50";

	window.open(url, "img", features);
}


/*// ]]-->*/
