<!--
var AHN_AHNASP_CAB_VER			= "1,0,0,61";
var AHN_AHNASP_AUTH_SERVER		= 'webclinic.ahnlab.com';
var AHN_AHNASP_CODEBASE			= 'http://ahnlabdownload.nefficient.co.kr/asp/cab/AhnASP.cab';
var AHN_AHNASP_SSL_CODEBASE		= 'https://secwebclinic.ahnlab.com/asp/cab/AhnASP.cab';
var AHN_AHNASP_OBJECT_NAME		= 'AhnASP';

var AHN_NPAHNASP_XPI_CODEBASE		= 'http://ahnlabdownload.nefficient.co.kr/asp/cab/NPAhnASP.xpi';
var AHN_NPAHNASP_XPI_SSL_CODEBASE	= 'https://secwebclinic.ahnlab.com/asp/cab/NPAhnASP.xpi';
var AHN_NPAHNASP_TYPE			= 'application/ahnasp_1,0,0,10';
var AHN_NPAHNASP_SUPPORT_FIREFOX_VER	= new Array() ;
AHN_NPAHNASP_SUPPORT_FIREFOX_VER[0] 	= 1 ; // Greater than 1.x
AHN_NPAHNASP_SUPPORT_FIREFOX_VER[1]	= 5 ; // Greater than 1.5

if( IsVista() )
{
  AHN_AHNASP_CODEBASE       = 'http://ahnlabdownload.nefficient.co.kr/asp/cab/AhnASP_vista.cab' ;
  AHN_AHNASP_SSL_CODEBASE   = 'https://secwebclinic.ahnlab.com/asp/cab/AhnASP_vista.cab' ;
}

function AhnASP_SetCabVersion( strVersion )
{
  if( IsVista() ) return ;
	AHN_AHNASP_CAB_VER = strVersion ;
}

function AhnASP_SetAuthServer( strServer )
{
	AHN_AHNASP_AUTH_SERVER = strServer ;
}

function AhnASP_SetCodeBase( strCodebase )
{
	AHN_AHNASP_CODEBASE = strCodebase ;
}

function AhnASP_SetCodeBaseSSL( strSSLCodebase )
{
	AHN_AHNASP_SSL_CODEBASE = strSSLCodebase ;
}

function AhnASP_SetObjectName( strObjectName )
{
	AHN_AHNASP_OBJECT_NAME = strObjectName ;
}

function NPAhnASP_SetCodeBase( strCodebase )
{
	AHN_NPAHNASP_XPI_CODEBASE = strCodebase ;
}

function NPAhnASP_SetCodeBaseSSL( strCodebase )
{
	AHN_NPAHNASP_XPI_SSL_CODEBASE = strCodebase
}

function NPAhnASP_SetNPAhnASPType( strType )
{
	AHN_NPAHNASP_TYPE = strType ;
}


// InsertMode: document.write
function launchASP(bUseAsyncMode, strID)
{
	AhnASP_Set_LauchASP_InsertMode( false ) ;
	AhnASP_Set_LaunchASP_IsCodeBaseSSL( false ) ;
	AhnASP_Set_LaunchASP_StartUpType( IsMKDObject(true) ) ;
	AhnASP_Set_LaunchASP_AsyncMode( bUseAsyncMode ) ;
	AhnASP_Set_LaunchASP_ID( strID ) ;

	_launchASP ();
}

// InsertMode: document.write
function ssl_launchASP(bUseAsyncMode, strID)
{
	AhnASP_Set_LauchASP_InsertMode( false ) ;
	AhnASP_Set_LaunchASP_IsCodeBaseSSL( true ) ;
	AhnASP_Set_LaunchASP_StartUpType( IsMKDObject(true) ) ;
	AhnASP_Set_LaunchASP_AsyncMode( bUseAsyncMode ) ;
	AhnASP_Set_LaunchASP_ID( strID ) ;

	_launchASP ();
}

// InsertMode: document.body.insertAdjacentElement
function ins_launchASP(bUseAsyncMode, strID)
{
	AhnASP_Set_LauchASP_InsertMode( true ) ;
	AhnASP_Set_LaunchASP_IsCodeBaseSSL( false ) ;
	AhnASP_Set_LaunchASP_StartUpType( IsMKDObject(true) ) ;
	AhnASP_Set_LaunchASP_AsyncMode( bUseAsyncMode ) ;
	AhnASP_Set_LaunchASP_ID( strID ) ;

	_launchASP ();
}

