var version;
var xObj;

try {
    if(document.XecureWeb==null || typeof(document.XecureWeb) == "undefined" ||document.XecureWeb.object==null) {
    		xObj = new ActiveXObject("Xwctl40.XecCtl40");
    		document.XecureWeb = xObj;
    		version = xObj.GetVerInfo();    	
    } else {
    		version = document.XecureWeb.GetVerInfo();
    }
}catch(ex) {
	alert("º¸¾ÈÇÁ·Î±×·¥ÀÌ ÀÌ ¼³Ä¡µÇ¾î ÀÖÁö ¾Ê½À´Ï´Ù. ÃÊ±â ÆäÀÌÁö·Î ÀÌµ¿ÇÕ´Ï´Ù.");
	top.window.location.href='http://www.truefriend.com';
}
var xgate_addr =  window.location.hostname + ":443:8080";
var enc_xgate;

          if(version >= '7, 2, 1, 7'){
          		//alert("1 : " + version);
            	enc_xgate = document.XecureWeb.GetEncUserData(xgate_addr);
                //alert("enc_xgate : " + enc_xgate);               
          } else {
          		//alert("2 : " + version);
                enc_xgate = xgate_addr;
          }
//////////////////////////////////// ¼ÒÇÁÆ®Æ÷·³ - e2e º¯°æ ÀÛ¾÷
var os_ver = window.navigator.appVersion;
if(os_ver.indexOf("WOW64")>0){
  //document.write('<object classid="CLSID:39FC0CF9-86F3-4502-B773-D16706EDEC83" codebase="/download/SCSK4_WOW64.cab#version=4,0,6031,16" width="0" height="0" id="secukey" >');
  document.write('<object classid="CLSID:39FC0CF9-86F3-4502-B773-D16706EDEC83" codebase="/download/SCSK4_WOW64.cab#version=4,0,6031,47" width="0" height="0" id="secukey" >');
  document.write('<param name="USEICON" value="1">');
  document.write('<param name="HACKOPTION" value="17">');
  document.write('<param name="TRAYSTR" value="ÇÑ±¹ÅõÀÚÁõ±Ç Å°º¸µåº¸¾È">');
  //XecureWeb 6.0 (e2e Àû¿ëÇÏÁö ¾ÊÀ½:: ¾Æ·¡ µÎÁÙ ¸·À¸¸é Àû¿ë¾ÈµÊ)
  document.write('<param name = "SiteCode" value = "17">');
  document.write('<param name = "XgateAddr" value = ' + enc_xgate + '>');
  document.write('</object>');
}
else if(os_ver.indexOf("Win64")>0)
{
	alert("32bit Internet Explorer¸¦ »ç¿ëÇÏ½Ê½Ã¿À.");
} else if(os_ver.indexOf("NT 6")>0){
  document.write('<object classid="CLSID:39FC0CF9-86F3-4502-B773-D16706EDEC83" codebase="/download/SCSK4_VISTA.cab#version=4,0,6031,47" width="0" height="0" id="secukey" >');
  document.write('<param name="USEICON" value="1">');
  document.write('<param name="HACKOPTION" value="17">');
  document.write('<param name="TRAYSTR" value="ÇÑ±¹ÅõÀÚÁõ±Ç Å°º¸µåº¸¾È">');
  //XecureWeb 6.0 (e2e Àû¿ëÇÏÁö ¾ÊÀ½:: ¾Æ·¡ µÎÁÙ ¸·À¸¸é Àû¿ë¾ÈµÊ)
  document.write('<param name = "SiteCode" value = "17">');
  document.write('<param name = "XgateAddr" value = ' + enc_xgate + '>');
  document.write('</object>');
} else {
  document.write('<object classid="CLSID:39FC0CF9-86F3-4502-B773-D16706EDEC83" codebase="/download/SCSK4.cab#version=4,0,31,47" width="0" height="0" id="secukey" >');
  document.write('<param name="USEICON" value="1">');
  document.write('<param name="HACKOPTION" value="17">');
  document.write('<param name="TRAYSTR" value="ÇÑ±¹ÅõÀÚÁõ±Ç Å°º¸µåº¸¾È">');
  //XecureWeb 6.0 (e2e Àû¿ëÇÏÁö ¾ÊÀ½:: ¾Æ·¡ µÎÁÙ ¸·À¸¸é Àû¿ë¾ÈµÊ)
  document.write('<param name = "SiteCode" value = "17">');
  document.write('<param name = "XgateAddr" value = ' + enc_xgate + '>');
  document.write('</object>');
}