var sUrl = "http://kr.joymax.com/portal/Joymax_Front.jmx?workURL=http://krportalcp.joymax.com/notarget/AOS/AOS.jmx"
var AosChkVal = true;
function _aos_ie_write_object()
{
    if(clientInformation.cpuClass == "x64")
    {
        if(document.charset == "euc-kr")
            alert(msg_browser_kr);
        else
            alert(msg_browser_us);
        return false;
    }		
        
    var codebase = _g_aos_opt_arr['codebase'];
    if( document.location.protocol == "https:" )
    {
        codebase = _g_aos_ssl_codebase;
    }		
        
    var otstyle = ""
    if(_g_aos_opt_arr['obj_style'] == 'hideout')
    {
        otstyle = "style=" + "'position:absolute;left=-1;top=-1'";
    }
        
    var strHtml = "<OBJECT " + otstyle + " classid='CLSID:063F7D71-5E0B-48F2-87D5-F63C5917947E' id='"+ _g_aos_object_id +"' name='"+ _g_aos_object_name +"' height=0 width=0 tabindex=-1 codebase='"+ codebase +"#version="+ _g_aos_cab_version +"' onerror='AosChkVal=false;'></OBJECT>";
    document.body.insertAdjacentHTML(_g_aos_opt_arr['obj_position'], strHtml);

}
function _mkd_ie_installed()
{
    try
    {
        if(MKD25.object)
        {
            return true;
            history.back();
        }
    }
    catch (e)
    {
    }
    return false;
}
function AosErrorPage(){
    if(!_mkd_ie_installed()){top.location.href=sUrl;}
}
function clientStart(state)
{
    if(!$('AOSMGR'))
    {
        aos_set_subclsid("40","59B0298B-A7B5-4045-A34E-377EDF7BCB8E");
        aos_set_submimetype("40","application/ahnlab/asp/npmkd25aos");
        aos_set_authinfo('www.joymax.com.html');
        aos_set_option( "mkd_protect_level", "low" );
        aos_set_option( "obj_style", "hideout" );
        aos_set_option( "uimode", true );
        aos_set_option( "asyncmode", false );
        aos_write_object();
        aos_start( '40' );
    }
}
// ÀÌº¥Æ® ¹ß»ý½Ã
function CheckAosWidthLocation(){clientStart(); AosErrorPage();}


function window::onLoad()
{
    clientStart();
    $('userId').observe('focus', function () {
            CheckAosWidthLocation();
        }
    );
    $('userPwd').observe('focus', function () {
            CheckAosWidthLocation();
        }
    );
}