// InsertMode: document.body.insertAdjacentElement
function ssl_ins_launchASP(bUseAsyncMode, strID)
{
	AhnASP_Set_LauchASP_InsertMode( true ) ;
	AhnASP_Set_LaunchASP_IsCodeBaseSSL( true ) ;
	AhnASP_Set_LaunchASP_StartUpType( IsMKDObject(true) ) ;
	AhnASP_Set_LaunchASP_AsyncMode( bUseAsyncMode ) ;
	AhnASP_Set_LaunchASP_ID( strID ) ;

	_launchASP ();
}

// InsertMode: document.write
function check_launchASP(bUseAsyncMode, strID)
{
	AhnASP_Set_LauchASP_InsertMode( false ) ;
	AhnASP_Set_LaunchASP_IsCodeBaseSSL( false ) ; AhnASP_SetCodeBase( "" ) ;
	AhnASP_Set_LaunchASP_StartUpType( IsMKDObject(true) ) ;
	AhnASP_Set_LaunchASP_AsyncMode( bUseAsyncMode ) ;
	AhnASP_Set_LaunchASP_ID( strID ) ;

	_launchASP ();
}

// InsertMode: document.write
function check_ssl_launchASP(bUseAsyncMode, strID)
{
	AhnASP_Set_LauchASP_InsertMode( false ) ;
	AhnASP_Set_LaunchASP_IsCodeBaseSSL( true ) ; AhnASP_SetCodeBaseSSL( "" ) ;
	AhnASP_Set_LaunchASP_StartUpType( IsMKDObject(true) ) ;
	AhnASP_Set_LaunchASP_AsyncMode( bUseAsyncMode ) ;
	AhnASP_Set_LaunchASP_ID( strID ) ;

	_launchASP ();
}

// InsertMode: document.body.insertAdjacentElement
function check_ins_launchASP (bUseAsyncMode, strID)
{
	AhnASP_Set_LauchASP_InsertMode( true ) ;
	AhnASP_Set_LaunchASP_IsCodeBaseSSL( false ) ; AhnASP_SetCodeBase( "" ) ;
	AhnASP_Set_LaunchASP_StartUpType( IsMKDObject(true) ) ;
	AhnASP_Set_LaunchASP_AsyncMode( bUseAsyncMode ) ;
	AhnASP_Set_LaunchASP_ID( strID ) ;

	_launchASP ();
}

// InsertMode: document.body.insertAdjacentElement
function check_ssl_ins_launchASP(bUseAsyncMode, strID)
{
	AhnASP_Set_LauchASP_InsertMode( true ) ;
	AhnASP_Set_LaunchASP_IsCodeBaseSSL( true ) ; AhnASP_SetCodeBaseSSL( "" ) ;
	AhnASP_Set_LaunchASP_StartUpType( IsMKDObject(true) ) ;
	AhnASP_Set_LaunchASP_AsyncMode( bUseAsyncMode ) ;
	AhnASP_Set_LaunchASP_ID( strID ) ;

	_launchASP ();
}

// InsertMode: document.write
function self_launchASP(bUseAsyncMode, strID)
{
	AhnASP_Set_LauchASP_InsertMode( false ) ;
	AhnASP_Set_LaunchASP_IsCodeBaseSSL( false ) ;
	AhnASP_Set_LaunchASP_StartUpType( IsMKDObject(false) ) ;
	AhnASP_Set_LaunchASP_AsyncMode( bUseAsyncMode ) ;
	AhnASP_Set_LaunchASP_ID( strID ) ;

	_launchASP ();
}

// InsertMode: document.write
function self_ssl_launchASP(bUseAsyncMode, strID)
{
	AhnASP_Set_LauchASP_InsertMode( false ) ;
	AhnASP_Set_LaunchASP_IsCodeBaseSSL( true ) ;
	AhnASP_Set_LaunchASP_StartUpType( IsMKDObject(true) ) ;
	AhnASP_Set_LaunchASP_AsyncMode( bUseAsyncMode ) ;
	AhnASP_Set_LaunchASP_ID( strID ) ;

	_launchASP ();
}

