
var USING_CUSTOM_IMAGE = 0; 
var CUSTOM_IMAGE_URL = "";
var USING_CKKeyPro = "1";		



var CKKeyPro_CLSID="clsid:6CE20149-ABE3-462E-A1B4-5B549971AA38";	

var CKKeyPro_CODEBASE_x64 = "/activeX/CKKeyPro/CKKeyPro3023_64k.cab";
var CKKeyPro_CODEBASE_x86 = "/activeX/CKKeyPro/CKKeyPro3023_32k.cab";
var CKKeyPro_VERSION = "version=3,0,2,3";

var Multi_InstallBinary = "/activeX/CKKeyPro/CKKeyPro_Installer_Multi_10023.exe";
var Multi_Version = "1.0.0.23";


CKBrowser.prototype = {
	getBrowserName : function ()
	{
		var result;

		if (this.mUserAgent.indexOf (this.cMSIE) != -1)				// Explorer
			result = this.cMSIE;

		else if (this.mUserAgent.indexOf (this.cOPERA) != -1)			// Opera
					result = this.cOPERA;
					
		else if (this.mUserAgent.indexOf (this.cSEAMONKEY) != -1)		// Seamonkey
					result = this.cSEAMONKEY;

		else if (this.mUserAgent.indexOf (this.cSAFARI) != -1)		// Å©·ÒÀÇ mUserAgent³»¿ë¿¡ "»çÆÄ¸®", "Å©·Ò" ½ºÆ®¸µÀÌ °°ÀÌ µé¾î ÀÖ´Ù
		{
			if (this.mUserAgent.indexOf (this.cCHROME) != -1)
				result = this.cCHROME;
			else
				result = this.cSAFARI;
		}	

		else if (this.mUserAgent.indexOf (this.cFIREFOX) != -1)
		{
			if (this.mUserAgent.indexOf ("Navigator") != -1)		// Netscape 9
				result = this.cNETSCAPE9;
			else if (this.mUserAgent.indexOf (this.cNETSCAPE) != -1)		// Netscape 6
				result = this.cNETSCAPE;
			else
				result = this.cFIREFOX;								// Firefox
		}
		else if (this.mUserAgent.indexOf ("BonEcho") != -1)	// Netscape 6
			result = this.cFIREFOX;								// Firefox


		else if (this.mUserAgent.indexOf (this.cNETSCAPE) != -1)	// Netscape 6
			result = this.cNETSCAPE;

		else if (this.mUserAgent.indexOf ("Mozilla/4") != -1)		// Netscape 4
			result = this.cNETSCAPE4;

		else
			result = this.cUNSUPPORT;								// Unsupport

		return result;
	},

	getBrowserVersion : function ()
	{
		var result;
		var fromIndex = this.mUserAgent.indexOf (this.mBrowser);

		if (this.mBrowser == this.cMSIE)
		{
			fromIndex += 5;
			result = this.mUserAgent.substring (fromIndex,
												this.mUserAgent.indexOf (";", fromIndex));
		}
		else if (this.mBrowser == this.cSAFARI)
		{
			fromIndex = this.mUserAgent.indexOf ("Version") + 8;
			result = this.mUserAgent.substring (fromIndex,
												this.mUserAgent.indexOf (" ", fromIndex));
		}
		else if (this.mBrowser == this.cFIREFOX)
		{
			fromIndex += 8;
			result = this.mUserAgent.substring (fromIndex,
								this.mUserAgent.indexOf (" ", fromIndex));
		}
		else if (this.mBrowser == this.cNETSCAPE9)
		{
			fromIndex = this.mUserAgent.indexOf ("Navigator") + 10;
			result = this.mUserAgent.substring (fromIndex, 
												this.mUserAgent.indexOf (" ", fromIndex));
		}
		else if (this.mBrowser == this.cNETSCAPE)
		{
			fromIndex += 10;
			result = this.mUserAgent.substring (fromIndex);
		}
		else if (this.mBrowser == this.cNETSCAPE4)
		{
			fromIndex = this.mUserAgent.indexOf ("Mozilla") + 8;
			result = this.mUserAgent.substring (fromIndex, fromIndex + 4);
		}
		else if (this.mBrowser == this.cOPERA)		//jrkim ¿ÀÆä¶ó
		{
			fromIndex = this.mUserAgent.indexOf ("Opera") + 6;
			result = this.mUserAgent.substring (fromIndex, 
												this.mUserAgent.indexOf (" ", fromIndex));
		}
		else if (this.mBrowser == this.cCHROME)		//jrkim Å©·Ò
		{
			fromIndex = this.mUserAgent.indexOf ("Chrome") + 7;
			result = this.mUserAgent.substring (fromIndex,
												this.mUserAgent.indexOf (" ", fromIndex));
		}
		else
			result = 0;

		return result;
	},
	
	
	getPluginType : function ()
	{
		var result;
		if (this.mPlatform == this.cWIN32){		
			if (this.mBrowser == this.cMSIE){
					return this.cACTIVEX;
			} else if (this.mBrowser == this.cFIREFOX ||
							this.mBrowser == this.cSAFARI ||
							this.mBrowser == this.cCHROME ||
				  		this.mBrowser == this.cOPERA ||
				  		this.mBrowser == this.cNETSCAPE9){
					return this.cNPRUNTIME;
			}
		}
	}
};

