function Change(match, res) {
	if (res==30) {
		eval("document.matchid.m"+match+"_30.src = Img30R.src");
		eval("document.matchid.m"+match+"_31.src = Img31.src");
		eval("document.matchid.m"+match+"_32.src = Img32.src");
		eval("document.matchid.m"+match+"_03.src = Img03.src");
		eval("document.matchid.m"+match+"_13.src = Img13.src");
		eval("document.matchid.m"+match+"_23.src = Img23.src");
		eval("PL["+match+"]=Ch30;");
	} else if (res==31) {
		eval("document.matchid.m"+match+"_30.src = Img30.src");
		eval("document.matchid.m"+match+"_31.src = Img31R.src");
		eval("document.matchid.m"+match+"_32.src = Img32.src");
		eval("document.matchid.m"+match+"_03.src = Img03.src");
		eval("document.matchid.m"+match+"_13.src = Img13.src");
		eval("document.matchid.m"+match+"_23.src = Img23.src");
		eval("PL["+match+"]=Ch31;");
	} else if (res==32) {
		eval("document.matchid.m"+match+"_30.src = Img30.src");
		eval("document.matchid.m"+match+"_31.src = Img31.src");
		eval("document.matchid.m"+match+"_32.src = Img32R.src");
		eval("document.matchid.m"+match+"_03.src = Img03.src");
		eval("document.matchid.m"+match+"_13.src = Img13.src");
		eval("document.matchid.m"+match+"_23.src = Img23.src");
		eval("PL["+match+"]=Ch32;");
	} else if (res==03) {
		eval("document.matchid.m"+match+"_30.src = Img30.src");
		eval("document.matchid.m"+match+"_31.src = Img31.src");
		eval("document.matchid.m"+match+"_32.src = Img32.src");
		eval("document.matchid.m"+match+"_03.src = Img03R.src");
		eval("document.matchid.m"+match+"_13.src = Img13.src");
		eval("document.matchid.m"+match+"_23.src = Img23.src");
		eval("PL["+match+"]=Ch03;");
	} else if (res==13) {
		eval("document.matchid.m"+match+"_30.src = Img30.src");
		eval("document.matchid.m"+match+"_31.src = Img31.src");
		eval("document.matchid.m"+match+"_32.src = Img32.src");
		eval("document.matchid.m"+match+"_03.src = Img03.src");
		eval("document.matchid.m"+match+"_13.src = Img13R.src");
		eval("document.matchid.m"+match+"_23.src = Img23.src");
		eval("PL["+match+"]=Ch13;");
	} else {
		eval("document.matchid.m"+match+"_30.src = Img30.src");
		eval("document.matchid.m"+match+"_31.src = Img31.src");
		eval("document.matchid.m"+match+"_32.src = Img32.src");
		eval("document.matchid.m"+match+"_03.src = Img03.src");
		eval("document.matchid.m"+match+"_13.src = Img13.src");
		eval("document.matchid.m"+match+"_23.src = Img23R.src");
		eval("PL["+match+"]=Ch23;");
	}
}

function InitTab(length) {
	this.length = length;
	for(i=1; i<=length; i++) this[i] = "";
	return this;
}

function ValideGrille(tot) {
	for (i=1; i<=tot; i++) {
		if (PL[i]!="") { if (PL[i]!="undefined"){
			eval("document.matchid.r_"+i+".value=PL["+i+"];");
		} else {eval("document.matchid.r_"+i+".value=undefined;");}}
		else {eval("document.matchid.r_"+i+".value=undefined;");}
	}
	document.matchid.submit();
	return;
}

