function class_video(myString) {
	var mySplitResult = myString.split('//**//');
	
	switch(mySplitResult[2]) {
		case 'submitVideoQuestionForm':
			switch(mySplitResult[3]) {
				case 'success':
					var ansResult = mySplitResult[4].split('/n/r');
					
					ansResultLength = ansResult.length - 1;
					for(i = 0; i < ansResultLength; i++ ) {
						//alert(ansResult[i]);
					}
					
					location.href = 'video_result.php?ans01='+ansResult[0]+'&ans02='+ansResult[1]+'&ans03='+ansResult[2]+'&ans04='+ansResult[3]+'&ans05='+ansResult[4]+'&ans06='+ansResult[5]+'&ans07='+ansResult[6]+'&ans08='+ansResult[7]+'&ans09='+ansResult[8]+'&ans10='+ansResult[9];
				break;
				case 'fail':
					var errorResult = mySplitResult[4].split('/n/r');
					var displayErrorResult = '';
					
					errorResultLength = errorResult.length - 1;
					for(i = 0; i < errorResultLength; i++ ) {
						displayErrorResult += errorResult[i]+'\n';
					}
					alert(displayErrorResult);
				break;
			}
		break;
	}
}

function submitVideoQuestionForm(memberId) {
	if(confirm('每人只可作答一次, 確定遞交答案?')) {
		var ans01, ans02, ans03, ans04, ans05, ans06, ans07, ans08, ans09, ans10;
		
		ans01 = 0;
		for(i = 0; i < document.video_question_form.ans01.length; i++ ) {
			if(document.video_question_form.ans01[i].checked) {
				ans01 = document.video_question_form.ans01[i].value;
			}
		};
		
		ans02 = 0;
		for(i = 0; i < document.video_question_form.ans02.length; i++ ) {
			if(document.video_question_form.ans02[i].checked) {
				ans02 = document.video_question_form.ans02[i].value;
			}
		};
		
		ans03 = 0;
		for(i = 0; i < document.video_question_form.ans03.length; i++ ) {
			if(document.video_question_form.ans03[i].checked) {
				ans03 = document.video_question_form.ans03[i].value;
			}
		};
		
		ans04 = 0;
		for(i = 0; i < document.video_question_form.ans04.length; i++ ) {
			if(document.video_question_form.ans04[i].checked) {
				ans04 = document.video_question_form.ans04[i].value;
			}
		};
		
		ans05 = 0;
		for(i = 0; i < document.video_question_form.ans05.length; i++ ) {
			if(document.video_question_form.ans05[i].checked) {
				ans05 = document.video_question_form.ans05[i].value;
			}
		};
		
		ans06 = 0;
		for(i = 0; i < document.video_question_form.ans06.length; i++ ) {
			if(document.video_question_form.ans06[i].checked) {
				ans06 = document.video_question_form.ans06[i].value;
			}
		};
		
		ans07 = 0;
		for(i = 0; i < document.video_question_form.ans07.length; i++ ) {
			if(document.video_question_form.ans07[i].checked) {
				ans07 = document.video_question_form.ans07[i].value;
			}
		};
		
		ans08 = 0;
		for(i = 0; i < document.video_question_form.ans08.length; i++ ) {
			if(document.video_question_form.ans08[i].checked) {
				ans08 = document.video_question_form.ans08[i].value;
			}
		};
		
		ans09 = 0;
		for(i = 0; i < document.video_question_form.ans09.length; i++ ) {
			if(document.video_question_form.ans09[i].checked) {
				ans09 = document.video_question_form.ans09[i].value;
			}
		};
		
		ans10 = 0;
		for(i = 0; i < document.video_question_form.ans10.length; i++ ) {
			if(document.video_question_form.ans10[i].checked) {
				ans10 = document.video_question_form.ans10[i].value;
			}
		};
		
		receiverXMLHttpObj.open('POST','video_act.php',true);
		receiverXMLHttpObj.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		receiverXMLHttpObj.send('action_type=submitVideoQuestionForm&member_id='+memberId+'&ans01='+ans01+'&ans02='+ans02+'&ans03='+ans03+'&ans04='+ans04+'&ans05='+ans05+'&ans06='+ans06+'&ans07='+ans07+'&ans08='+ans08+'&ans09='+ans09+'&ans10='+ans10);
		receiverStatusChecker();
		receiverXMLHttpObj.onreadystatechange=receiverStatusChecker;
	}
}
