var score=0;
var W3CDOM = (document.createElement && document.getElementsByTagName);
function highlight(oc) {
	var outcomes = document.getElementById("outcomes");
	var trs = outcomes.getElementsByTagName('tr');
	for (var i = 1; i < trs.length; i++)
		trs[i].className = "";
	trs[oc].className = "choice"
}
function boxChecked(chk) {
	score = (chk.checked) ? score+1 : score-1;
	getScore(score)
}
function init() {
	if (!W3CDOM) return;
	var tbody = document.getElementById('questions');
	for (var i = 0; i < tbody.rows.length; i++){
		var td = tbody.rows[i].cells[1];
		td.innerHTML ='<input type="checkbox" onclick="boxChecked(this)">';
	}
	getScore(score)
}

var newWindow;
function popUpText(url, winName, width, height) {
	newWindow = window.open(url, winName, "scrollbars, resizable, width=" + width + ", height=" + height );
	newWindow.focus();
}

