	var curNode="";
	var overList=0;
	var teid=0;
	var plid=0;
	var tval=0;
	var ltyp=0;



	function flagColor(cid){
		document.getElementById("f"+cid).src="images/flags/color/"+cid+".gif";
	}
	function flagGrey(cid){
		document.getElementById("f"+cid).src="images/flags/color/"+cid+".gif";
	}
	function fadein(opac) {
		if(opac< 100){
			opac+=3;
			if(document.getElementById("match_list")){
				if(document.all)
					{document.all['match_list'].style.filter = "alpha(opacity="+opac+")"}
				else
					{document.getElementById('match_list').style.MozOpacity = opac/100};
			};
			setTimeout('fadein('+opac+')', 1);
		}
	} 

	function show_matches(cid,seas,val,tid,pid,gid,typ,cst,lng){
		var lnkid=tid+"_"+typ;
		if(typ<14){
			lnkid=pid+"_"+typ;
		};
		document.getElementById(lnkid).blur();
		var divId = "match_list";
		if (document.getElementById(divId)&&curNode!=""){
			var cur = document.getElementById(curNode);
			cur.removeChild(document.getElementById(divId));
			cur.style.position="static";
			cur.style.fontWeight="normal";
		}
		if (curNode!=lnkid){
			startRequestWC(cid,seas,val,tid,pid,gid,typ,cst,lng)
		}
		else {
			curNode = "";
		}
	}

	function createRequestWC(){
		if (window.ActiveXObject)
			{xmlWC = new ActiveXObject("Microsoft.XMLHTTP")}
		else if (window.XMLHttpRequest)
			{xmlWC = new XMLHttpRequest}
	}

	function handleStateChangeWC(){
		if (xmlWC.readyState == 4){
			if (xmlWC.status == 200){
				parseResultsWC()
			}
		}
	}

	function startRequestWC(cid,seas,val,tid,pid,gid,typ,cst,lng){
		if (tid>0 && typ>0){
			var mytime= "&ms="+new Date().getTime(); //Unique param val to stop IE Caching request
			var path = new String ("xml/match_list.asp");
			path = path + "?coid=" + cid + "&seas=" + seas + "&teid=" + tid + "&plid=" + pid + "&grid=" + gid + "&typ=" + typ + "&cust=" + cst + "&lang=" + lng + mytime;
			teid=tid;
			ltyp=typ;
			tval=val;
			plid=pid;
			createRequestWC();
			xmlWC.onreadystatechange = handleStateChangeWC;
			xmlWC.open("GET", path, true);
			xmlWC.send(null);
		}
	}

	function parseResultsWC(){
		xmlMatchList = xmlWC.responseText;
		var lnkid=teid+"_"+ltyp;
		if(ltyp<14){
			lnkid=plid+"_"+ltyp;
		};
		var d = document.getElementById(lnkid);
		d.style.position="relative";
		d.style.fontWeight="bold";
		var newdiv = document.createElement("div");
		newdiv.setAttribute("id","match_list");
		newdiv.innerHTML = xmlMatchList;
		if(Number(tval)>9){
			newdiv.style.left="-68px";
		}
		if(Number(tval)>99){
			newdiv.style.left="-65px";
		}
		d.appendChild(newdiv);
		fadein(0);
		curNode = lnkid;
		teid=0;
		plid=0;
		ltyp=0;
		tval=0;
	}




