

var tfd_mw_left_selected=0;
var tfd_mw_answers=[null,null,null,null,null];
function tfd_mw_click_a(b) {
	document.getElementById('tfd_mw_left').style.visibility='hidden';
	document.getElementById('tfd_mw_right').style.visibility='';
	for (var i=0;i<5;i++)
		document.getElementById('tfd_a'+i).style.border='1px black solid';
	document.getElementById(b.id).style.border='2px red solid';
	tfd_mw_left_selected=b.id.substr(5, 1);
};
function tfd_mw_click_b(b) {
	document.getElementById('tfd_mw_left').style.visibility='';
	document.getElementById('tfd_mw_right').style.visibility='hidden';
	var match=b.id.substr(5, 1);
	for (var i=0;i<5;i++) {
		if (tfd_mw_answers[i]==match) tfd_mw_answers[i]=null;
		document.getElementById('tfd_b'+i).style.backgroundColor='white';
	}
	tfd_mw_answers[tfd_mw_left_selected]=match;
	for (var i=0;i<5;i++)
		if (tfd_mw_answers[i]!=null) document.getElementById('tfd_b'+tfd_mw_answers[i]).style.backgroundColor=document.getElementById('tfd_a'+i).style.backgroundColor;
};
function tfd_mw_clear() {
	tfd_mw_answers=[null,null,null,null,null];
	for (var i=0;i<5;i++) 
		document.getElementById('tfd_b'+i).style.backgroundColor='white';
};
document.write('<input type="hidden" name="res" value=",,,,"><table cellpadding="0" cellspacing="0" id="tfd_MatchUp" align="center"><tr><td align="center"><div id="tfd_mw_left">Select word:</div>');
		document.write('<input name="tfd_a0" id="tfd_a0" value="crosspatch" readonly="yes" style="background-color:#FFCC6A;border:2px red solid" onclick="tfd_mw_click_a(this)" class="tfd_txt"><br>');
document.write('<input name="tfd_a1" id="tfd_a1" value="artifice" readonly="yes" style="background-color:#E0E774" onclick="tfd_mw_click_a(this)" class="tfd_txt"><br>');
document.write('<input name="tfd_a2" id="tfd_a2" value="glockenspiel" readonly="yes" style="background-color:#A8F08F" onclick="tfd_mw_click_a(this)" class="tfd_txt"><br>');
document.write('<input name="tfd_a3" id="tfd_a3" value="denizen" readonly="yes" style="background-color:#A8EFF0" onclick="tfd_mw_click_a(this)" class="tfd_txt"><br>');
document.write('<input name="tfd_a4" id="tfd_a4" value="mustachio" readonly="yes" style="background-color:#CACCFF" onclick="tfd_mw_click_a(this)" class="tfd_txt"><br>');

	document.write('</td><td align=center><div id=tfd_mw_right style="visibility:hidden">Select match:</div>');
	document.write('<input name="tfd_b0" id="tfd_b0" value="handle-bars" readonly="yes" style="background-color:white" onclick="tfd_mw_click_b(this)" class="tfd_txt"><br>');
document.write('<input name="tfd_b1" id="tfd_b1" value="crank" readonly="yes" style="background-color:white" onclick="tfd_mw_click_b(this)" class="tfd_txt"><br>');
document.write('<input name="tfd_b2" id="tfd_b2" value="orchestral bells" readonly="yes" style="background-color:white" onclick="tfd_mw_click_b(this)" class="tfd_txt"><br>');
document.write('<input name="tfd_b3" id="tfd_b3" value="ruse" readonly="yes" style="background-color:white" onclick="tfd_mw_click_b(this)" class="tfd_txt"><br>');
document.write('<input name="tfd_b4" id="tfd_b4" value="dweller" readonly="yes" style="background-color:white" onclick="tfd_mw_click_b(this)" class="tfd_txt"><br>');
document.write('</td></tr></table>');
//Copyright 2010 Farlex, Inc.
