// 외국어 발음 학습/평가를 위한 오디오 마법사(Audio Wizard)
// (주)언어과학

function audioWizardCheck(audioWizardPath,refURL,skip_opt,popup_opt,popupWidth,popupHeight)
{
	var openURL = audioWizardPath + 'audioWizardInstall.html?';
	
	if (skip_opt == true)
	{
		if (popup_opt == true)
		{
			openURL += 'skipchin=true&popopt=true';
		}
		else
		{
			openURL += 'skipchin=true&popopt=false';
		}
	}
	else
	{
		if (popup_opt == true)
		{
			openURL += 'skipchin=false&popopt=true';
		}
		else
		{
			openURL += 'skipchin=false&popopt=false';
		}
	}

	openURL += '&refurl=' + refURL;

	document.eoneoAudioWizardForm.popupWidth.value = popupWidth;
	document.eoneoAudioWizardForm.popupHeight.value = popupHeight;
	document.eoneoAudioWizardForm.cabFilePath.value = audioWizardPath;

	var WinWidth = 650;
	var WinHeight = 570;
	var y = screen.width/2-WinWidth/2;
	var x = screen.height/2-WinHeight/2; 

	var awPopup = window.open(openURL,'eoneoAW','scrollbars=no,width='+WinWidth+',height='+WinHeight+',top='+x +',left='+y);
	if (!awPopup)
	{
		var msg = "인터넷 익스플로러 매뉴의 도구(T) - 팝업 차단(P)에서 팝업 차단 사용 안 함(B)을 클릭해주세요.\n\n";
			msg += "음성인식 학습을 위한 ‘오디오 환경 마법사’ 실행이 중단되었습니다.";
		alert(msg);
	}

	awPopup.focus();
}

document.write("<form name='eoneoAudioWizardForm'>");
document.write("<input type='hidden' name='popupWidth' value=''>");
document.write("<input type='hidden' name='popupHeight' value=''>");
document.write("<input type='hidden' name='cabFilePath' value=''>");
document.write("</form>");