// InsertMode: document.body.insertAdjacentElement
function self_ins_launchASP (bUseAsyncMode, strID)
{
	AhnASP_Set_LauchASP_InsertMode( true ) ;
	AhnASP_Set_LaunchASP_IsCodeBaseSSL( false ) ;
	AhnASP_Set_LaunchASP_StartUpType( IsMKDObject(true) ) ;
	AhnASP_Set_LaunchASP_AsyncMode( bUseAsyncMode ) ;
	AhnASP_Set_LaunchASP_ID( strID ) ;

	_launchASP ();
}

// InsertMode: document.body.insertAdjacentElement
function self_ssl_ins_launchASP(bUseAsyncMode, strID)
{
	AhnASP_Set_LauchASP_InsertMode( true ) ;
	AhnASP_Set_LaunchASP_IsCodeBaseSSL( true ) ;
	AhnASP_Set_LaunchASP_StartUpType( IsMKDObject(true) ) ;
	AhnASP_Set_LaunchASP_AsyncMode( bUseAsyncMode ) ;
	AhnASP_Set_LaunchASP_ID( strID ) ;

	_launchASP ();
}

// InsertMode: document.write
function self_check_launchASP(bUseAsyncMode, strID)
{
	AhnASP_Set_LauchASP_InsertMode( false ) ;
	AhnASP_Set_LaunchASP_IsCodeBaseSSL( false ) ; AhnASP_SetCodeBase( "" ) ;
	AhnASP_Set_LaunchASP_StartUpType( IsMKDObject(false) ) ;
	AhnASP_Set_LaunchASP_AsyncMode( bUseAsyncMode ) ;
	AhnASP_Set_LaunchASP_ID( strID ) ;

	_launchASP ();
}

// InsertMode: document.write
function self_check_ssl_launchASP(bUseAsyncMode, strID)
{
	AhnASP_Set_LauchASP_InsertMode( false ) ;
	AhnASP_Set_LaunchASP_IsCodeBaseSSL( true ) ; AhnASP_SetCodeBaseSSL( "" ) ;
	AhnASP_Set_LaunchASP_StartUpType( IsMKDObject(false) ) ;
	AhnASP_Set_LaunchASP_AsyncMode( bUseAsyncMode ) ;
	AhnASP_Set_LaunchASP_ID( strID ) ;

	_launchASP ();
}

// InsertMode: document.body.insertAdjacentElement
function self_check_ins_launchASP (bUseAsyncMode, strID)
{
	AhnASP_Set_LauchASP_InsertMode( true ) ;
	AhnASP_Set_LaunchASP_IsCodeBaseSSL( false ) ; AhnASP_SetCodeBase( "" ) ;
	AhnASP_Set_LaunchASP_StartUpType( IsMKDObject(false) ) ;
	AhnASP_Set_LaunchASP_AsyncMode( bUseAsyncMode ) ;
	AhnASP_Set_LaunchASP_ID( strID ) ;

	_launchASP ();
}

// InsertMode: document.body.insertAdjacentElement
function self_check_ssl_ins_launchASP(bUseAsyncMode, strID)
{
	AhnASP_Set_LauchASP_InsertMode( true ) ;
	AhnASP_Set_LaunchASP_IsCodeBaseSSL( true ) ; AhnASP_SetCodeBaseSSL( "" ) ;
	AhnASP_Set_LaunchASP_StartUpType( IsMKDObject(false) ) ;
	AhnASP_Set_LaunchASP_AsyncMode( bUseAsyncMode ) ;
	AhnASP_Set_LaunchASP_ID( strID ) ;

	_launchASP ();
}

// InsertMode: document.write
function TerminatePD()
{
	AhnASP_Set_LauchASP_InsertMode( false ) ;
	AhnASP_Set_LaunchASP_IsCodeBaseSSL( false ) ;
	AhnASP_Set_LaunchASP_StartUpType( false ) ;
	AhnASP_Set_LaunchASP_AsyncMode( false ) ;
	AhnASP_Set_LaunchASP_ID( "" ) ;

	_launchASP ();
}

