
function openHelpWindow(url) {
	popupWin = window.open('/help/'+url, 'help_window', 'width=500,height=445,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no'+'toolbar=no,location=no,directories=no,status=no');
}

function updateQuestion(qid, chartDoc) {
	chartDoc.ProgressChart.setCurrentQuestion(qid);
}

function updateResponse(rid, chartDoc) {
	chartDoc.ProgressChart.setCurrentResponse(rid);
}

function updateRange(range, chartDoc) {
	//alert(range);
	chartDoc.ProgressChart.setRange(parseInt(range));
	chartDoc.DataApplet.setRange(parseInt(range));
}

function updateView(option, chartDoc, view) {
	if(option.checked==true) {
		//alert('True '+view);
		chartDoc.ProgressChart.setView(parseInt(view));
	} else {
		//alert('False '+view);
	}
}

function doChoice(choice) {
	sc = parseInt(choice);
	switch(sc) {
		case 1: updateRange(6, document);	break;
		case 2: updateRange(12, document);	break;
		case 3: updateRange(24, document);	break;
		case 4: updateRange(48, document); break;
		case 11: document.ProgressChart.setView(1); break;
		case 12: document.ProgressChart.setView(0); break;
		case 21: document.ProgressChart.setColor(1);	break;
		case 22: document.ProgressChart.setColor(2); break;
	}
}