var g_Ver; window.onload = function() { try { g_Ver = window.external.Version; if (typeof(g_Ver) == 'undefined') { g_Ver = ''; } document.getElementById('disable_link').onclick = function() { OnShowDisable(); return false; } document.getElementById('detail_link').onclick = function() { OnShowDetail(); return false; } document.getElementById('OKBtn').onclick = function() { OnOK(); return false; } document.getElementById('CloseBtn').onclick = function() { OnClose(); return false; } } catch (e) { g_Ver = '';} } function OnOK() { if (g_Ver != '') { window.external.Result = 1; window.external.Close(1); } } function OnDialogOK() { if (g_Ver != '') { window.external.Result = 2; window.external.Close(2); } } function OnShowDetail() { if (g_Ver != '') { var da = new Date(); var ret = window.showModalDialog( window.external.DetailURL + "?link=detail&rnd="+ da.getTime(), this, "dialogWidth=700px; dialogHeight=650px; status:0; resizable:1; minimize:false; maximize:false;" ); if (typeof(ret) != 'undefined') { if (ret == 1 || ret == 2) { OnDialogOK(); } } } } function OnShowDisable() { if (g_Ver != '') { var da = new Date(); var ret = window.showModalDialog( window.external.DisableURL + "?link=disable&rnd="+ da.getTime(), this, "dialogWidth=700px; dialogHeight=650px; status:0; resizable:1; minimize:false; maximize:false;" ); if (typeof(ret) != 'undefined') { if (ret == 1 || ret == 2) { OnDialogOK(); } } } } function OnClose() { if (g_Ver != '') { window.external.Result = 3; window.external.Close(3); } }