/* INISAFE Web V6 - noframe.js */

/********************************************************************
1. »ç¿ë¹ý ¹Ýµå½Ã <body></body> »çÀÌ¿¡ ´ÙÀ½°ú °°ÀÌ »ç¿ëÇØ¾ßÇÔ
  <script language="javascript" src="/initech/plugin/noframe.js"></script>
********************************************************************/

var checkFrame = false;
function StartIniPlugin()
{
	// INIplugin.js, install.js, cert.js ·Îµù¿©ºÎ È®ÀÎ  
	if ( (typeof(LoadPlugin) == 'undefined') || (typeof(SCert) == 'undefined') || (typeof(LoadCert) == 'undefined'))
	{
		if (checkFrame == false)
		{
			checkFrame = true;
			//alert("reCheck");
			setTimeout("StartIniPlugin()", 2000);
			return;
		} else 
			alert("install.js/cert.js/INIplugin.js ÆÄÀÏÀÌ includeµÇÁö ¾Ê¾Ò½À´Ï´Ù.")
			return;
	}

	//ÀÌÁß·Îµå ¹æÁö (Æ¯ÀÌÇÑ °æ¿ì ¸ðµâ ÀÎ½ºÅç Ã¼Å©¿¡¼­ object ÂüÁ¶ ¿À·ù ¹ß»ýÀÌ °¡´ÉÇÒ ¼öµµ ÀÖÀ½ ÀÌ¶§´Â Á¦°Å¸¦ ÇÏµµ·Ï ÇÔ)  
	if (typeof (ModuleInstallCheck) == "function") {
 		if (ModuleInstallCheck() != null) {
		//	alert("find secureframe skip noframe...");
			return;
		}
	}

    //document.writeln('<span id="secure" style="display:block;">');
    //document.writeln('noframe.js start');
	CheckPlugin();
	// ¸¶ÀÌ³Ê ¾÷µ¥ÀÌÆ® ¼öÇà   
	InstallModule(InstallModuleURL);
	//LoadCACert(CACert);
	//SetProperty("certmanui_GPKI", "all");	//GPKI ÀÎÁõ¼­ ¸ðµÎ´Ù º¸ÀÓ   
	//DisableInvalidCert(true);  //·Î±×ÀÎÃ¢¿¡¼­ Æä±â/¸¸·áµÈÀÎÁõ¼­ Ç¥½Ã¿©ºÎ default (false)   


	if (!LoadCert(SCert)) {
		//alert("º¸¾È Àç¼³Á¤ÁßÀÔ´Ï´Ù.");
		//location.reload();
		setTimeout("StartIniPlugin()", 1000);
	}

}

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
if (typeof(StartIniPlugin) != 'undefined'){
	StartIniPlugin();
    SetProperty("certmanui_securekey", "kings");
    SetProperty("certmanui_phone", "NICE|http://" + window.location.host + "/infovine/DownloadList&INITECH|KINGS");
    SetProperty("certmanui_phoneURL", "http://" + window.location.host + "/infovine/download.html");
    SetProperty("certmanui_phoneVer", "1,0,3,7" );
} else
	setTimeout("StartIniPlugin()", 1000);
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
