
var CKKeyPro_CLSID="clsid:6CE20149-ABE3-462E-A1B4-5B549971AA38";	


var CKKeyPro_VERSION="version=3,0,2,5";
var CKKeyPro_CODEBASE_x86= "/common/js/CKKeyPro3025_32k.cab";
var CKKeyPro_CODEBASE_x64= "/common/js/CKKeyPro3025_64k.cab";



var USING_CKKeyPro = "1";
var USING_CUSTOM_IMAGE = 1;
var CUSTOM_IMAGE_URL = ""

//alert (navigator.cpuClass.toLowerCase());

if (USING_CKKeyPro == "1")// && navigator.appName.indexOf("Microsoft")!=-1 && navigator.platform == "Win32" && navigator.appVersion.indexOf("4.")!=-1) 
{
		var Str="";
		
		Str+= '<object classid="' + CKKeyPro_CLSID + '"';
		if(navigator.cpuClass.toLowerCase() == "x64")
		{
			
			Str+= '\n\t codebase="' + CKKeyPro_CODEBASE_x64 + '#' + CKKeyPro_VERSION + '"';
		}
			else
		{
			Str+= '\n\t codebase="' + CKKeyPro_CODEBASE_x86 + '#' + CKKeyPro_VERSION + '"';
		}
		Str+= '\n\tvspace="0" hspace="0" width="0" id="CKKeyPro" style="display:none;">';
		Str+= '\n\t <PARAM name="PKI" value="Simple">';
		Str+= '\n\t <PARAM name="DefaultEnc" value="Off">';
		if(USING_CUSTOM_IMAGE)
			Str+= '\n\t <PARAM name="ImageURL" value="' + CUSTOM_IMAGE_URL + '">';

		//Str+= '\n\tNo CKKeyPro Plugin';
		Str+= '</object>';
			
		//alert(Str);
		document.write(Str);
		if(window.attachEvent)
       window.attachEvent("onload", CKKeyPro_ReScan);

} 
/*else if (navigator.appName.indexOf("Netscape")!=-1) {
		USING_CKKeyPro = "0";
		alert("���� �?�Բ����� ��ġ �Ұ����� �ý���; ����ϰ� ��ʴϴ�.\n\nCKKeyPro�� ����Ͻ÷x� Windows 95�̻� \n\nInternet Explorer 5.5�̻��̾�� �մϴ�.");
}

*/

function XecureCK_UIEevents(frm,ele,event,keycode)
{
	var obj;
	var eventObj;

	try{
		obj=document.forms[frm].elements[ele];
		if( document.createEventObject )
		{
			eventObj = document.createEventObject();
			eventObj.keyCode=keycode;
			if(obj)
			{
				obj.fireEvent(event,eventObj);
			}
		}
	}
	catch(e) {}
}

/*
	Rescan the current HTML Document & protects newly added elements.
	Call this function if you are adding Input Elements through JavaScript.
*/

function CKKeyPro_ReScan()
{
	if(document.CKKeyPro==null || typeof(document.CKKeyPro) == "undefined" || document.CKKeyPro.object==null)
	{
		//CKKeyPro is not running in current document.
		return;
	}
	document.CKKeyPro.ReScanDocument();
}

function HaveControl_CK()
{
	if(document.CKKeyPro==null || typeof(document.CKKeyPro) == "undefined" ||document.CKKeyPro.object==null)
	{
		alert("Ű���� ���� �wα׷��� ��ġ���� �ʾҽ4ϴ�.");
		return false;
	}
	else
		return true;
}

function CKKeyPro_Clear(frmName,eleName)
{
 	if(document.CKKeyPro==null || typeof(document.CKKeyPro) == "undefined" || document.CKKeyPro.object==null)
        {
                //XecureCK is not running in current document.
                return;
        }
	document.CKKeyPro.Clear(frmName,eleName,0);
}

function CKKeyPro_GetVariable(name)
{
		//Ȯ�� E2E PKI=XecureWebEx �϶� �Ʒ� �� �̿�
		//return xgate_addr;
}

