<!--

var AHN_MKD_BLD_NUM = '2.0.0.225';
var AHN_MKDPLUS_CAB_VER = '2,0,0,27';
var AHN_MKDPLUS_AUTHSERVER = 'webclinic.ahnlab.com';
var AHN_MKDPLUS_CODEBASE = 'http://platform.nexon.com/activex/ahnlab/mkdplus.cab';
var AHN_MKDPLUS_SSL_CODEBASE = 'https://platform.nexon.com/activex/ahnlab/mkdplus.cab';

var AHN_MKDPLUS_CAB_VER_VISTA = '2,0,0,27';
var AHN_MKDPLUS_CODEBASE_VISTA = 'http://platform.nexon.com/activex/ahnlab/mkdplus_vista.cab';
var AHN_MKDPLUS_SSL_CODEBASE_VISTA = 'https://platform.nexon.com/activex/ahnlab/mkdplus_vista.cab';

var USER_MKD_BLD_NUM = '';
var USER_MKDPLUS_CAB_VER = '';
var USER_MKDPLUS_AUTHSERVER = '';
var USER_MKDPLUS_CODEBASE = '';
var USER_MKDPLUS_SSL_CODEBASE = '';

function navigator60(){
	var UA = navigator.appName;
	var ver = navigator.appVersion; 
	ver = parseInt(ver.split(";")[1].split(" ")[2]) 
	if(ver >= 6) return true;
	else return false;
}

function isVISTA()
{
	var sAgent = navigator.userAgent;
	if ( sAgent.indexOf("Windows NT 6.") >= 0 ) return true;
	return false;
}

function _launchMKD( bInsert, bSSL, type, authprefix ) {

	var MKDPLUS_CODEBASE;
	if( bSSL )
	{
		if( isVISTA() )
		{
			MKDPLUS_CODEBASE = AHN_MKDPLUS_SSL_CODEBASE_VISTA;
		}
		else
		{
			if( USER_MKDPLUS_SSL_CODEBASE == "" )
			{
				MKDPLUS_CODEBASE = AHN_MKDPLUS_SSL_CODEBASE;
			}
			else
			{
				MKDPLUS_CODEBASE = USER_MKDPLUS_SSL_CODEBASE;
			}
		}
	}
	else
	{
		if( isVISTA() )
		{
			MKDPLUS_CODEBASE = AHN_MKDPLUS_CODEBASE_VISTA;
		}
		else
		{
			if( USER_MKDPLUS_CODEBASE == "" )
			{
				MKDPLUS_CODEBASE = AHN_MKDPLUS_CODEBASE;
			}
			else
			{
				MKDPLUS_CODEBASE = USER_MKDPLUS_CODEBASE;
			}
		}
	}
	
	
	var MKDPLUS_CAB_VER;
	if( isVISTA() )
	{
		MKDPLUS_CAB_VER = AHN_MKDPLUS_CAB_VER_VISTA;
	}
	else
	{
		if( USER_MKDPLUS_CAB_VER == "" )
		{
			MKDPLUS_CAB_VER = AHN_MKDPLUS_CAB_VER;
		}
		else
		{
			MKDPLUS_CAB_VER = USER_MKDPLUS_CAB_VER;
		}
	}
	
	var MKD_BLD_NUM;
	if( USER_MKD_BLD_NUM == "" )
	{
		MKD_BLD_NUM = AHN_MKD_BLD_NUM;
	}
	else
	{
		MKD_BLD_NUM = USER_MKD_BLD_NUM;
	}
	
	var MKDPLUS_AUTHSERVER;
	if( USER_MKDPLUS_AUTHSERVER == "" )
	{
		MKDPLUS_AUTHSERVER = AHN_MKDPLUS_AUTHSERVER;
	}
	else
	{
		MKDPLUS_AUTHSERVER = USER_MKDPLUS_AUTHSERVER;
	}

	if (navigator.appName == "Netscape") {
		alert ("unsupported browser!");
	}else{
		if (bInsert == true) {
			
			if(navigator60() == true){
				var oNewItem = document.createElement("<object ID='MKDPLUS' name='MKDPLUS' CLASSID='clsid:A1D886C6-4039-4451-97A9-515F5BE5D4C2' codebase='" + MKDPLUS_CODEBASE + "#version=" + MKDPLUS_CAB_VER + "' height='0' width='0'></object>");
				var param1 = document.createElement("<PARAM NAME='AuthServer' VALUE='" + MKDPLUS_AUTHSERVER + "'>");
				var param2 = document.createElement("<PARAM NAME='Type' VALUE='" + type + "'>");
				var param3 = document.createElement("<PARAM NAME='BuildNumber' VALUE='" + MKD_BLD_NUM + "'>");
				var param4 = document.createElement("<PARAM NAME='AuthPrefix' VALUE='" + authprefix + "'>");
				oNewItem.appendChild(param1);
				oNewItem.appendChild(param2);
				oNewItem.appendChild(param3);
				oNewItem.appendChild(param4);
				document.body.insertAdjacentElement("beforeEnd",oNewItem);
			}
			else {
				document.body.insertAdjacentHTML("beforeEnd",
					"<object ID='MKDPLUS' name='MKDPLUS' CLASSID='clsid:A1D886C6-4039-4451-97A9-515F5BE5D4C2' codebase='" + MKDPLUS_CODEBASE + "#version=" + MKDPLUS_CAB_VER + "' height='0' width='0'>"
					+ "<PARAM NAME='AuthServer' VALUE='" + MKDPLUS_AUTHSERVER + "'>"
					+ "<PARAM NAME='Type' VALUE='" + type + "'>"
					+ "<PARAM NAME='BuildNumber' VALUE='" + MKD_BLD_NUM + "'>"
					+ "<PARAM NAME='AuthPrefix' VALUE='" + authprefix + "'>"
					+ "</object>");			
			}
			
		}
		else {
			document.write("<object ID='MKDPLUS' name='MKDPLUS' CLASSID='clsid:A1D886C6-4039-4451-97A9-515F5BE5D4C2' codebase='" + MKDPLUS_CODEBASE + "#version=" + MKDPLUS_CAB_VER + "' height='0' width='0'>");
			document.write("<PARAM NAME='AuthServer' VALUE='" + MKDPLUS_AUTHSERVER + "'>");
			document.write("<PARAM NAME='Type' VALUE='" + type + "'>");
			document.write("<PARAM NAME='BuildNumber' VALUE='" + MKD_BLD_NUM + "'>"); 
			document.write("<PARAM NAME='AuthPrefix' VALUE='" + authprefix + "'>"); 
			document.write("</object>");
		}
	}
}