// InsertMode: document.write
function ssl_TerminatePD()
{
	AhnASP_Set_LauchASP_InsertMode( false ) ;
	AhnASP_Set_LaunchASP_IsCodeBaseSSL( true ) ;
	AhnASP_Set_LaunchASP_StartUpType( false ) ;
	AhnASP_Set_LaunchASP_AsyncMode( false ) ;
	AhnASP_Set_LaunchASP_ID( "" ) ;

	_launchASP ();
}



/***********************************************************************************
* SmartUpdatei Execution Code
************************************************************************************/

var AHN_LAUNCHASP_INSERTMODE	= false ;
var AHN_LAUNCHASP_ISCODEBASESSL	= false ;
var AHN_LAUNCHASP_STARTUPTYPE	= "" ;
var AHN_LAUNCHASP_ASYNCMODE	= false ;
var AHN_LAUNCHASP_ID		= "" ;
var AHN_LAUNCHASP_ENTERPRISE_ID = "" ;

function AhnASP_Set_LauchASP_InsertMode( bInsertMode )
{
	AHN_LAUNCHASP_INSERTMODE = bInsertMode ;
}

function AhnASP_Set_LaunchASP_IsCodeBaseSSL( bIsCodebaseSSL )
{
	AHN_LAUNCHASP_ISCODEBASESSL = bIsCodebaseSSL ;
}

function AhnASP_Set_LaunchASP_StartUpType( bStartUpType )
{
	AHN_LAUNCHASP_STARTUPTYPE = bStartUpType ;
}

function AhnASP_Set_LaunchASP_AsyncMode( bAsyncMode )
{
	AHN_LAUNCHASP_ASYNCMODE = bAsyncMode ;
}

function AhnASP_Set_LaunchASP_ID( strID )
{
	AHN_LAUNCHASP_ID = strID ;
}

// For SpeedUp2.0
function AhnASP_Set_LaunchASP_EnterpriseID( strID )
{
	AHN_LAUNCHASP_ENTERPRISE_ID = strID ;
}

// debug
var g_strInsertedObjectHTML = "" ;