//
//jrkim 20090803
//
function CKBrowser ()		
{
	/* O/S Constant List */
	this.cWIN				= "Win";
	this.cWIN32			= "Win32";
	this.cWIN64			= "Win64";

	this.cLINUX			= "Linux";
	this.cLINUX32		= "Linux i";
	this.cLINUX64		= "Linux x86_64";

	this.cMAC					= "Mac";
	this.cMACPPC			= "MacPPC";
	this.cMACINTEL		= "MacIntel";

	/* Web Browser Constant List */
	this.cMSIE			= "MSIE";
	this.cSAFARI		= "Safari";
	this.cFIREFOX		= "Firefox";
	this.cNETSCAPE		= "Netscape";
	this.cNETSCAPE4		= "Netscape4";
	this.cNETSCAPE9		= "Netscape9";
	this.cCHROME			= "Chrome";	
	this.cOPERA				= "Opera";					
	this.cSEAMONKEY		= "SeaMonkey";

	this.cUNSUPPORT		= "Unsupport";

	/* plugin type */
	this.cACTIVEX		= "activex";
	this.cNPRUNTIME		= "npruntime";

	/* Member variables */
	this.mPlatform		= navigator.platform;
	this.mUserAgent		= navigator.userAgent;

	this.mBrowser		= this.getBrowserName();
	this.mVersion		= this.getBrowserVersion();
	
	this.mPluginType = this.getPluginType();
}

var gCKBrowser = new CKBrowser();


function CK_PrintCKBrowserInfo()
{
	document.write("Platform : " + gCKBrowser.mPlatform + "<br>");
	document.write("UserAgent : " + gCKBrowser.mUserAgent + "<br>");
	document.write("Browser : " + gCKBrowser.mBrowser + "<br>");
	document.write("Version : " + gCKBrowser.mVersion + "<br>");
	document.write("PluginType : " + gCKBrowser.mPluginType + "<br>");
}



function PrintXecureCKActiveXTag()
{
		if (USING_CKKeyPro == "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">';
				Str+= '\n\t <PARAM name="DefaultPaste" value="Off">';
				Str+= '\n\t <PARAM name="ClearBufferOnEmpty" value="true">';
				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);
		} 			
}

function PrintXecureCKEmbedTag()
{
		if (USING_CKKeyPro == "1")
		{
				var Str="";
				
				Str+= '<EMBED id="CKKeyPro" type="application/ClientKeeperKeyPro" width=0 height=0 ';
		
				if(USING_CUSTOM_IMAGE)
					Str+= 'ImageURL="' +								CUSTOM_IMAGE_URL + '" ';
		
				//Str+= 'DefaultEnc="on"';
				Str+= '>';
				Str+= '</EMBED>';
				Str+= '<NOEMBED>no ClientKeeper KeyPro</NOEMBED>';
		 

		   	document.write(Str);
		   	
		}
}

function CK_PrintXecureCKTag()
{
	if (gCKBrowser.mPluginType == gCKBrowser.cACTIVEX){
		PrintXecureCKActiveXTag();
	} else if (gCKBrowser.mPluginType == gCKBrowser.cNPRUNTIME){
		PrintXecureCKEmbedTag();
	}
}



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) {}
}