function launchMKD() 
{
	var bInsert = false;
	var bSSL = false;
	var type= "2";
	var authprefix = "";
	
	_launchMKD( bInsert, bSSL, type, authprefix );
}

function ssl_launchMKD() 
{
	var bInsert = false;
	var bSSL = true;
	var type= "2";
	var authprefix = "";
		
	_launchMKD( bInsert, bSSL, type, authprefix );
}

function ins_launchMKD ()
{
	var bInsert = true;
	var bSSL = false;
	var type= "2";
	var authprefix = "";
	
	_launchMKD( bInsert, bSSL, type, authprefix );	
}

function ssl_ins_launchMKD() 
{
	var bInsert = true;
	var bSSL = true;
	var type= "2";
	var authprefix = "";
		
	_launchMKD( bInsert, bSSL, type, authprefix );
}

function updateMFMKD() 
{
	var bInsert = false;
	var bSSL = false;
	var type= "1";
	var authprefix = "";
		
	_launchMKD( bInsert, bSSL, type, authprefix );
}

function ssl_updateMFMKD() 
{
	var bInsert = false;
	var bSSL = true;
	var type= "1";
	var authprefix = "";
		
	_launchMKD( bInsert, bSSL, type, authprefix );
}

function ins_updateMFMKD ()
{
	var bInsert = true;
	var bSSL = false;
	var type= "1";
	var authprefix = "";
		
	_launchMKD( bInsert, bSSL, type, authprefix );
}

function ssl_ins_updateMFMKD() 
{
	var bInsert = true;
	var bSSL = true;
	var type= "1";
	var authprefix = "";
		
	_launchMKD( bInsert, bSSL, type, authprefix );
}

function launchASPType3(authServer, authprefix) 
{
	var bInsert = false;
	var bSSL = false;
	var type= "3";
	USER_MKDPLUS_AUTHSERVER = authServer;
	
	_launchMKD( bInsert, bSSL, type, authprefix );
}

function ssl_launchASPType3(authServer, authprefix) 
{
	var bInsert = false;
	var bSSL = true;
	var type= "3";
	USER_MKDPLUS_AUTHSERVER = authServer;
	
	_launchMKD( bInsert, bSSL, type, authprefix );
}

