browser = navigator.appName;
appVer = parseInt(navigator.appVersion);
ie = "Microsoft Internet Explorer";
ns = "Netscape";
if (navigator.appVersion.indexOf("Macintosh") != -1) {
	isMac = true;
} else {
	isMac = false;
}

function toggle(id) {

	var initCookieValue;
	gameId = id.substring(0,id.indexOf('-'));
	togId = id.substring(0,id.indexOf('-')+1) + "eventContainer";

	html = document.getElementById(id).innerHTML;
	i_col = html.indexOf("cerrar");
	i_exp = html.indexOf("expandir");

	if (i_exp != -1) {
		document.getElementById(id).innerHTML = html.replace("expandir_on.gif", "cerrar_off.gif");
		document.getElementById(togId).style.display = "block";
		// now expanded, set cookie as expanded
		initCookieValue = 1;
	} else if (i_col != -1) {
		document.getElementById(id).innerHTML = html.replace("cerrar_on.gif", "expandir_off.gif");
		document.getElementById(togId).style.display = "none"
		// now collapsed, set cookie as collapsed
		initCookieValue = 0;
	} else {
		document.getElementById(togId).style.display = "none";
		initCookieValue = 0;
	}
}

function rollover_toggle(name, id) {

	html = document.getElementById(id).innerHTML;
	i_col = html.indexOf("cerrar_off");
	i_exp = html.indexOf("expandir_off");

	var image = document.getElementsByName(name);
	img = image[0];

	if (i_exp != -1) {
		img.src='http://img.sbgglobal.com/images/livescores/expandir_on.gif'
	} else if (i_col != -1) {
		img.src='http://img.sbgglobal.com/images/livescores/cerrar_on.gif'
	}
}

function rollout_toggle(name, id) {

	html = document.getElementById(id).innerHTML;
	i_col = html.indexOf("cerrar_on");
	i_exp = html.indexOf("expandir_on");

	var image = document.getElementsByName(name);
	img = image[0];

	if (i_exp != -1) {
		img.src="http://img.sbgglobal.com/images/livescores/expandir_off.gif"
	} else if (i_col != -1) {
		img.src="http://img.sbgglobal.com/images/livescores/cerrar_off.gif"
	}
}


///
var inlineAdText=null;