﻿function getRadioValue(obj) {
	var src;
	for (i = 0; i < obj.length; i++) {
		if (obj[i].checked) {
			src = obj[i].value;
		}
	}
	if (src) {
		ret = src;
	} else {
		ret = '';
	}
	return ret;
}

function getCheckValue(obj) {
	if (obj.checked) {
		ret = obj.value;
	} else {
		ret = '';
	}
	return ret;
}

function wopen()
{
	q1   = getRadioValue(document.question.q1);
	q1_1 = getCheckValue(document.question.q1_1);
	q2_1 = getCheckValue(document.question.q2_1);
	q2_2 = getCheckValue(document.question.q2_2);
	q2_3 = getCheckValue(document.question.q2_3);
	q2_4 = getCheckValue(document.question.q2_4);
	q2_5 = getCheckValue(document.question.q2_5);
	q2_6 = getCheckValue(document.question.q2_6);
	q3_1 = getCheckValue(document.question.q3_1);
	q3_2 = getCheckValue(document.question.q3_2);
	q3_3 = getCheckValue(document.question.q3_3);
	q3_4 = getCheckValue(document.question.q3_4);
	q4_1 = getCheckValue(document.question.q4_1);
	q4_2 = getCheckValue(document.question.q4_2);
	q4_3 = getCheckValue(document.question.q4_3);
	q4_4 = getCheckValue(document.question.q4_4);
	q4_5 = getCheckValue(document.question.q4_5);
	q4_6 = getCheckValue(document.question.q4_6);
	q4_7 = getCheckValue(document.question.q4_7);
	q4_8 = getCheckValue(document.question.q4_8);
	q4_9 = getCheckValue(document.question.q4_9);
	q5   = getRadioValue(document.question.q5);

	query = 'q1=' + q1;
	query = query + '&q1_1=' + q1_1;
	query = query + '&q2_1=' + q2_1;
	query = query + '&q2_2=' + q2_2;
	query = query + '&q2_3=' + q2_3;
	query = query + '&q2_4=' + q2_4;
	query = query + '&q2_5=' + q2_5;
	query = query + '&q2_6=' + q2_6;
	query = query + '&q3_1=' + q3_1;
	query = query + '&q3_2=' + q3_2;
	query = query + '&q3_3=' + q3_3;
	query = query + '&q3_4=' + q3_4;
	query = query + '&q4_1=' + q4_1;
	query = query + '&q4_2=' + q4_2;
	query = query + '&q4_3=' + q4_3;
	query = query + '&q4_4=' + q4_4;
	query = query + '&q4_5=' + q4_5;
	query = query + '&q4_6=' + q4_6;
	query = query + '&q4_7=' + q4_7;
	query = query + '&q4_8=' + q4_8;
	query = query + '&q4_9=' + q4_9;
	query = query + '&q5=' + q5;

window.open("/cgi-bin/ans.cgi?" + query,"sample1","toolbar=0,menubar=1,scrollbars=1,width=560,height=620")

}

