var server_url = 'http://coho.windyzone.com';
var cdn_url = 'http://windybeta.xcdnplus.co.kr/';

function fnGoToWeb(gameName, errCode)
{
	location.href = server_url + "/intro.ws";
}

function fnStart(a,b,c,d,e,j)
{
	
	if(a == "" || a == "error" || a == "undefined" || a == "null") {
		alert('게임을 실행하기 위해서는 먼저 로그인을 하셔야 합니다');
		return ;
	}

	if(j<19) {
		alert('컴퍼니오브히어로즈 온라인은 19세 이상만 게임을 플레이 하실 수 있습니다.');
		return;
	}
	
	//ActiveX Control Check
	if ("undefined" != typeof(document.all("WZIFLauncher")) && null != document.all("WZIFLauncher").object) {
		// The control is installed
	}
	else
	{
		// The control is not installed
		alert("먼저 ActiveX 컨트롤을 설치해야 합니다.");
		return ;
	}
	
	var frm = document.forms['frmFgtGame'];
	frm.chka.value = a;
	frm.chkb.value = b;
	frm.chkc.value = c;
	frm.chkd.value = d;
	frm.chke.value = e;
	frm.target = 'ifrmFgtGame';
	frm.method = 'post';
	frm.action = '/sub_main/launcher/check.ws';
	frm.submit();
	frm.target = '';

}


function GoGame(a,b,c,d,e)
{

	if(a == "" || a == "error" || a == "undefined" || a == "null") {
		alert('게임을 실행하기 위해서는 먼저 로그인을 하셔야 합니다');
		return ;
	}

	//ActiveX Control Check
	if ("undefined" != typeof(document.all("WZIFLauncher")) && null != document.all("WZIFLauncher").object) {
		// The control is installed
	}
	else
	{
		// The control is not installed
		alert("먼저 ActiveX 컨트롤을 설치해야 합니다.");
		return ;
	}


    WZIFLauncher.attachEvent("GoToWeb", fnGoToWeb);

	var f = '1';
	var g = '1';
	var h = '1';
	var i = '1';
	var j = 'S';
	
	
    WZIFLauncher.Start(c,d,a,b,e,f,g,h,i,j);
}

document.write ("<OBJECT ID='WZIFLauncher' CLASSID='CLSID:559E87DD-406C-43C9-BE70-3C902331CA6B' width='0' height='0' codebase='"+cdn_url+"windydev/sd/common/cab/service/1046/WZMngrAx.cab#version=1,0,4,6'></OBJECT>");