function mkdplus_set_codebase( codebase )
{
	USER_MKDPLUS_CODEBASE = codebase;
}

function mkdplus_set_ssl_codebase( codebase )
{
	USER_MKDPLUS_SSL_CODEBASE = codebase;
}
function mkdplus_set_cabver( ver )
{
	USER_MKDPLUS_CAB_VER = ver;
}

function mkdplus_set_cab_version( ver )
{
	mkdplus_set_cabver( ver );
}


function mkdplus_installed()
{
	ver = (USER_MKDPLUS_CAB_VER == '' ? AHN_MKDPLUS_CAB_VER : USER_MKDPLUS_CAB_VER).split(",")[3];
	if( isVISTA() ) ver = AHN_MKDPLUS_CAB_VER_VISTA.split(",")[3];
	
	end = AHN_MKDPLUS_CAB_VER.split(",")[3];
	if( isVISTA() ) end = AHN_MKDPLUS_CAB_VER_VISTA.split(",")[3];
	
	for( ; ; ver++ )
	{
		var xObj;
	
		try
		{
			xObj = new ActiveXObject( "mkdplus.mkdplusCtrl." + ver );
		
			if( xObj )
			{
				return true;
			}
		}
		catch( ex )
		{
		}
				
		if( ver == end )			
		{
			break;
		}
				
	}
	
	
	return false;	
}

function mkdplus_loaded()
{
	if( mkdplus_installed() == false )
	{
		return false;
	}
	
	/*
	var READYSTATE_UNINITIALIZED = 0;
	var READYSTATE_LOADING = 1;
    	var READYSTATE_LOADED = 2;
    	var READYSTATE_INTERACTIVE = 3;
    	*/
    	var READYSTATE_COMPLETE = 4;
    
    	try
    	{
	    if( MKDPLUS.readyState == READYSTATE_COMPLETE )
		{
			return true;
		}
	}
    	catch( ex )
    	{
    	}
    
	return false;
}

function mkdplus_write_object() 
{
	var bInsert = false;
	var bSSL = false;
	var type= "0";
	var authprefix = "";
		
	_launchMKD( bInsert, bSSL, type, authprefix );
}

function mkdplus_insert_object() 
{
	var bInsert = true;
	var bSSL = false;
	var type= "0";
	var authprefix = "";
		
	_launchMKD( bInsert, bSSL, type, authprefix );
}

function mkdplus_ssl_write_object() 
{
	var bInsert = false;
	var bSSL = true;
	var type= "0";
	var authprefix = "";
		
	_launchMKD( bInsert, bSSL, type, authprefix );
}

function mkdplus_ssl_insert_object() 
{
	var bInsert = true;
	var bSSL = true;
	var type= "0";
	var authprefix = "";
		
	_launchMKD( bInsert, bSSL, type, authprefix );
}

function mkdplus_set_authprefix( authprefix )
{
	MKDPLUS.AuthPrefix = authprefix;
}

function mkdplus_start( product )
{
	if( document.readyState == "complete" )
	{
		MKDPLUS.Start( product );
	}
	else
	{
		window.setTimeout( "mkdplus_start('" + product + "')", 100 );
	}
}

function mkdplus_start_now( product )
{
	MKDPLUS.Start( product );
}

function mkdplus_start_async( product )
{
	if( document.readyState == "complete" )
	{
		MKDPLUS.StartAsync( product );
	}
	else
	{
		window.setTimeout( "mkdplus_start_async('" + product + "')", 100 );
	}
}

function mkdplus_start_async_now( product )
{
	MKDPLUS.StartAsync( product );
}

function mkdplus_start_direct( product )
{
	MKDPLUS.StartDirect( product );
}


function mkdplus_set_authserver( authserver )
{
	MKDPLUS.AuthServer = authserver;
}

function mkdplus_copy_to_form( form_object )
{
	ownerDocument = form_object.ownerDocument;

	ownerDocument.MKDPLUS.SkipVerify( 1 );

	collObjects = form_object.getElementsByTagName( "input" );

	for( i=0; i<collObjects.length; i++ )
	{
		if( collObjects[i].type == "password" )
		{
			collObjects[i].value = ownerDocument.MKDPLUS.GetText2( collObjects[i] );
		}
	}

	ownerDocument.MKDPLUS.SkipVerify( 0 );
}

// -->