function CKKeyPro_ReScan()
{
	if(gCKBrowser.mPluginType != gCKBrowser.cACTIVEX) return;
	if(document.CKKeyPro==null || typeof(document.CKKeyPro) == "undefined" || document.CKKeyPro.object==null)
	{
		//CKKeyPro is not running in current document.
		return;
	}
	document.CKKeyPro.ReScanDocument();
}


function CKKeyPro_Clear(frmName,eleName)
{
	if(gCKBrowser.mPluginType != gCKBrowser.cACTIVEX) return;
 	if(document.CKKeyPro==null || typeof(document.CKKeyPro) == "undefined" || document.CKKeyPro.object==null)
        {
                //CKKeyPro is not running in current document.
                return;
        }
	document.CKKeyPro.Clear(frmName,eleName,0);
}


var CK_objFocused;
function CK_Start(nsEvent)
{
	if(gCKBrowser.mPluginType != gCKBrowser.cNPRUNTIME) return;

	var theEvent;
	var inputObj;

	if (nsEvent.type == "text" || nsEvent.type == "password") {
		inputObj = nsEvent;
	}
	else {
		theEvent = nsEvent ? nsEvent : window.event;
		inputObj = theEvent.target ? theEvent.target : theEvent.srcElement;
	}

	try{
		document.getElementById('CKKeyPro').StartCK(inputObj);
		CK_objFocused = inputObj;
	}catch(e){
		//alert("CK_Start catch");
	}
}

function CK_Stop()
{
	if(gCKBrowser.mPluginType != gCKBrowser.cNPRUNTIME) return;
	
	try{
		document.getElementById('CKKeyPro').StopCK();
	}catch(e){
		//alert("CK_Stop catch");
	}
}

function CK_PatchKey()
{
	if(gCKBrowser.mPluginType != gCKBrowser.cNPRUNTIME) return;
	
 	try{
		document.getElementById('CKKeyPro').PatchKey(CK_objFocused);
	}catch(e){
		//alert("CK_Dummy catch");
	}
}

function CK_Blur()
{
	if(gCKBrowser.mPluginType != gCKBrowser.cNPRUNTIME) return;
	
	try{
		CK_objFocused.blur();
	}catch(e){
		//alert("CK_Blur catch");
	}
}

function CK_MimeExist()
{
	var CKInstalled = false;
	var objCKKeyProMimeType = navigator.mimeTypes['application/ClientKeeperKeyPro'];
	if (objCKKeyProMimeType) {	

		if (objCKKeyProMimeType.description) {
			CKInstalled = true;
		    return true;
		}
	}
	
	if (CKInstalled == false) {
   location.replace(Multi_InstallPage);
   return false;
	}
}

function CK_CheckPlugInVersion()
{
	if(gCKBrowser.mPluginType != gCKBrowser.cNPRUNTIME)return;
 	try{
 		
 		if ((gCKBrowser.mPlatform == gCKBrowser.cWIN32) && (gCKBrowser.mBrowser == gCKBrowser.cOPERA)) {
			 			if (CK_MimeExist() == false)
			 			return;
			 		}
			 		
		IsNeedUpdate = document.getElementById('CKKeyPro').NeedUpdate(Multi_Version);			
		if (IsNeedUpdate==false) {
	  //  alert("»ç¿ëÀÚPc¿¡ Å°º¸µå º¸¾È ¼³Ä¡µÊ");
			return;
		}
		else {
		//	alert("»ç¿ëÀÚPC¿¡ ¼³Ä¡µÈ ¹öÀüÀÌ ÇöÀç ¹öÀüº¸´Ù ÇÏÀ§¹öÀüÀÔ´Ï´Ù. ");
		//window.location=Multi_InstallPage;
		   window.open('/activeX/CKKeyPro/CKKeyPro_Installer_Multi_10023.exe','CKKeyPro','resizable=no scrollbars=no width=100 height=100 left=50 top=50 ');
		}
	}
	catch(e){
	  //  alert("»ç¿ëÀÚPC¿¡ Å°º¸µå º¸¾ÈÀÌ ¼³Ä¡µÇÁö ¾Ê¾Ò½À´Ï´Ù. ");
    //window.location=Multi_InstallPage;
 window.open('/activeX/CKKeyPro/CKKeyPro_Installer_Multi_10023.exe','CKKeyPro','resizable=no scrollbars=no width=100 height=100 left=50 top=50 ');
	}
}

