function CheckLogin()
{
	var user_id = getCookie('UserId');

	if( typeof(user_id) == "undefined" ){
		alert('·Î±×ÀÎ ÆäÀÌÁö·Î ÀÌµ¿ÇÕ´Ï´Ù.');
		window.open('http://clubmall.hankyung.com/members/mem_login.php?url='+location.href,'_self');
		return;
	}

	return true;

}

function CheckSubmit()
{
	var f = document.form1;

	if(!CheckLogin()) return;

	var cnt = 0;
    for(i=0;i<f.length;i++){
		if(f[i].name.substring(0,3)=='sol'){
			if(f[i].name==f[i-1].name) continue;
			cnt++;
		}
	}
    for(i=0;i<cnt;i++){
		var SolCheck = false;
		var obj = eval("f.sol" + i);

		if(obj){
			for(j=0;j<obj.length;j++ ) {
				if( obj[j].checked ) SolCheck = true;
			}
			if(!SolCheck){
				alert('Quiz ' + (i+1) + '. ¿¡ ´äÇØÁÖ½Ê½Ã¿À.');
				obj[0].focus();
				return;
			}
		}
	}
/*   
	

	if (focusWin == null) {
		alert('Â÷´ÜµÈ ÆË¾÷Ã¢À» Çã¿ëÇØ ÁÖ½Ê½Ã¿À.');
		return;
	}
*/
	window.open('','focusWin','left=200,top=150,width=320,height=210,scrollbars=no,resizable=no');
	f.action = "/health/info/health_quiz_end.php";
	f.target = 'focusWin';
	f.submit();
}
