function redirectTo(url)
{
	if(url == "home")
		location = "index.htm";
	else
		location = "video.htm?cat=" + url + "+vid=0";
}

function initCat()
{
	var idx = document.URL.indexOf('?');
	var vars = new Array();
	if (idx != -1) {
		var pairs = document.URL.substring(idx+1, document.URL.length).split('+');
		for (var i=0; i<pairs.length; i++) {
			nameVal = pairs[i].split('=');
			vars[nameVal[0]] = nameVal[1];
		}
	}
	getSwf().setCat(vars["cat"]);
	getSwf().setVid(vars["vid"]);
}

function getSwf()
{
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window["menu_btns"]
	}
	else {
		return document["menu_btns"]
	}
}

function share(mailto_link)
{
	window.open(mailto_link,'emailWindow');
}

function xmlLoaded()
{
	initCat();
}

function gotoPage(page)
{
	location = page + ".htm";
}