function _launchASP ()
{
	// debug
	g_strInsertedObjectHTML = "" ;

	var strOBJECT_tag         = "" ;
	var strOBJECT_tagClose    = "" ;
	var strPARAM_AuthServer   = "" ;
	var strPARAM_StarupType   = "" ;
	var strPARAM_AsynMode     = "" ;
	var strPARAM_ID           = "" ;
	var strPARAM_EnterpriseID = "" ;
	
	if( IsBrowserFirefox() )
	{
		// Firefox
		if( IsValidFirefoxVersion( GetFireFoxVersion() ) )
		{	
			if( IsPluginInstalled() )
			{				
				strOBJECT_tag         = "<OBJECT type='"+AHN_NPAHNASP_TYPE+"' id='"+AHN_AHNASP_OBJECT_NAME+"' name='"+AHN_AHNASP_OBJECT_NAME+"' height=0 width=0>";
				strOBJECT_tagClose    = "</OBJECT>";				
			}
			else
			{
				// Not installed plugin
				if ( AHN_AHNASP_CODEBASE != "" )
					setTimeout("InstallPlugIn()", 1000); 
					
				return ;
			}				
		}
		else
		{
			alert( 'Current browser is not supported' ) ;
			return ;
		}		
	}
	else
	{
		// IE
		if( AHN_LAUNCHASP_ISCODEBASESSL )
			strCodebase = AHN_AHNASP_SSL_CODEBASE ;
		else
			strCodebase = AHN_AHNASP_CODEBASE ;

		strOBJECT_tag         = "<OBJECT classid='CLSID:6531D99C-0D0E-4293-B3CB-A3E1D0D41847' id='"+AHN_AHNASP_OBJECT_NAME+"' name='"+AHN_AHNASP_OBJECT_NAME+"' height=0 width=0 codebase='" + strCodebase + "#version=" + AHN_AHNASP_CAB_VER +"'>";
		strOBJECT_tagClose    = "</OBJECT>";
	}

	strPARAM_AuthServer   = "<PARAM NAME='AuthServer' VALUE='" + AHN_AHNASP_AUTH_SERVER + "'>";

	if ( AHN_LAUNCHASP_STARTUPTYPE == true )
		strPARAM_StarupType = "<PARAM NAME='StartupType' VALUE='manual'>";

	if ( AHN_LAUNCHASP_ASYNCMODE == true )
		strPARAM_AsynMode = "<PARAM NAME='AsyncMode' VALUE='1'>";

	if ( IsNullObject(AHN_LAUNCHASP_ID) == false )
		strPARAM_ID = "<PARAM NAME='ID' VALUE='" + AHN_LAUNCHASP_ID + "'>";

	// for SpeedUp2.0
	if ( IsNullObject(AHN_LAUNCHASP_ENTERPRISE_ID) == false )
		strPARAM_EnterpriseID = "<PARAM NAME='MyWCEnterpriseUser' VALUE='" + AHN_LAUNCHASP_ENTERPRISE_ID + "'>";


	var strHTML =	strOBJECT_tag
			+ strPARAM_AuthServer
			+ strPARAM_StarupType
			+ strPARAM_AsynMode
			+ strPARAM_ID
			+ strPARAM_EnterpriseID
			+ strOBJECT_tagClose;

	if( IsBrowserFirefox() == true )
	{		
		document.body.innerHTML += strHTML ;
		
		// debug
		g_strInsertedObjectHTML = "document.body.innerHTML \n" + strHTML ;
	}

	else if (AHN_LAUNCHASP_INSERTMODE == true)
	{
		// Greater than IE6
		if(IsGreaterIE6() == true)
		{
			var oNewItem = document.createElement(strOBJECT_tag + strOBJECT_tagClose);

			var paramAuthServer = document.createElement(strPARAM_AuthServer);
			oNewItem.appendChild(paramAuthServer);

			if ( AHN_LAUNCHASP_STARTUPTYPE == true )
			{
				var paramStartupType = document.createElement(strPARAM_StarupType);
				oNewItem.appendChild(paramStartupType);
			}
			if ( AHN_LAUNCHASP_ASYNCMODE == true )
			{
				var paramAsyncMode = document.createElement(strPARAM_AsynMode);
				oNewItem.appendChild(paramAsyncMode);
			}
			if ( IsNullObject(AHN_LAUNCHASP_ID) == false )
			{
				var paramID = document.createElement(strPARAM_ID);
		 		oNewItem.appendChild(paramID);
		 	}
			if ( IsNullObject(AHN_LAUNCHASP_ENTERPRISE_ID) == false )
			{
				var paramEnterpriseID = document.createElement(strPARAM_EnterpriseID);
		 		oNewItem.appendChild(paramEnterpriseID);
		 	}

			document.body.insertAdjacentElement("beforeEnd",oNewItem);

			// debug
			g_strInsertedObjectHTML = "oNewItem \n" + oNewItem.outerHTML ;
		}
		

		// Less than IE5
		else 

		{
			document.body.insertAdjacentHTML("beforeEnd", strHTML ) ;

			// debug
			g_strInsertedObjectHTML = "document.body.insertAdjacentHTML \n" + strHTML ;
		}
	}

	else
	{
		// bInsertMode == false
		document.write( strHTML ) ;

		// debug
		g_strInsertedObjectHTML = "document.write \n" + strHTML ;
	}
	
	
	
	// Firefox ¿Í IE È£È¯À» À§ÇØ 
	if( IsBrowserFirefox() )
	{
		document.getElementById( AHN_AHNASP_OBJECT_NAME ).object = 1 ;
	}

}

function IsNullObject (obj)
{
	if ( 	obj == null 			||
		typeof(obj) == "undefined" 	)
	{
		return true;
	}
	return false;
}