function CK_CheckInstalled() {
	if (navigator.cookieEnabled) {
		var useCKKeyProCookie = readKeyProCookie();
		if (useCKKeyProCookie) {
		} else {
			if(gCKBrowser.mPluginType != gCKBrowser.cNPRUNTIME) {
					if(document.CKKeyPro==null || typeof(document.CKKeyPro) == "undefined" || document.CKKeyPro.object == null) {
						return true;
					} else {
						window.location=Multi_IndexPage;
					}
			} else {
				version = document.getElementById('CKKeyPro').GetVersion();	
				if (version == Multi_Version){
				window.location=Multi_IndexPage;
				}
			}
		}
	}
}

function HaveControl_CK()
{
	if(gCKBrowser.mPluginType != gCKBrowser.cACTIVEX) return;
	//if(USING_MultiOS == "1") return;
	
	if(document.CKKeyPro==null || typeof(document.CKKeyPro) == "undefined" || document.CKKeyPro.object == null)
		window.open("./installPage/activeXinstallCK.html","_top","");
	else
		return true;
}


function readKeyProCookie() {
	var key = "CKKeyProCookie";
	if (document.cookie.length>0) {
  	c_start=document.cookie.indexOf(key + "=");
  	if (c_start!=-1) {
    	c_start=c_start + key.length+1;
    	c_end=document.cookie.indexOf(";",c_start);
    	if (c_end==-1) c_end=document.cookie.length;
    	return document.cookie.substring(c_start,c_end);
    }
  }
return "";
}

//jrkim 20090804
function CK_ApplySecurity()
{
	if(gCKBrowser.mPluginType != gCKBrowser.cNPRUNTIME) return;
	
	try{
		for(var i=0;i<document.forms.length;i++){
			for (var j=0;j < document.forms[i].elements.length;j++){				
				if(document.forms[i].elements[j].tagName == "INPUT" && (document.forms[i].elements[j].type == "text" || document.forms[i].elements[j].type == "password")){
			  	  if(document.forms[i].elements[j].addEventListener){
			  	  	document.forms[i].elements[j].addEventListener("focus", CK_Start, false);		//w3c
			  	  	document.forms[i].elements[j].addEventListener("blur", CK_Stop, false);		//w3c
			  	  }
		  	  	else if (document.forms[i].elements[j].attachEvent){
	  	  			 document.forms[i].elements[j].attachEvent("onfocus", CK_Start);					//msdom
	  	  			 document.forms[i].elements[j].attachEvent("onblur", CK_Stop);					//msdom
	  	  		}
					}	//end if
				} // end for
			} // end for
	}catch(e){		
			//	alert("error");	
	} // end try
}

CK_PrintXecureCKTag();
		CK_ApplySecurity();
		CK_CheckPlugInVersion();


///////////////////////////////////////////////////////////////////////////////
//
// Multi OS (mac, Linux)
//
///////////////////////////////////////////////////////////////////////////////

var sKeyProRootURL = "";

var sKeyProXPIURL = sKeyProRootURL + "http://ck.softforum.co.kr/keypro/linux/plugins/keypro-1.0.0.xpi";
var sKeyProMainURL = sKeyProRootURL + "";

var sKeyProInstallURL = new Array(2);


// ¼³Ä¡ÆäÀÌÁö URL ¿¬°áÇÏ´Â ºÎºÐ
sKeyProInstallURL[0] = sKeyProRootURL + "CKKeyProInstall.jsp";
sKeyProInstallURL[1] = sKeyProRootURL + "CKKeyProInstall.jsp";

var sKeyProNewName = new Array(2);
sKeyProNewName[0]="CKKeyPro Plugin 1.0.0"; // linux
sKeyProNewName[1]="keypro text editbox";  // mac
var sKeyProOldName = "CKKeyPro Plugin 0.9.0";

var dwOsType=0;;
var OldInputElemetArray = new Array();
var NewInputElemetArray = new Array();
var arrIndex=0;

function CK_Start_MOS(nsEvent)
{
  //  alert("mos ck start");

    
	var theEvent;
	var inputObj;

	if (nsEvent.type == "text" || nsEvent.type == "password") {
		inputObj = nsEvent;
	}
	else {
		theEvent = nsEvent ? nsEvent : window.event;
		inputObj = theEvent.target ? theEvent.target : theEvent.srcElement;
	}

	try{
		document.getElementById('CKKeyPro').startCk(inputObj);
		CK_objFocused = inputObj;
		setTimeout("CK_GetText()",100);
	}catch(e){
		//alert("CK_Start catch");
	}
}

function CK_Stop_MOS()
{
  	
	try{
		CK_objFocused=0;
		document.getElementById('CKKeyPro').stopCk();
		
	}catch(e){
		//alert("CK_Stop catch");
	}
}

function CK_PatchKey_MOS(key)
{
    //alert("patch key" + key);
	try{
	
		var orgKey=CK_objFocused.value;
		orgKey=orgKey+key;
		CK_objFocused.value=orgKey;

	}catch(e){
		//alert("CK_Dummy catch");
	}
}
function CK_GetText()
{

    if(checkEnv()==2) //MAC
    {
   	    try{
            
            if(CK_objFocused)
            {

               CK_objFocused.value=CK_objFocused.value+document.getElementById('CKKeyPro').getText();
            }
            setTimeout("CK_GetText()",100);
    	
	    }catch(e){
    	
	    }
	 }
}


function CK_ApplySecurity_MOS()
{
	
	try{
		
	
		for(var i=0;i<document.forms.length;i++){
			for (var j=0;j < document.forms[i].elements.length;j++){				
				if(document.forms[i].elements[j].tagName == "INPUT" && (document.forms[i].elements[j].type == "text" || document.forms[i].elements[j].type == "password")){
			  	  if(document.forms[i].elements[j].addEventListener){
			  	  	document.forms[i].elements[j].addEventListener("focus", CK_Start_MOS, false);		//w3c
			  	  	document.forms[i].elements[j].addEventListener("blur", CK_Stop_MOS, false);		//w3c
			  	  }
		  	  	else if (document.forms[i].elements[j].attachEvent){
	  	  			 document.forms[i].elements[j].attachEvent("onfocus", CK_Start_MOS);					//msdom
	  	  			 document.forms[i].elements[j].attachEvent("onblur", CK_Stop_MOS);					//msdom
	  	  		}
					}	//end if
				} // end for
			} // end for
	}catch(e){		
			//	alert("error");	
	} // end try
}

function getStyle(element, style){
    if(element.currentStyle) return element.currentStyle.getAttribute(style); // IE
    else{
        var css = document.defaultView.getComputedStyle(element, null);
        return css.getPropertyValue(style);
    }
}

function statusPlugin(OsType) {
	var pluginArray = navigator.mimeTypes.length;	
	var pluginName;
	
	for(var i=0; i < pluginArray; i++) 
	{
		pluginName = navigator.mimeTypes[i].description;
      //  alert(pluginName);
		if ( pluginName == sKeyProNewName[OsType-1] ) {
			return 0;
		}
		else if ( pluginName == sKeyProOldName ) {
			return 1;
		}
	}
	
	return -1;
}

function checkEnv()
{
//   alert(location.pathname);

    if(navigator.userAgent.match("Linux") && navigator.userAgent.match("Firefox"))
    {
          
        dwOsType=1;
        return 1; // linux type
    
    }
    else if(navigator.userAgent.match("Mac") && navigator.userAgent.match("Safari"))
    {
       dwOsType=2;
       return 2; // mac type
    }
    
}