function IsMKDObject(bParentDocument)
{
	if (bParentDocument == true)
	{
		if (	IsNullObject(parent.document.MKD20X) 	== false ||
			IsNullObject(parent.document.MKD20XP) 	== false ||
			IsNullObject(parent.document.MK2SFW) 	== false ||
			IsNullObject(parent.document.MK2INISW) 	== false ||
			IsNullObject(parent.document.MKDINISW) == false ||
			IsNullObject(parent.document.MKDPLUS) == false ||
			IsNullObject(parent.document.MK2SECUI) 	== false ||
			IsNullObject(parent.document.MKD20BTW) 	== false ||
			IsNullObject(parent.document.MKD20DM) 	== false  )
		{
			return true;
		}
	}
	else
	{
		if (	IsNullObject(document.MKD20X) 	== false ||
			IsNullObject(document.MKD20XP) 	== false ||
			IsNullObject(document.MK2SFW) 	== false ||
			IsNullObject(document.MK2INISW) == false ||
			IsNullObject(document.MKDINISW) == false ||
			IsNullObject(document.MKDPLUS) == false ||
			IsNullObject(document.MK2SECUI) == false ||
			IsNullObject(document.MKD20BTW) == false ||
			IsNullObject(document.MKD20DM)	== false  )
		{
			return true;
		}
	}

	return false;
}

function IsGreaterIE6()
{
	var UA = navigator.appName;
	var ver = navigator.appVersion;
	ver = parseInt(ver.split(";")[1].split(" ")[2])
	if(ver >= 6) return true; // Greater than IE6
	else return false; // Less Than IE5
}

function IsBrowserFirefox()
{
	if( navigator.appName == "Netscape" )
		return true ;

	return false ;
}

function IsVista()
{
	var sAgent = navigator.userAgent;
	if ( sAgent.indexOf("Windows NT 6.") >= 0 ) return true;
	return false;
}


/***********************************************************************************
* Firefox Related Functions
************************************************************************************/

function loadJS(url) {
    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.src = url;
    document.getElementsByTagName('head')[0].appendChild(script);  
}

function GetFireFoxVersion()
{
	var agent = navigator.userAgent;

	if(agent.indexOf("Firefox/") == -1)
		return "";

	var str = agent.lastIndexOf("Firefox/");
	var ver = agent.substr(str+8);

	return ver;
}

function IsValidFirefoxVersion( strVersion )
{
	var VersionArray = strVersion.split( "." ) ;
	
	if( VersionArray[0] > AHN_NPAHNASP_SUPPORT_FIREFOX_VER[0] )
	{
		return true ;
	}
	else if( VersionArray[0] == AHN_NPAHNASP_SUPPORT_FIREFOX_VER[0] )
	{		
		if ( VersionArray[1] >= AHN_NPAHNASP_SUPPORT_FIREFOX_VER[1] )		
			return true ;
	}
	else 
	{
		return false ;
	}
	
	return false ;	
}

function IsPluginInstalled()
{
	var strFirefoxVersion = GetFireFoxVersion() ;
	if( "" == strFirefoxVersion )
	{
		return false ;
	}
	
	if( IsValidFirefoxVersion( strFirefoxVersion ) )
	{
		var strHTML = "" ;
		
		strHTML	+= "<OBJECT type='"+AHN_NPAHNASP_TYPE+"' id='CheckAhnASPFF' height=0 width=0>";
		strHTML += "<PARAM NAME='AuthServer' VALUE='" + AHN_AHNASP_AUTH_SERVER + "'>" ;
		strHTML += "<PARAM NAME='StartupType' VALUE='manual'>";
		strHTML	+= "</OBJECT>";	
		document.body.innerHTML += strHTML ;
		
		var obj = document.getElementById( "CheckAhnASPFF" ) ;		
		try { obj.GetVersion() ; }
		catch( ex ) { return false ; }
		return true ;
	}
	else
	{
		alert( 'Current browser is not supported' ) ;
	}

	return false ;
}

function InstallPlugInCallback(url, status)
{
	// status == 0 	- Good
	// else	   	- Bad

   	if( status == 0 )
   	{   	
   		AhnASP_Set_LauchASP_InsertMode( true ) ;
   		_launchASP() ;   		
   	}   	
}

function InstallPlugIn()
{	
	if( IsValidFirefoxVersion( GetFireFoxVersion() ) )
	{
		if( AHN_LAUNCHASP_ISCODEBASESSL )
			strCodebase = AHN_NPAHNASP_XPI_SSL_CODEBASE ;
		else
			strCodebase = AHN_NPAHNASP_XPI_CODEBASE ;
	
		xpi = {'AhnLab Online Security Services':strCodebase};
		InstallTrigger.install(xpi, InstallPlugInCallback);
	}
	else
	{
		alert( 'Current browser is not supported' ) ;
	}
}


// -->