function checkPlugin() 
{
    
    switch (checkEnv())
    {
        case 1: 
    
            if(statusPlugin(1) != 0)
            {
                if(confirm("Å°º¸µå º¸¾È ÇÁ·Î±×·¥ÀÌ ¼³Ä¡ µÇ¾îÀÖÁö ¾Ê½À´Ï´Ù. ¼³Ä¡ ÇÏ½Ã°Ú½À´Ï±î?"))
                {   
	               //location.replace(sKeyProInstallURL[0])
                initPlugin();
	            }
        		
	        }
	        else
	        {
	            DrawElements(1);
        		
	        }
        
            break;
            
        case 2:
            if(statusPlugin(2) != 0)
            {
                if(confirm("Å°º¸µå º¸¾È ÇÁ·Î±×·¥ÀÌ ¼³Ä¡ µÇ¾îÀÖÁö ¾Ê½À´Ï´Ù. ¼³Ä¡ ÇÏ½Ã°Ú½À´Ï±î?"))
                {   
                
                     // location.replace(sKeyProInstallURL[1])
	                  DrawElements(2);
	            }
            }
            else
            {
                 DrawElements(2);
            
            }
            break;
    
    
    }


}


function initPlugin() {
	if (arguments.callee.done) return;
	arguments.callee.done = true;


  	var iStatus = statusPlugin(checkEnv());

	switch(iStatus) {
		case 1:
			if ( InstallTrigger.UpdateEnabled() ) {
				InstallTrigger.startSoftwareUpdate(sKeyProXPIURL);
			}
			break;
		case -1:
			if ( InstallTrigger.UpdateEnabled() ) {
				InstallTrigger.install( {"CKKeyPro":sKeyProXPIURL} );
			}
			break;
		case 0:
			location.replace(sKeyProMainURL)
			break;
	}
}



function DrawElements(OsType)
{
	  
    for(var i=0;i<document.forms.length;i++)
    {
    
	    for (var j=0;j < document.forms[i].elements.length;j++)
	    {
	        
	     
	        if(document.forms[i].elements[j].tagName == "INPUT" && (document.forms[i].elements[j].type == "text" || document.forms[i].elements[j].type == "password"))
	        {
	               var newInput=document.createElement("embed");
                   var formsubmit;
                   var iPx=parseInt(getStyle(document.forms[i].elements[j],"height"), 10);
                             
                             
                   if (document.forms[i].elements[j].type == "text")
                   {
                
                               
                   }
                             
                
                   if(OsType==1)// linux Àº envet hooking ¹æ½Ä
                   {
                        newInput.setAttribute("type","application/mozilla-KeyPro");
                        newInput.setAttribute("width","0px");
                        newInput.setAttribute("height","0px");
                        newInput.setAttribute("id", "CKKeyPro")
                  
                        document.forms[i].elements[j].parentNode.insertBefore(newInput,document.forms[i].elements[j]);
                        CK_ApplySecurity_MOS();
                        return 0;    // MAC Àº ÇÑ¹ø¸¸ ±×¸®¸éµÈ´Ù.                   
                   }
                   else if(OsType==2)// mac Àº envet hooking ¹æ½Ä
                   {
                        newInput.setAttribute("type","application/x-keypro");
                        newInput.setAttribute("pluginspage","http://ck.softforum.co.kr/keypro/linux/plugins/keypro.dmg");
                        newInput.setAttribute("width","0px");
                        newInput.setAttribute("height","0px");
                        newInput.setAttribute("id", "CKKeyPro")
                  
                        document.forms[i].elements[j].parentNode.insertBefore(newInput,document.forms[i].elements[j]);
                        CK_ApplySecurity_MOS();
                        
                        return 0;    // MAC Àº ÇÑ¹ø¸¸ ±×¸®¸éµÈ´Ù.                   
                   }
                                             
                 
	        }

	    }


    }
    
}
function KeySubmit(event) 
{        

  //  alert("arrIndex " + arrIndex);
    for(var i=0;i<arrIndex;i++)
    {
        //alert(NewInputElemetArray[i].getText());
        OldInputElemetArray[i].value=NewInputElemetArray[i].getText();
        NewInputElemetArray[i].startCk(OldInputElemetArray[i]);
    }
    //arrIndex=0;
}

if (navigator.cookieEnabled) {
	var useCKKeyProCookie = readKeyProCookie();
	//alert(useCKKeyProCookie);
	if (useCKKeyProCookie) {
	} else {
    if(navigator.userAgent.match("Linux") && navigator.userAgent.match("Firefox")) {
    	checkPlugin();
    } else if(navigator.userAgent.match("Mac") && navigator.userAgent.match("Safari")){
    	checkPlugin();
    } else {
		CK_PrintXecureCKTag();
		CK_ApplySecurity();
		
	}
	}
}