/************************************
* °øÅë ÀÚ¹Ù½ºÅ©¸³Æ® ÇÔ¼öÁ¤ÀÇ
************************************/
// ¸µÅ© ¿À¹ö½Ã status Ç¥½Ã ºÒ°¡
var IS_HIDDEN_LINK = true;
// ÇÁ¸°Æ®°ü·Ã º¯¼ö ¼³Á¤
var initTempBody; // body html ÀúÀå Àӽú¯¼ö
var initParentTempBody; // body html Àú Àӽú¯¼ö
var tempPrintObjXX = null; // ÇÁ¸°Æ®ÇÒ div ÀÓ½ÃÀúÀ尴üw
var page_title_html = null; // ÇÁ¸°Æ®ÇÒ ¶§ ¾µ ÆäÀÌÁö À̹ÌÁö HTML ÀúÀå º¯¼ö
var title_name = ""; // ŸÀÌƲ
var ENTFUNC = ""; // ¿£Åͽà ȣÃâ ÇÔ¼ö
/**
* °áÀç¼±Á¶È¸ ·¹À̾îÆ˾÷
* @param obj_form : Æû
* @param gubun : ±¸ºÐ°ª(finish, retr)
* @param obj_btn : ¹öÆ°
*/
function uf_openAppline(obj_form, gubun, obj_btn) {
open_ajax("/uib/jsp/popup/pop_snctline.jsp?gubun=" + gubun, obj_form, null, true, null, obj_btn.id, 600, 200);
}
/**
* ÁֹΠ¹øÈ£ üũ ·ÎÁ÷
*
("1111111111111")
* @param psnno : ÁֹιøÈ£ 13ÀÚ¸® ½ºÆ®¸µ°ª
* @return boolean
*/
function validatePsn(psnno)
{
var gsJuminNo = "";
if (psnno == null || psnno == "" || psnno.length != 13)
{
i18nAlert("ÁֹΠ¹øÈ£ ±æÀÌ°¡ À߸ø ÀÔ·Â µÇ¾ú½À´Ï´Ù.");
return false;
}
else
{
// ¼ýÀÚ°¡ ¾Æ´Ñ°ÍÀÌ ÀÖÀ¸¸é: false;
var numreg = /[^0-9]/g;
if ( numreg.test(psnno) )//¼ýÀÚ ¾Æ´Ñ °ªÀÌ ÀÖ´ÂÁö üũ, °ø¹é,¿µ¹®,ÇѱÛ,Ư¼ö±âÈ£ ¸ðµÎ üũ
{
i18nAlert("ÁֹΠ¹øÈ£¿¡ À߸øµÈ ÀÔ·ÂÀÌ ÀÖ½À´Ï´Ù.");
return false;
}
}
// Áֹεî·Ï üũ¼¶ °Ë»ç
var psnSumCheckArr = new String("234567892345")
var psnSum = 0;
var psnSumResult = "";
for (var i = 0; i < 13; i++)
{
psnSum = psnSum + (psnno.substring(i, i+1) * psnSumCheckArr.substring(i, i+1));
}
psnSumResult = (11 - (psnSum % 11)) % 10;
if(psnSumResult == psnno.substring(12, 13) )
{
delete psnSumCheckArr;
return true;
}
else
{
delete psnSumCheckArr;
i18nAlert("Áֹεî·Ï¹øÈ£°¡ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù.");
return false;
}
}
/**
* À̸ÞÀÏ Ã¼Å© ÇÔ¼ö
*
ex : validateEmail("aaaa@empas.com")
* @param varemail : À̸ÞÀÏ ½ºÆ®¸µ°ª
* @return boolean
*/
function validateEmail(varemail)
{
var reg = new RegExp("^[\\w\\-]+(\\.[\\w\\-_]+)*@[\\w\\-]+(\\.[\\w\\-]+)*(\\.[a-zA-Z]{2,5})$", "gi");
if ( !reg.test(varemail) )
{
i18nAlert("À̸ÞÀÏ ÁÖ¼Ò°¡ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù.");
return false;
}
return true;
}
/**
* »ç¾÷ÀÚ ¹øÈ£ üũ
*
ex : validateCrn("1111111111")
* @param crn : »ç¾÷ÀÚ¹øÈ£ ½ºÆ®¸µ°ª
* @return boolean
*/
function validateCrn(crn)
{
if(crn.length != 10)
{
i18nAlert("»ç¾÷ÀÚ ¹øÈ£ ±æÀÌ°¡ À߸ø ÀÔ·Â µÇ¾ú½À´Ï´Ù.");
return false;
}
var sum = 0;
var getlist =new Array(10);
var chkvalue =new Array("1","3","7","1","3","7","1","3","5");
for (var i=0;i<10;i++)
getlist[i] = crn.substring(i,i+1);
for (var i=0;i<9;i++)
sum += getlist[i]*chkvalue[i];
sum = sum +parseInt((getlist[8]*5)/10) ;
var sidliy = sum%10;
var sidchk = 0;
if( sidliy != 0 )
sidchk = 10 - sidliy;
else
sidchk = 0;
delete chkvalue;
if( sidchk != getlist[9] )
{
delete getlist;
i18nAlert("»ç¾÷ÀÚ¹øÈ£°¡ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù.");
return false;
}
delete getlist;
return true;
}
/**
* ÁֹΠ»ç¾÷ÀÚ ¹øÈ£ üũ
*
ex : validatePsnCrn("1111111111") or validatePsnCrn("1111111111111")
* @param data : ÁֹΠ»ç¾÷ÀÚ¹øÈ£ ½ºÆ®¸µ°ª
* @return boolean
*/
function validatePsnCrn(data)
{
data = getOnlyNumberFormat(data);//¼ýÀÚ¸¸ ÀÔ·Â ¹Þ±â.
if(data.length == 13)
{
return validatePsn(data);
} else if(data.length == 10)
{
return validateCrn(data);
} else
{
i18nAlert("Áֹεî·Ï¹øÈ£/»ç¾÷ÀÚ¹øÈ£°¡ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù.");
return false;
}
}
/**
* 8ÀÚ¸® ³¯Â¥ üũ ·ÎÁ÷
*
ex : validateDate8("20050822", "N")
* @param cDate : 8ÀÚ¸® ³¯Â¥ ½ºÆ®¸µ
* @param vMsg : alert ¸Þ¼¼Áö Ãâ·Â¿©ºÎ
* @return boolean
*/
function validateDate8(cDate, vMsg)
{
if(cDate.length != 8)
{
if( vMsg == null || vMsg != "N" )
{
i18nAlert("³¯Â¥ÀÇ ±æÀÌ°¡ À߸ø ÀÔ·Â µÇ¾ú½À´Ï´Ù.");
}
return false;
}
var yyyy = cDate.substring(0, 4);
var mm = cDate.substring(4, 6) - 1;//12¿ùÀÏ °æ¿ì ³¯Â¥ »ý¼ºÇؼ º¸¸é getMonth()·Î º¸¸é 0À¸·Î ¸®ÅϵǹǷΠ1À» »©ÁØ´Ù.
var dd = cDate.substring(6);
var checkDate = new Date(yyyy, mm, dd);
if ( checkDate.getFullYear() != yyyy || checkDate.getMonth() != mm || checkDate.getDate() != dd)
{
delete checkDate;
if( vMsg == null || vMsg != "N" )
{
i18nAlert("³¯Â¥ Çü½ÄÀÌ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù.");
}
return false;
}
delete checkDate;
return true;
}
/**
* °èÁ üũ ·ÎÁ÷(ÇöÀç ±æÀ̸¸ üũÇÏ°í ÀÖÀ½)
*
ex : validateKebAccount("111111111111")
* @param acc : °èÁ ¹øÈ£
* @return boolean
*/
function validateKebAccount(acc)
{
if(acc.length != 12)
{
i18nAlert("°èÁ ¹øÈ£°¡ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù.");
return false;
}
return true;
}
/**
* °èÁ ºñ¹Ð¹øÈ£ ·ÎÁ÷(ÇöÀç ±æÀ̸¸ üũÇÏ°í ÀÖÀ½)
*
ex : validateKebAccountPassword("1111")
* @param pass : °èÁ ºñ¹Ð ¹øÈ£
* @return boolean
*/
function validateKebAccountPassword(pass)
{
if(pass.length != 4)
{
i18nAlert("°èÁ ºñ¹Ð ¹øÈ£°¡ À߸ø ÀÔ·Â µÇ¾ú½À´Ï´Ù.");
return false;
}
return true;
}
/**
* ½ºÅ©¸³Æ®·Î Á¦¾îÇÏ´Â ´ëºÐ·ù,Áߺзù¿¡ »ç¿ëÇÏ´Â ¼¿·ºÆ® ¹Ú½º ÄÁÆ®·Ñ
*
ex : dynamicChangeSelectBox(this,form1.targetname,target¿¡µé¾î°¥array,true)
* @param select : ÀÌ ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇÏ´Â select box °´Ã¼
* @param target : ÀÌ °´Ã¼ÀÇ onchange À̺¥Æ®¿¡ ÀÇÇØ Á¦¾îµÉ Ÿ°Ù select box °´Ã¼ name
* @param resultSet : ŸÄÏ ¼¿·ºÆ® ¹Ú½º¿¡ Á¶°Ç¿¡ µû¶ó¼ µé¾î°¥ ¿É¼ÇÀÌ µé¾îÀÖ´Â javascript array °´Ã¼¸í
* @param nulluse : ¼±ÅÃÇϼ¼¿ä.. »ç¿ë ¿©ºÎ
*/
function dynamicChangeSelectBox(select,target,resultSet,nulluse)
{
var upperState = ""
if (select.upperValue != undefined)
upperState = select.upperValue;
var selectValue = "";
if(upperState != "")
selectValue = upperState+"_"+select.value;
else
selectValue = select.value;
while(target.length > 0)
{
target.removeChild(target.children[0]);
}
if(nulluse == true)
{
var option = document.createElement("OPTION");
option.text="¼±ÅÃÇϼ¼¿ä..";
option.value="";
target.add(option);
}
if(resultSet[selectValue] != undefined )
{
var selectArray = resultSet[selectValue];
if(selectArray.length != 0)
{
for(var t = 0 ; t < selectArray.length ; t++)
{
var option = new Option();
option.value=selectArray[t][0];
option.text=selectArray[t][1];
target.add(option);
}
}
}
target.upperValue = selectValue;//¹æ±Ý ¼±ÅÃÇÑ ¼¿·ºÆ® ¹Ú½º °ª°ú ´ëºÐ·ù¸¦ ÅëÇؼ ¿ÔÀ»¶§ÀÇ °ªÀ» ´ë»ó¿¡ ½É¾î³õÀ½À¸·Î¼ Å°ÀÇ Áߺ¹À» ¹æÁö
if(target.onchange != null)
target.onchange();
}
var btnRetrAmt = "btn_uf_retrAmt"; // Ãâ±Ý°¡´É±Ý¾×¹öÆ°¸í
if(IS_HIDDEN_LINK) {
status_msg();
if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT | Event.CLICK)
document.onmouseover=hidestatus;
document.onmouseout=hidestatus;
}
/**
* cf_changeAmt - ±Ý¾×Æ÷¸ËÆÃ
* @param field : ±Ý¾×Æ÷¸ËÆà ÇÒ ID
*/
function cf_changeAmt(id) {
var obj_field = document.getElementById(id);
var amount = obj_field.value;
amount = removeComma(amount);
amount = trim(amount);
if(amount.length <= 19) {
if(amount == "") {
obj_field.value = "";
return;
}
if(Number(amount) == 0) {
obj_field.value = "0";
return;
}
obj_field.value = wfcb_putComma(Number(amount));
}
}
/* status bar 󸮽ÃÀÛ */
function hidestatus() {
try {
window.status='';
} catch(e) {}
return true;
}
function status_msg() {
window.status="";
setTimeout("status_msg()", 0);//°ªÀÌ 0ÀÏ°æ¿ì ¸µÅ©ÁÖ¼Ò°¡ º¸ÀÌÁö¾ÊÀ½
}
// ó¸®Áß ·¹À̾î
//document.write("
");
//document.write("");
// ±âº» xgrid ³ôÀÌ
var xgrid_height = 275;
var xgrid_height2 = 275;
function com_callbackGridFileSavePopup() {
fileSaveGridInitialize();
}
function printDiv() {
//top.mainframe.focus();
try{
if(parent.mainframe == undefined) {
parent.proIfr.focus();
}
}catch(e){}
//window.onbeforeprint = beforeDivs;
//window.onafterprint = afterDivs;
window.print();
}
function beforeDivs() {
// ÀμâÇÒ div °´Ã¼ °Ë»ö
var printTable = new Array();
var content_div;
var divs = document.all.tags('DIV');
var tables;
var layerTitle;
var isLogo = false; // ȸ鿡 ·Î°íÀ̹ÌÁö Á¸Àç À¯¹«;
var isLayer = false;
for(var i=0; i < divs.length; i++){
if(divs[i].id == "wrap_conts")
content_div = divs[i];
// ·¹À̾îÀÏ °æ¿ì ŸÀÌƲÀ̹ÌÁö °¡Á®¿À±â.
if(divs[i].id == 'head'){
isLayer = true;
layerTitle = divs[i].outerHTML;
}
if(divs[i].style.display == 'none' || divs[i].style.visibility == 'hidden' || divs[i].id == 'tb_pop' || divs[i].id == 's_layer' || divs[i].id == 's_layer2' || divs[i].id == 'scbbox' || divs[i].id == 'maskFilm')
divs[i].setAttribute("hiddentemp","true");
divs[i].style.display = 'none';
if (divs[i].print != undefined) {
printTable.push(divs[i]);
}
/*if(divs[i].id == 'head'){
var inps = divs[i].all.tags('INPUT');
for(var k=0; k < inps.length; k++){
if(inps[k].type == 'image')
layerTitle = inps[k].outerHTML;
}
}*/
}
var orgwidth;
var sele = document.all.tags('SELECT');
for (var i=0; i < sele.length; i++){
if(sele[i] != undefined){
if(sele[i].className == "sl_l"){ orgwidth = "280px"; }
else if(sele[i].className == "sl_m"){ orgwidth = "200px"; }
else if(sele[i].className == "sl_mm"){ orgwidth = "160px"; }
else if(sele[i].className == "sl_ms"){ orgwidth = "130px"; }
else if(sele[i].className == "sl_mms"){ orgwidth = "100px"; }
else if(sele[i].className == "sl_s"){ orgwidth = "80px"; }
else if(sele[i].className == "sl_ys"){ orgwidth = "50px"; }
else if(sele[i].className == "sl_ss"){ orgwidth = "40px"; }
else if(sele[i].className == "sl_xs "){ orgwidth = "40px"; }
sele[i].setAttribute("orgwidth", orgwidth);
}
}
var inner = "";
if(printTable.length == 0){
var cont_divs;
if(content_div == undefined){
content_div = document.body;
cont_divs = document.all.tags('DIV');
}else{
cont_divs = content_div.all.tags('DIV');
}
for (var i = 0; i < cont_divs.length; i++) {
if(cont_divs[i].getAttribute("hiddentemp") == null){
cont_divs[i].style.display = 'block';
printTable.push(cont_divs[i]);
}
}
var imgs = document.getElementsByTagName("IMG");
for(var i=0; i -1){
imgs[i].setAttribute("imgHiddentemp","true");
imgs[i].style.display = 'none';
}
if(imgs[i].src.indexOf('img_logo.gif') > -1){
isLogo = true;
}
}
inner += "";
//if(layerTitle != undefined){
// inner += layerTitle + "
";
//}
inner += content_div.innerHTML;
// ·Î°í
if(!isLogo){
inner += "
";
inner += "
";
inner += "
";
inner += "
";
}
inner += "
";
}else{
var isLayerTitle = false;
inner += "";
for (var i = 0; i < printTable.length; i++) {
var divs = printTable[i].all.tags('DIV');
for (var d = 0; d < divs.length; d++) {
if(divs[d].getAttribute("hiddentemp") == null){
divs[d].style.display = 'block';
}
if(divs[d].id == 'head'){
isLayerTitle = true;
}
}
var imgs = printTable[i].all.tags("IMG");
for(var d=0; d
-1){
imgs[d].setAttribute("imgHiddentemp","true");
imgs[d].style.display = 'none';
}
if(imgs[d].src.indexOf('img_logo.gif') > -1)
isLogo = true;
}
if(i==0){
if(document.all.page_title_div2 != undefined)
inner += document.all.page_title_div2.innerHTML + "
";
if(isLayer && !isLayerTitle){
inner += layerTitle + "
";
}
//if(layerTitle != undefined){
// inner += layerTitle + "
";
//}
}
inner += printTable[i].innerHTML;
}
// ·Î°í
if(!isLogo){
inner += "
";
inner += " ";
inner += "
";
inner += "
";
}
inner += " ";
}
document.body.insertAdjacentHTML("beforeEnd", inner);
var divs = document.getElementsByTagName('DIV');
var tables;
for (var d = 0; d < divs.length; d++){
if (divs[d].id.indexOf('divPrint') > -1) {
//tables = divs[d].all.tags('TABLE');
tables = $(divs[d]).find('TABLE');
for(var t=0; t < tables.length; t++){
if(tables[t].chgWid != 'N')
tables[t].style.width = '100%';
}
}
}
}
function afterDivs() {
var divs = document.all.tags('DIV');
var tables;
for (var d = 0; d < divs.length; d++){
if (divs[d].style.display == 'none' && divs[d].getAttribute("hiddentemp") == null) {
divs[d].style.display = 'block';
}
if (divs[d].id.indexOf('divPrint') > -1) {
divs[d].outerHTML = "";
}
}
var imgs = document.getElementsByTagName('IMG');
for (var d = 0; d < imgs.length; d++){
if (imgs[d].getAttribute("imgHiddentemp") != null && imgs[d].style.display == "none") {
imgs[d].style.display = "";
}
}
/*try{
var obj;
var sele = document.all.tags('SELECT');
for (var i=0; i < sele.length; i++){
if(sele[i] != undefined){
//obj = document.getElementById(sele[i].name)
//if(obj){
//alert(sele[i].getAttribute("orgwidth"));
obj.reInitializeSelectBox(sele[i].getAttribute("orgwidth"));
//}
}
}
}catch(e){}
*/
}
function uf_xgridCondition() {
// ±×¸®µå °Ë»ö Á¶°Ç ȸ鿡¼ Àоî¿À±â
try {
if(XGridObj.SearchCondition != "") {
return;
}
XGridObj.SearchCondition = "";
XGridObj.SearchCondition2 = "";
var html_str = document.getElementById("invi_area");
// invi_area °¡ ¿©·¯°³ÀÎ °æ¿ì
if(html_str == null || html_str == undefined) {
for(var i=1; i < 10; i++) {
html_str = document.getElementById("invi_area"+i);
if(html_str != null && html_str != undefined
&& html_str.style.display == "block") {
break;
}
}
}
//var obj_childs = html_str.childNodes[0];
var obj_childs;
for(var j=0; j < html_str.childNodes.length; j++){
if(html_str.childNodes[j] instanceof HTMLTableElement){
obj_childs = html_str.childNodes[j];
break;
}
}
for(var i=0; i < obj_childs.rows.length; i++) {
var obj1 = "", obj2 = "", obj3 = "", obj4 = "";
try {
obj1 = obj_childs.rows[i].cells[0]; //ttable.rows[idx].cells.length-2
obj1 = obj1.innerHTML;
} catch(e) { obj1 = ""; }
try {
obj2 = obj_childs.rows[i].cells[1];
if(obj2.firstChild.nodeValue == null) {
obj2 = obj2.childNodes[0];
obj2 = obj2.innerHTML;
}
else { // span űװ¡ ¾øÀ»¶§
obj2 = obj2.firstChild.nodeValue;
}
} catch(e) { obj2 = ""; }
try {
obj3 = obj_childs.rows[i].cells[2];
obj3 = obj3.innerHTML;
} catch(e) { obj3 = ""; }
try {
obj4 = obj_childs.rows[i].cells[3];
if(obj4.firstChild.nodeValue == null) {
obj4 = obj4.childNodes[0];
obj4 = obj4.innerHTML;
}
else { // span űװ¡ ¾øÀ»¶§
obj4 = obj4.firstChild.nodeValue;
}
} catch(e) { obj4 = ""; }
XGridObj.SearchCondition += "";
if(obj1 != "" && obj2 != "") {
XGridObj.SearchCondition += obj1 + " : " + obj2 + " ";
}
XGridObj.SearchCondition2 += "";
if(obj3 != "" && obj4 != "") {
XGridObj.SearchCondition2 += obj3 + " : " + obj4 + " ";
XGridObj.SearchCondition2 = replace(XGridObj.SearchCondition2, "?", "");
}
}
XGridObj.SearchCondition = replace(XGridObj.SearchCondition , "", "");
XGridObj.SearchCondition2 = replace(XGridObj.SearchCondition2 , "", "");
XGridObj.SearchCondition += " ";
XGridObj.SearchCondition2 += "";
}
catch(e) {
XGridObj.SearchCondition = "";
XGridObj.SearchCondition2 = "";
}
}
/*
* @param key_acn : °èÁ¹øÈ£
* @param layer_yn : ·¹ÀÌ¾î ¿©ºÎ(Y : ·¹À̾î)
*/
function cf_showPrintNotLogin(key_acn, layer_yn, print_id, print_pre, print_after) {
var popupUrl = "/uib/jsp/common/comm_gridPdfPrintPopup2.jsp";
var layerUrl = "/uib/jsp/common/comm_gridPdfPrint2.jsp";
var fileName = document.location.pathname.split("/").pop();
var fileId = fileName.split(".")[0];
var gridTitle = "";
if(is_Null(key_acn)) {
key_acn = "";
}
if(is_Null(layer_yn)) { // layer_yn ±âº»°ª ¼³Á¤
layer_yn = "N";
}
if(layer_yn == "Y") { // ·¹À̾î·Î È£Ãâ
//var dataProvider = IBUtil.getdataProvider("grid_area");
var dataProvider = IBUtil.getdataProvider("grid_area");
if(dataProvider && dataProvider.RowCount() > 0) {
//gridTitle = IBUtil.getGridView("grid_area").getGridTitle();
gridTitle = IBUtil.getGridView("grid_area").getGridTitle();
if("" == gridTitle) {
try {
gridTitle = parent.$(".stit3").text();
} catch(e) {}
}
var frm = document.createElement("form");
frm.target = "";
createHiddenField(frm, "fileId", fileId);
createHiddenField(frm, "gridTitle", gridTitle);
createHiddenField(frm, "key_ebnk_acn", key_acn);
open_ajax(layerUrl, frm, popupGridInitialize, true);
// Layer Popup Move Top
setTimeout(function(){
var layerMargin = window.innerHeight - $("div.p_appr>div").height();
if ( layerMargin < 0 ) { layerMargin = 0; }
$("div.p_appr").animate({'top': parseInt(layerMargin/2)}, 500);
},1000)
} else {
if(is_Null(print_id)) {
PTMPrintWebPage({elementid:'#' + $(".dvpop").attr("id"), formurl:'https://kiup.ibk.co.kr/IBK/uib/sw/printmade3/server_files/form.txt'});
}
else {
if(print_pre) {
try { print_pre(); } catch(e) {}
}
PTMPrintWebPage({elementid:'#' + print_id, formurl:'https://kiup.ibk.co.kr/IBK/uib/sw/printmade3/server_files/form.txt', callback:print_after});
}
}
}
// iframe³»¿¡¼ È£ÃâÇÏ´Â °æ¿ì
else if(typeof parent != "undefined" && parent != null && parent != "" && parent.document.getElementById("ifrmDetail")) {
if(document.getElementById("grid_area")) {
//IBUtil.commit("grid_area");
IBUtil.commit("grid_area");
//var dataProvider = IBUtil.getdataProvider("grid_area");
var dataProvider = IBUtil.getdataProvider("grid_area");
if(dataProvider && dataProvider.RowCount() > 0) {
//gridTitle = IBUtil.getGridView("grid_area").getGridTitle();
gridTitle = IBUtil.getGridView("grid_area").getGridTitle();
var frm = document.createElement("form");
frm.target = "";
if("" == gridTitle) {
try {
gridTitle = parent.$(".stit3").text();
} catch(e) {}
}
createHiddenField(frm, "fileId", fileId);
createHiddenField(frm, "gridTitle", gridTitle);
createHiddenField(frm, "key_ebnk_acn", key_acn);
$("body").append(frm);
uf_newWin3(frm, popupUrl, "GRID_PDF_POP_VIEW", "860", "804");
} else {
uf_alert("ÀúÀåÇÒ µ¥ÀÌÅÍ°¡ ¾ø½À´Ï´Ù.");
return;
}
} else {
uf_alert("±×¸®µå ȸ鿡¼¸¸ ÆÄÀÏÀúÀåÀÌ °¡´ÉÇÕ´Ï´Ù.");
return;
}
// ÀϹÝÀûÀΠȸ鿡 ±×¸®µå°¡ ÀÖ°í ±×¸®µå °´Ã¼³»¿¡ ·¹Äڵ尡 ÀÖÀ¸¸é
} else if(document.getElementById("grid_area")) {
//±×¸®µå°¡ ÀÖ°í ±×¸®µå °´Ã¼³»¿¡ ·¹Äڵ尡 ÀÖÀ¸¸é
//var dataProvider = IBUtil.getdataProvider("grid_area");
var dataProvider = IBUtil.getdataProvider("grid_area");
if(dataProvider && dataProvider.RowCount() > 0) {
//gridTitle = IBUtil.getGridView("grid_area").getGridTitle();
gridTitle = IBUtil.getGridView("grid_area").getGridTitle();
var frm = document.createElement("form");
frm.target = "";
if( !is_Null(opener) && document.location.href != opener.document.location.href ) {
if("" == gridTitle) {
try {
gridTitle = $(".stit").text();
} catch(e) {}
}
createHiddenField(frm, "fileId", fileId);
createHiddenField(frm, "gridTitle", gridTitle);
createHiddenField(frm, "key_ebnk_acn", key_acn);
$("body").append(frm);
uf_newWin3(frm, popupUrl, "GRID_PDF_POP_VIEW", "860", "804");
} else {
if("" == gridTitle) {
gridTitle = $(".stit3").text();
}
createHiddenField(frm, "fileId", fileId);
createHiddenField(frm, "gridTitle", gridTitle);
createHiddenField(frm, "key_ebnk_acn", key_acn);
open_ajax(layerUrl, frm, popupGridInitialize, true);
// Layer Popup Move Top
setTimeout(function(){
var layerMargin = window.innerHeight - $("div.p_appr>div").height();
if ( layerMargin < 0 ) { layerMargin = 0; }
$("div.p_appr").animate({'top': parseInt(layerMargin/2)}, 500);
},1000)
}
} else {
if( !is_Null(opener) && document.location.href != opener.document.location.href ) {
PTMPrintWebPage({elementid:'#' + $(".dvpop").attr("id"), formurl:'https://kiup.ibk.co.kr/IBK/uib/sw/printmade3/server_files/form.txt'});
} else {
PTMPrintWebPage({elementid:'#ibkContent', formurl:'https://kiup.ibk.co.kr/IBK/uib/sw/printmade3/server_files/form.txt'});
}
}
// [ifrmDetail] iframe¿¡ ±×¸®µå°¡ Á¸ÀçÇÏ´Â °æ¿ì
} else if( document.getElementById("ifrmDetail") && document.getElementById("ifrm") ) {
var iframeWindow = $("#ifrm").get(0).contentWindow || $("#ifrm").get(0).contentDocument.defaultView;
if( iframeWindow.document.getElementById("grid_area") ) {
//iframeWindow.IBUtil.commit("grid_area");
iframeWindow.IBUtil.commit("grid_area");
//var dataProvider = iframeWindow.IBUtil.getdataProvider("grid_area");
var dataProvider = iframeWindow.IBUtil.getdataProvider("grid_area");
if( dataProvider && dataProvider.RowCount() > 0 ) {
fileName = iframeWindow.document.location.pathname.split("/").pop();
fileId = fileName.split(".")[0];
//gridTitle = iframeWindow.IBUtil.getGridView("grid_area").getGridTitle();
gridTitle = iframeWindow.IBUtil.getGridView("grid_area").getGridTitle();
var frm = iframeWindow.document.createElement("form");
frm.target = "";
if("" == gridTitle) {
try {
gridTitle = $(".stit3").text();
} catch(e) {}
}
createHiddenField(frm, "fileId", fileId);
createHiddenField(frm, "gridTitle", gridTitle);
createHiddenField(frm, "key_ebnk_acn", key_acn);
$("body").append(frm);
iframeWindow.uf_newWin3(frm, popupUrl, "GRID_PDF_POP_VIEW", "860", "804");
} else {
uf_alert("ÀúÀåÇÒ µ¥ÀÌÅÍ°¡ ¾ø½À´Ï´Ù.");
return;
}
} else {
uf_alert("±×¸®µå ȸ鿡¼¸¸ ÆÄÀÏÀúÀåÀÌ °¡´ÉÇÕ´Ï´Ù.");
return;
}
} else {
PTMPrintWebPage({elementid:'#ibkContent', formurl:'https://kiup.ibk.co.kr/IBK/uib/sw/printmade3/server_files/form.txt'});
}
}
/*
* À¥ÇÁ¸°Æà Printmade
*/
function uf_WebPrintOld(mode) {
/*
* Á¶È¸ ³»¿ëÀº mainframeÀ̶ó´Â ÇÁ·¹ÀÓ ¾È¿¡ ³ªÅ¸³ª ÀÖÀ¸¸ç
*
* mode°¡ "all"·Î ¼³Á¤µÇ´Â °æ¿ì¿¡´Â ÆäÀÌÁö Àüü¸¦ ÀμâÇϸç ÀÌ¿ÜÀÇ °æ¿ì ƯÁ¤ ¿µ¿ª¸¸À» ÀμâÇÑ´Ù.
*
* ÀÌ ¶§ ÀμâÇÏ°íÀÚ ÇÏ´Â ³»¿ëÀº result_area ¾È¿¡ µé¾î ÀÖÀ¸¸ç ÀÌ´Â wrap_conts·Î µÑ·¯½Î¿© ÀÖ´Ù.
* wrap_conts´Â allc ¾È¿¡ Æ÷ÇԵǾî ÀÖÀ¸¸ç ÇØ´ç ÆäÀÌÁöÀÇ Á¦¸ñ À̹ÌÁö´Â title_img¶ó´Â id¸¦ ÅëÇÏ¿© Á¢±ÙÇÒ ¼ö ÀÖ´Ù.
* GridÀÇ ³Êºñ´Â ³»¿ë ÀüüÀÇ ³Êºñ¿Í ÇöÀç GridÀÇ ³Êºñ Áß ´õ Å« °ÍÀ» ¼±ÅÃÇÏ¸ç ³ôÀÌ´Â ³»¿ë ÀüüÀÇ ³ôÀÌ¿¡ ¹«Á¶°Ç ¸ÂÃá´Ù
*
*/
if(!checkActiveXInstall()) {
uf_webPrintError();
return;
}
//_trk_clickTrace('EVT','À¥ÇÁ¸°ÆÃ'); // WebLogger Ä«¿îÆ®¿ë(À¥ÇÁ¸°ÆÃÈ£Ãâ½Ã¸¶´Ù Ä«¿îÆ®)
var toolbar = document.getElementById('toolbar');
var isToolbarExist = false;
// Àμ⠽à Åø¹Ù°¡ ³ª¿ÀÁö ¾Êµµ·Ï Çϱâ À§ÇØ Á¦°Å ÈÄ Àμâ. (ÃßÈÄ ´Ù½Ã º¹¿ø)
if (toolbar != null) {
isToolbarExist = true;
toolbar.style.display = 'none';
}
var yangsic_url = '/uib/js/printmade/yangsic.xml';
print_set('mainframe', 0,0,0,0,yangsic_url);
return;
var grid = document.getElementById('XGridObj');
var isGridExist = false; // ±×¸®µå Á¸Àç ¿©ºÎ
var checkboxwidth = 0; // üũ¹Ú½º ³Êºñ
var checkboxindex = 0; // üũ¹Ú½º À§Ä¡
var isCheckboxExist = false; // üũ¹Ú½º Á¸Àç ¿©ºÎ
var wrap = document.getElementById('wrap_conts'); // Àμ⠳»¿ëÀ» µÑ·¯½Î°í ÀÖ´Â object
var XGridObj = document.getElementById('XGridObj');
var result = document.getElementById('result_area');
if (result == null || result.style.display == 'none') {
OPTION_PO = ' /po:0';
print_set('mainframe', 0,0,0,0,yangsic_url);
return;
}
if (grid != null) {
/*
* °Ë»ö °á°ú°¡ ¾ø´Â °æ¿ì grid ÀÚü´Â Á¸ÀçÇÏÁö¸¸ grid_areaÀÇ display°¡ noneÀ¸·Î ¼³Á¤µÇ¾î ÀÖ¾î ȸ鿡 ³ªÅ¸³ªÁö ¾Ê´Â´Ù.
* ÀÌ·± °æ¿ì º°µµÀÇ ±×¸®µå Á¶ÀÛ ¾øÀÌ ¹Ù·Î Àüü Àμ⸦ ÇÑ ÈÄ Á¾·áÇÑ´Ù.
*/
if (document.getElementById('grid_area').style.display == 'none') {
print_set('mainframe', 0,0,0,0,yangsic_url);
return;
}
XGridObj.VertScrollBarAutoHide = true; // ¼¼·Î ±æÀ̸¦ ¸ÂÃçÁÙ °ÍÀ̱⠶§¹®¿¡ ½ºÅ©·Ñ Á¦°Å
//XGridObj.Footer = false; // GridÀÇ ÇÏ´Ü ÇÕ°è µîÀÌ ³ª¿ÀÁö ¾Êµµ·Ï ¼³Á¤
OPTION_SCR = " /scr"; // Grid°¡ ÀÖ´Â °æ¿ì ½ºÅ©·Ñ ĸÃĸ¦ ÇØ¾ß ÇϹǷΠÇØ´ç ÆĶó¹ÌÅ͸¦ ¼³Á¤ÇØÁØ´Ù.
isGridExist = true; // ÃßÈÄ º¹¿øÀ» À§ÇØ Grid°¡ Á¸ÀçÇÑ´Ù´Â °ÍÀ» ÀúÀå
var height_sum = 0;
var width_sum = XGridObj.IndicatorWidth; // °Ë»ö °á°ú°¡ ³ª¿Ã ¶§ Á¦ÀÏ ¿ÞÂÊ¿¡ ³ª¿À´Â ColumnÀÇ ³Êºñ
if (XGridObj.BandHeaderLineCount == 1) // 2°¡Áö ÀÌ»ó Ç׸ñÀÌ Çϳª·Î ÇÕÃÄÁø Header°¡ ¾ø´Â °æ¿ì
height_sum = XGridObj.HeaderHeight + XGridObj.CellHeight * (XGridObj.RecordCount + 3);
else // 2°¡Áö ÀÌ»ó Ç׸ñÀÌ Çϳª·Î ÇÕÃÄÁø Header°¡ Á¸ÀçÇÏ´Â °æ¿ì
height_sum = XGridObj.BandHeaderHeight * XGridObj.BandHeaderLineCount + XGridObj.CellHeight * (XGridObj.RecordCount + 3);
for (var i = 0; i < XGridObj.ColumnCount; i++) { // °¢ Ç׸ñ WidthÀÇ ÇÕÀ» ±¸ÇÔ
var ith_column = XGridObj.GetColumn(i);
if (ith_column.Visible == true) {
if (ith_column.Caption == '¼±ÅÃ') { // üũ ¹Ú½º°¡ Á¸ÀçÇÏ´Â °æ¿ì
isCheckboxExist = true; // üũ¹Ú½º°¡ Á¸ÀçÇÑ´Ù´Â °ÍÀ» ±â¾ïÇØ µÒ
checkboxwidth = ith_column.Width; // ÇØ´ç ColumnÀÇ ³Êºñ¸¦ ÀúÀå. (ÃßÈÄ¿¡ º¹¿øÇϱâ À§Çؼ)
ith_column.Width = 0; // ÇØ´ç ColumnÀÇ ³Êºñ¸¦ 0À¸·Î ¼³Á¤ÇØ º¸ÀÌÁö ¾Ê°Ô ÇÑ´Ù
}
else {
width_sum = width_sum + ith_column.Width;
}
}
}
var allc = document.getElementById('allc');
var width_org = grid.clientWidth;
var height_org = grid.clientHeight;
allcwidth = allc.clientWidth;
allcheight = allc.clientHeight;
wrapwidth = wrap.clientWidth;
wrapheight = wrap.clientHeight;
/*
* ³»¿ë¿¡ ¸ÂÃá GridÀÇ ³Êºñ°¡ ±âÁ¸ Å©±âº¸´Ù Å« °æ¿ì È®´ëÇÏ°í ÀÛÀº °æ¿ì´Â ±×´ë·Î µÐ´Ù.
* ´Ü, ³ôÀÌÀÇ °æ¿ì ¹«Á¶°Ç ³»¿ë¿¡ ¸ÂÃá´Ù.
*/
if (width_sum + 10 > width_org)
var width_chg = width_sum + 10;
else
var width_chg = width_org;
var height_chg = height_sum;
var width_gap = width_chg - width_org;
var height_gap = height_chg - height_org;
/*
* Grid¸¦ µÑ·¯ ½Î°í ÀÖ´Â Element µéÀÇ Å©±âµµ Grid¿¡ ¸Â°Ô °°ÀÌ È®´ëÇÑ´Ù
* allc -> wrap_conts -> XGridObj ÀÇ ¼ø¼·Î Æ÷ÇÔÇÏ°í ÀÖ´Ù.
* width_gapÀº Grid°¡ ±âÁ¸ÀÇ ³Êºñ¿¡ ºñÇؼ ¾ó¸¶³ª ´õ Ä¿Áö´Â Áö¸¦ ³ªÅ¸³»¸ç
* grid ¹Ù·Î »ó´ÜÀÇ wrapÀÇ ³Êºñ´Â ±× Â÷ÀÌ°ª¿¡´Ù°¡ 25¸¦ Ãß°¡ÇÏ¿© È®´ëÇÑ´Ù
* (µü ¸Â°Ô È®´ëÇÏ´Â °æ¿ì ´ÙÀ½ÁÙ·Î ³Ñ¾î°¡´Â °æ¿ì°¡ ¹ß»ýÇÏ°í, 25¸¦ ÁØ ÀÌÀ¯´Â ºÎºÐÀμ⠽à ¿ìÃø ¿©¹éÀ» À§Çؼ)
*
* ¸¶Âù°¡Áö ÀÌÀ¯·Î wrap ¹Ù·Î »ó´ÜÀÇ allc¿¡´Â 50À» ´õÇÏ¿© È®´ëÇÑ´Ù.
*/
allc.style.width = allcwidth + width_gap + 50;
allc.style.height = allcheight + height_gap;
wrap.style.width = wrapwidth + width_gap + 25;
wrap.style.height = wrapheight + height_gap;
grid.style.width = width_chg;
grid.style.height = height_chg;
}
// ¸¶ÄÉÆà ¹è³Ê À¥ÇÁ¸°Æýà Á¦°ÅÇϱâ
if(document.getElementById("bannerDiv") != null && document.getElementById("bannerDiv") != undefined) {
var bannerDivObj = document.getElementById("bannerDiv");
}
if (mode == 'all') { // mode ÆĶó¹ÌÅÍ°¡ allÀ̸é Àüü ³»¿ë Àμâ
if(document.getElementById("bannerDiv") != null && document.getElementById("bannerDiv") != undefined) {
bannerDivObj.style.display = 'none';
}
print_set('mainframe', 0,0,0,0,yangsic_url);
if(document.getElementById("bannerDiv") != null && document.getElementById("bannerDiv") != undefined) {
bannerDivObj.style.display = 'block';
}
} else { // ¾Æ´Ñ °æ¿ì ºÎºÐ Àμâ
/*
* Á¦¸ñ°ú Á¶È¸ ³»¿ëÀ¸·Î¸¸ ±¸¼ºµÈ ÆäÀÌÁö¸¦ ±¸¼ºÇϱâ À§Çؼ Àӽ÷ΠÇϳªÀÇ Á¦¸ñÀ» Ãß°¡·Î ¸¸µç´Ù
*/
if(document.getElementById("bannerDiv") != null && document.getElementById("bannerDiv") != undefined) {
bannerDivObj.style.display = 'none';
}
var div_tmp = document.createElement("div");
var p_tmp = document.createElement("
");
// Á¦¸ñ imgÀÇ ³ôÀÌ´Â 25ÀÌÁö¸¸ 25·Î ÇÏ´Â °æ¿ì ±âÁ¸ÀÇ ÆäÀÌÁö°¡ °ãÃÄ ³ª¿À´Â °æ¿ì°¡ ÀÖ¾î ¿©À¯ºÐÀ» µÒ.
div_tmp.id = 'div_tmp';
div_tmp.style.height = 30;
var img_tmp = document.createElement("img");
img_tmp.src = document.getElementById("title_img").src;
div_tmp.appendChild(img_tmp);
result.parentNode.insertBefore(p_tmp,result);
result.parentNode.insertBefore(div_tmp,result);
/*
* º¯¼ö ¼³¸í
* div_tmp
* - offsetTop : wrap_conts ³»ºÎ¿¡¼ÀÇ À§Ä¡(»óÇÏ)
* - offsetHeight : div_tmp ³»¿ëÀÇ ³ôÀÌ
* wrap
* - offsetTop : ÆäÀÌÁö ³»ºÎ¿¡¼ÀÇ À§Ä¡(»óÇÏ)
* result
* - offsetHeight : result_area ³»¿ëÀÇ ³ôÀÌ
*/
/*
* ºÎºÐ Àμ⸦ ÇÏ´Â °æ¿ì ÀüüȸéÀ» ½ºÅ©¸° ¼¦ ÇÑ ÀÌÈÄ À߶󳻴 ½ÄÀ¸·Î ó¸®ÇÑ´Ù.
* print_set('ÇÁ·¹ÀÓ¸í', »ó, ¿ì, ÇÏ, ÁÂ, ¾ç½Äurl)ÀÇ ÇüÅ·ΠȣÃâ
* »ó : div_tmp.offsetTpÀº wrap_conts ¾È¿¡¼ÀÇ À§Ä¡¸¦ ³ªÅ¸³»¹Ç·Î wrap_contsÀÇ À§Ä¡¸¦ ´õÇØÁÜ
* ¿ì : ¿À¸¥ÂÊÀÇ °æ¿ì Àß¶ó³¾ ÇÊ¿ä°¡ ¾øÀ¸¹Ç·Î 0À¸·Î ¼³Á¤
* ÇÏ : ÆäÀÌÁö Àüü ³ôÀÌ¿¡¼ ÀμâÇÏ°íÀÚ ÇÏ´Â ³»¿ëÀÌ ³¡³ª´Â ÁöÁ¡ÀÇ ÁÂÇ¥¸¦ »©ÁØ´Ù.
* ³¡³ª´Â ÁöÁ¡ÀÇ ÁÂÇ¥´Â cut_topÀÇ °ª¿¡ div_tmp¿Í result_areaÀÇ ³ôÀ̸¦ ´õÇØ ±¸ÇÒ ¼ö ÀÖ´Ù.
* Á : wrap_consÀÇ À§Ä¡¸¦ ±¸ÇÏ¸é µÈ´Ù
*/
var cut_top = div_tmp.offsetTop + wrap.offsetTop;
var cut_right = 0;
var cut_bottom = document.body.scrollHeight - (div_tmp.offsetTop + result.offsetHeight + div_tmp.offsetHeight + wrap.offsetTop + 46);
var cut_left = wrap.offsetLeft;
// Grid Page Break ÀÛ¾÷
var pagewidth = allc.offsetWidth;
var pageheight = result.offsetHeight + div_tmp.offsetHeight;
var grid_top = grid_top = XGridObj.offsetTop - div_tmp.offsetTop;
var header_height = 0;
var cell_height = XGridObj.CellHeight;
var param = '';
if (XGridObj.BandHeaderLineCount == 1) // 2°¡Áö ÀÌ»ó Ç׸ñÀÌ Çϳª·Î ÇÕÃÄÁø Header°¡ ¾ø´Â °æ¿ì
{
header_height = XGridObj.HeaderHeight;
}
else // 2°¡Áö ÀÌ»ó Ç׸ñÀÌ Çϳª·Î ÇÕÃÄÁø Header°¡ Á¸ÀçÇÏ´Â °æ¿ì
{
header_height = XGridObj.BandHeaderHeight * XGridObj.BandHeaderLineCount;
}
if (pageheight >= pagewidth)
OPTION_PO = ' /po:0';
else
OPTION_PO = ' /po:1';
var getPBM = function(mode) {
var cut = 0;
var param = '';
var index = 0;
/*
* °¡·Î¿Í ¼¼·ÎÀÇ ±æÀÌ¿¡ µû¶ó ¿ëÁö ¹æÇâÀÌ ´Þ¶óÁö±â ¶§¹®¿¡ ÇÑ ÆäÀÌÁö´ç ³ôÀ̸¦ ¾ó¸¶·Î ÇÒÁö ¿ëÁö ¹æÇâ¿¡ µû¶ó °è»êÇÑ´Ù
* ÀÌ ¶§ °è»ê µÈ °ªÀ» cut ¿¡ ÀúÀåÇÑ´Ù.
*/
if (mode == 'landscape') {
cut = parseInt(pagewidth / 297 * 210 * 0.7) ;
} else if (mode == 'portrait') {
cut = parseInt(pagewidth / 210 * 297 * 0.75);
}
var remain = grid_top;
// grid À ºÎºÐÀÇ ³»¿ë¸¸À¸·Î ÇÑ ÀåÀÌ ³ÑÀ» °æ¿ì ÇÑ Àå ¹Ì¸¸ÀÇ ¾çÀÌ ³²À» ¶§±îÁö À߶󳽴Ù.
if (grid_top > cut) {
param = '' + cut;
for (i = 2; i <= remain / cut; i++) {
param = param + ',' + (cut * i);
}
/*
* index : Áö±Ý±îÁö Àß¶ó³½ ÃÑ ³ôÀ̸¦ ³ªÅ¸³½´Ù.
* remainÀÇ Ãʱ⠰ªÀ¸·Î grid_topÀ» ÀúÀåÇß±â ?¹®¿¡ remain °ª¿¡¼ index °ªÀ» »©ÁÖ¸é grid À ºÎºÐÀÇ ³»¿ë Áß ³²Àº ³»¿ëÀÇ ³ôÀÌ°¡ °è»êµÈ´Ù.
*/
index = cut * parseInt(remain / cut);
remain = remain - index;
}
/*
* GridÀÇ Çì´õ´Â ¹«Á¶°Ç ÇÑ ÆäÀÌÁö¿¡ °°ÀÌ ³ª¿Í¾ß Çϱ⠶§¹®¿¡
* À§¿¡¼ ³²Àº ³»¿ë°ú Çì´õ°¡ °°ÀÌ ³ª¿Ã ¼ö ÀÖ´ÂÁö ¾ø´ÂÁö¸¦ È®ÀÎÇÑ´Ù.
*/
if (cut - remain > header_height) {
remain = remain + header_height;
var count = parseInt((cut - remain) / cell_height);
var first_cut = remain + count * cell_height;
} else {
// Çì´õ°¡ ¸ø µé¾î°¡¸é ¿ø·¡ ÀÖ´ø ºÎºÐ±îÁö ÀÚ¸£°í ³ª¸ÓÁö´Â ´ÙÀ½ºÎÅÍ.
param = param + ',' + (index + remain);
index = index + remain;
first_cut = header_height + parseInt((cut - header_height) / cell_height) * cell_height;
}
param = param + ',' + (first_cut + index);
// 2¹ø° ÆĶó¹ÌÅÍ´Â ¹Ýº¹ÀûÀ¸·Î Àß¶ó³¾ ¾ç
param = param + '|' + ( cell_height * parseInt(cut / cell_height));
if (param.charAt(0) == ',') {
param = param.substring(1);
}
return param;
};
// 3¹ø° ÆĶó¹ÌÅÍ´Â ÀμâÇÒ ¿µ¿ªÀÇ Àüü ³ôÀÌ
param = getPBM('portrait') + '|' + pageheight + '|' + getPBM('landscape');
print_setpbm('mainFrame', cut_top, cut_right, cut_bottom, cut_left, param);
// Àμ⸦ ¸¶ÃÆÀ¸¹Ç·Î Àӽ÷Π¸¸µç Á¦¸ñÀ» Á¦°Å
p_tmp.parentNode.removeChild(p_tmp);
div_tmp.parentNode.removeChild(div_tmp);
if(document.getElementById("bannerDiv") != null && document.getElementById("bannerDiv") != undefined) {
bannerDivObj.style.display = 'block';
}
}
// Grid°¡ Á¸ÀçÇÏ´Â °æ¿ì Å©±â¸¦ ¿ø »óÅ·Πº¹±¸
if (isGridExist == true) {
grid.style.width = width_org;
grid.style.height = height_org;
wrap.style.width = wrapwidth;
wrap.style.height = wrapheight;
allc.style.width = allcwidth;
allc.style.height = allcheight;
// üũ ¹Ú½º°¡ Á¸ÀçÇÏ´Â °æ¿ì ¿ø»óÅ·Πº¹±¸
if (isCheckboxExist == true)
XGridObj.GetColumn(checkboxindex).Width = checkboxwidth;
// Åø¹Ù°¡ Á¸ÀçÇÏ´Â °æ¿ì ´Ù½Ã ¿ø»óÅ·Πº¹±¸ÇÑ´Ù
if (isToolbarExist == true) {
toolbar.style.display = 'block';
}
}
}
var preBtn_Def = "";
var preDivId = "";
/**
* ¼ºê¹Ô ÇϱâÀü¿¡ ¹öÆ° HIDE ½ÃÅ°°í, ó¸®Áß ·¹ÀÌ¾î ¶ç¿î´Ù.
*/
function setSubmitBefore(gubun) {
var flag = true;
// ´ÙÀ½¹öÆ°ÀÏ °æ¿ì btn_def2¸¦ È÷µç½ÃŲ´Ù
if(gubun == 'X') {
preDivId = "btn_def2";
}
else {
preDivId = "btn_def";
}
if(flag && document.all[preDivId] != undefined) {
preBtn_Def = document.all[preDivId].innerHTML;
document.all[preDivId].innerHTML = "";
}
preLoadingLayer("SUBMIT");
}
// XGrid °¡ Àִ ȸ鿡¼´Â PreLoading ·¹À̾ ¶ç¿öÁØ´Ù.
function preLoadingLayer(gubun) {
var load_num = ((Math.floor(Math.random() * 1000)%3)+1);
var common_flash_txt = '';
// ó¸®Áß À̹ÌÁö ·ÎµùÁß È¸é Ŭ¸¯¹æÁö¸¦ À§ÇÑ Ã³¸®
try{
loadingMask('on');
showLoadingLogo();
}catch(e){}
/* delete by hks@
// I.E10 °ü·Ã ·ÎµùÀ̹ÌÁö ÃÖ»óÀ§·Î ¼öÁ¤(2012.11.29)
var trident = navigator.userAgent.match(/Trident\/(\d.\d)/i);
var isie10 = false;
var isie11 = false;
if(trident != null && trident[1] == "6.0"){ // 6.0 = IE10, 5.0 = IE9, 4.0 = IE8
isie10 = true;
}
if(trident != null && trident[1] == "7.0"){ // 6.0 = IE10, 5.0 = IE9, 4.0 = IE8
isie11 = true;
}
if(isie10 || isie11) {
common_flash_txt += '';
} else
if(gubun == "SUBMIT") { // submit
//common_flash_txt += '';//
common_flash_txt += '';
}
else { // pre loading
common_flash_txt += '';
}
var obj = document.getElementById("Loading_Div");
if(obj == null || obj == undefined){
var printDiv = '';
document.body.insertAdjacentHTML("beforeEnd", printDiv);
obj = document.getElementById("Loading_Div");
}
if(obj != null && obj != undefined) {
obj.innerHTML = common_flash_txt;
obj.style.width = 190;
obj.style.height = 115;
var objW = $('body').outerWidth();
var objH = $('body').outerHeight();
$(obj).width(190);
$(obj).height(115);
$(obj).css('left', (objW/2)-144);
$(obj).css('top', (objH/2 + document.body.scrollTop)-100);
//obj.style.left = (objW/2)-144;
//obj.style.top = (objH/2 + document.body.scrollTop)-100;
obj.style.visibility = "visible";
}
*/
}
/**
* @setSubmitBefore ÇÔ¼ö¿¡ Àû¿ëÀ» ÇØÁ¦ÇÑ´Ù. ·¹À̾ ¾ø¾Ø´Ù.
*/
function reset_submit(frm){
// ó¸®Áß À̹ÌÁö ·ÎµùÁß È¸é Ŭ¸¯¹æÁö¸¦ À§ÇÑ Ã³¸®ÇØÁ¦
try{
loadingMask('off');
}catch(e){}
// ¹öÆ° ÃʱâÈ
if( document.all[preDivId] != null && document.all[preDivId] != undefined) {
document.all[preDivId].innerHTML = preBtn_Def;
}
hideLoadingLogo();
/* delete by hks@
if( document.all["Loading_Div"] != null && document.all["Loading_Div"] != undefined) {
document.all["Loading_Div"].innerHTML = "";
document.all["Loading_Div"].style.visibility = "hidden";
}
*/
if(frm == undefined){
if(document.form1 != null && document.form1 != undefined)
frm = document.form1;
else if(document.form2 != null && document.form2 != undefined)
frm = document.form2;
}
if(frm != undefined){
submitStateFalse(frm); // ½ºÆÄÀÌ´õ ¼ºê¹Ô ÃʱâÈ
removeTempAttributeName(frm, '_isPagingSet');
}
}
// XGrid °¡ Àִ ȸ鿡¼´Â PreLoading ·¹ÀÌ¾î ´Ý¾ÆÁØ´Ù
function endPreLoading() {
hideLoadingLogo();
/* delete by hks@
// PreLoading Layer ¸¦ ´Ý¾ÆÁØ´Ù.
var obj = document.getElementById("Loading_Div");
if(obj != null && obj != undefined) {
obj.innerHTML = "";
obj.style.visibility = "hidden";
}
*/
// xgrid °¡ ÀÖ´Â °æ¿ì ÁöÁ¤Ç׸ñÀμ⠹öÆ°À» º¸¿©ÁØ´Ù.
if(document.all["easy_print"] != null && document.all["easy_print"] != undefined) {
if(XGridObj != null && XGridObj != undefined) {
document.all["easy_print"].style.display = "inline";
} else {
document.all["easy_print"].style.display = "none";
}
}
}
/**
* »ç¿ëÀÚÁ¤ÀÇ ¾Ë·µ¸Þ½ÃÁö â
* field : ¾Ë·µÃ¢ È®ÀÎÈÄ Æ÷Ä¿½º À̵¿ÇÒ °´Ã¼
*/
function uf_alert(msg, width, height, form, field, func) {
if (typeof msg == "undefined"){ return false; }
if (msg == ""){ return false; }
layerAlert.layer_alert(msg, width, height, form, field, func);
// var frm = document.all.errorForm;
// if(frm == undefined) {
// frm = document.form2;
// }
//
// var origin_msg = "";
// var isie11 = false;
// var trident = navigator.userAgent.match(/Trident\/(\d.\d)/i);
//
// if(trident != null && trident[1] == "7.0"){ // 7.0 = IE11
// isie11 = true;
// }
///*
// if(isie11){
// try {
//
// if(msg != undefined) {
// origin_msg = msg;
// }
// msg = msg.replace(/ /ig, " ");
// msg = msg.replace(/<(\/)?([a-zA-Z]*)(\s[a-zA-Z]*=[^>]*)?(\s)*(\/)?>/ig, "");
//
// } catch(e) {
// msg = origin_msg;
// }
//
// alert(msg);
// return;
// }*/
//
// if(width == null) width = 401;
// if(height == null) height = 206;
// var str_focus = "";//
//
// if(form != null) { str_focus = '&form_name=' + form.name; }
// if(field != null){
// var sFieldType=field.type;
// if(sFieldType.indexOf('select')>-1){
// str_focus += '&field_name=' + field.name;
// }else{
// if(field.length>1){
// str_focus += '&field_name=' + field[0].name;
// }else{
// str_focus += '&field_name=' + field.name;
// }
// }
// }
//
// var src = "/uib/jsp/common/layer_alertmsg1.jsp?msg=" + msg + str_focus + "&func=" + escape(func);
// var common_flash_txt = '';
//
// var obj = document.getElementById("proDiv");
// if(obj == null || obj == undefined){
// var printDiv = '';
// document.body.insertAdjacentHTML("beforeEnd", printDiv);
//
// obj = document.all.proDiv;
// }
//
// obj.style.width=width+'px';
// /*obj.style.height=height+'px'; */
//
// if(obj.style.visibility == "visible") { // ´Ù¸¥ ¾Ë·µÃ¢ÀÌ ¶°ÀÖÀ»¶§ ±× âÀ» ¾Êº¸ÀÌ°Ô ÇÑ´Ù.
// obj.style.visibility = "hidden";
// obj.innerHTML = "";
// }
// else if(obj.style.display == "none") { // ¾Ë·µÃ¢À» µÎ¹ø ¶ç¿ï¶§ ó¸®
// obj.style.display = "block";
// }
//
//
// if(obj != null && obj != undefined) {
// obj.innerHTML = common_flash_txt;
// obj.style.visibility = "visible";
// obj.style.display = "block";
// var xpos = (document.body.offsetWidth/2)-(width/2); //
// var ypos = (document.body.offsetHeight/2) + ($(window).scrollTop())-(height/2); //
// $(obj).css("top", Math.round(ypos));
// $(obj).css("left", Math.round(xpos));
// $(obj).focus();
// }
// //proIfr3.location.href = "/uib/jsp/common/layer_alertmsg1.jsp?msg=" + msg + str_focus + "&func=" + escape(func);
// //XecureNavigate("/uib/jsp/common/layer_alertmsg1.jsp?msg=" + msg + str_focus + "&func=" + escape(func), "proIfr3");
//
}
function uf_alert_acno(msg, width, height, form) {
var frm = document.all.errorForm;
if(frm == undefined) {
frm = document.form2;
}
if(width == null) width = 460;
if(height == null) height = 250;
var src = "/uib/jsp/common/layer_alertmsg_acno.jsp";
open_ajax(src, null, null, true, null, null, width, height);
}
// ¾Ë·µ ¸Þ¼¼Áö ⠴ݱâ
function hideAlertIfr() {
var obj = document.getElementById("proDiv");
if(obj != null && obj != undefined) {
obj.style.visibility = "hidden";
obj.style.display = "none";
}
}
/**
* »ç¿ëÀÚÁ¤ÀÇ ÄÁÆß Ã¢
* @title : ÄÁÆßâ ŸÀÌƲ
* @message : ¸Þ½ÃÁö ³»¿ë (String or String Array)
* @yesfunc : È®ÀιöÆ° ÄݹéÇÔ¼ö À̸§ (ex. "funcName()" ÇÔ¼ö¸¦ È£ÃâÇÒ °æ¿ì -> "funcName"¸¸ ÀÔ·Â )
* @yesBtn : È®ÀÎ ¹öÆ° ÅؽºÆ®
* @noBtn : Ãë¼Ò ¹öÆ° ÅؽºÆ®
*/
function uf_confirm (title, message, yesfunc){
layerAlert.layer_confirm(title, message, yesfunc, 'È®ÀÎ', '´Ý±â');
}
function uf_confirm_btn (title, message, yesfunc, yesBtn, noBtn){
layerAlert.layer_confirm(title, message, yesfunc, yesBtn, noBtn);
}
/**
* ±Ý¾×À» Çѱ۷Πº¯È¯
*/
function NUM_TO_HAN(num, mode) {
/*
fnc(num,1):alert
fnc(num,2):°°ÀºÈ¸é
fnc(num,3,return_input):´Ù¸¥ input¿¡ ¹Ýȯ
*/
var return_input = "";
if ( num == "" || num == "0" ) {
if ( mode == "3" ) {
return_input = "";
}
return;
}
num=new String(num);
if(num.indexOf('.') > -1) {
num = num.substring(0,num.indexOf('.'));
}
num=num.replace(/,/gi,"");
var len = num.length;
var temp1 = "";
var temp2 = "";
if ( len/4 > 3 && len/4 <= 4 ) {
if ( len%4 == 0 ) {
temp1 = ciphers_to_han(num.substring(0,4)) + "Á¶" + ciphers_to_han(num.substring(4,8)) + "¾ï" + ciphers_to_han(num.substring(8,12)) + "¸¸" + ciphers_to_han(num.substring(12,16));
} else {
temp1 = ciphers_to_han(num.substring(0,len%4)) + "Á¶" + ciphers_to_han(num.substring(len%4,len%4+4)) + "¾ï" + ciphers_to_han(num.substring(len%4+4,len%4+8)) + "¸¸" + ciphers_to_han(num.substring(len%4+8,len%4+12));
}
} else if ( len/4 > 2 && len/4 <= 3 ) {
if ( len%4 == 0 ) {
temp1 = ciphers_to_han(num.substring(0,4)) + "¾ï" + ciphers_to_han(num.substring(4,8)) + "¸¸" + ciphers_to_han(num.substring(8,12));
} else {
temp1 = ciphers_to_han(num.substring(0,len%4)) + "¾ï" + ciphers_to_han(num.substring(len%4,len%4+4)) + "¸¸" + ciphers_to_han(num.substring(len%4+4,len%4+8));
}
} else if ( len/4 > 1 && len/4 <= 2 ) {
if ( len%4 == 0 ) {
temp1 = ciphers_to_han(num.substring(0,4)) + "¸¸" + ciphers_to_han(num.substring(4,len));
} else {
temp1 = ciphers_to_han(num.substring(0,len%4)) + "¸¸" + ciphers_to_han(num.substring(len%4,len));
}
} else if ( len/4 <= 1 ) {
temp1 = ciphers_to_han(num.substring(0,len));
}
for (var i=0; i < temp1.length; i++) {
temp2 = temp2 + num_to_han(temp1.substring(i, i+1));
}
temp3=new String(temp2);
temp3=temp3.replace(/¾ï ¸¸/gi,"¾ï ");
temp3=temp3.replace(/Á¶ ¾ï/gi,"Á¶ ");
if ( mode == 1 ) {
alert(temp3 + " ¿ø");
} else if ( mode == 2 ) {
return temp3;
} else if ( mode == 3 ) {
return_input = " " + temp3 + "¿ø ";
}
return return_input;
}
function ciphers_to_han(num) {
var len = num.length;
var temp = "";
if ( len == 1 ) {
temp = num;
} else if ( len == 2 ) {
temp = num.substring(0,1) + "½Ê" + num.substring(1,2);
} else if ( len == 3 ) {
temp = num.substring(0,1) + "¹é" + num.substring(1,2) + "½Ê" + num.substring(2,3);
} else if ( len == 4 ) {
temp = num.substring(0,1) + "õ" + num.substring(1,2) + "¹é" + num.substring(2,3) + "½Ê" + num.substring(3,4);
}
num=new String(temp);
num=num.replace(/0½Ê/gi,"");
num=num.replace(/0¹é/gi,"");
num=num.replace(/0õ/gi,"");
return num;
}
// ¼ýÀÚ : ÇѱÛ: num_to_han, ciphers_to_han, NUM_TO_HAN
function num_to_han(num) {
if ( num == "1" ) {
return "ÀÏ";
} else if ( num == "2" ) {
return "ÀÌ";
} else if ( num == "3" ) {
return "ȕ";
} else if ( num == "4" ) {
return "ȍ";
} else if ( num == "5" ) {
return "¿À";
} else if ( num == "6" ) {
return "À°";
} else if ( num == "7" ) {
return "Ä¥";
} else if ( num == "8" ) {
return "ÆÈ";
} else if ( num == "9" ) {
return "±¸";
} else if ( num == "½Ê" ) {
return "½Ê";
} else if ( num == "¹é" ) {
return "¹é";
} else if ( num == "õ" ) {
return "õ";
} else if ( num == "¸¸" ) {
return "¸¸ ";
} else if ( num == "¾ï" ) {
return "¾ï ";
} else if ( num == "Á¶" ) {
return "Á¶ ";
} else if ( num == "0" ) {
return "";
} else {
return "";
}
}
/**
* #¼ýÀÚ¾Æ´Ñ ¹®ÀÚ»èÁ¦
*/
function uf_onlyNum(str){
var retStr = "";
if(wfcb_isEmpty(str)) return false;
for(var idx=0;idx < str.length;idx++){
if((str.charAt(idx) < '0' || str.charAt(idx) > '9') && str.charAt(idx) != ','){
}
else {
retStr += str.charAt(idx) + "";
}
}
return retStr;
}
// onreset À̺¥Æ® ¼³Á¤»óÅÂ
var changeAmt_temp_variable = true;
/**
* ±Ý¾×º¯È¯ ¹× Çѱ۷Π±Ý¾×º¸¿©ÁÖ±â
*/
function changeAmt(field, amount, gubun, field2) {
if(field2 == null || field2 == undefined) {
field2 = "sp_amt";
}
amount = removeComma(amount);
if(!isNum(amount)) {
if(amount != "") {
var obj = eval("document.form1." + field);
obj.value = uf_onlyNum(obj.value);
return;
}
}
amount = trim(amount);
if(amount.length <= 19) {
amount = amount != "" ? parseInt(removeComma(amount)) : "";
if(amount != "" && amount != "0") {
//var curr_amt = removeComma(document.all[field].value);
var curr_amt = removeComma($("#"+field).val());
if(gubun == 1) {
curr_amt = wfcb_putComma(Number(curr_amt));
//document.all[field2].innerHTML = "[" + NUM_TO_HAN(curr_amt, 3) + "]";
//document.all[field].value = curr_amt; // ÄÞ¸¶¸¦ ÀÔ·Â
$("#"+field2).html("[" + NUM_TO_HAN(curr_amt, 3) + "]");
$("#"+field).val(curr_amt);
}
else if(gubun == 3) {
curr_amt = wfcb_putComma(Number(curr_amt) * 10000);
//document.all[field2].innerHTML = "[" + NUM_TO_HAN(curr_amt, 3) + "]";
$("#"+field2).html("[" + NUM_TO_HAN(curr_amt, 3) + "]");
}
else {
curr_amt = wfcb_putComma(Number(curr_amt) + Number(amount));
//document.all[field].value = curr_amt;
//document.all[field2].innerHTML = "[" + NUM_TO_HAN(curr_amt, 3) + "]";
$("#"+field2).html("[" + NUM_TO_HAN(curr_amt, 3) + "]");
$("#"+field).val(curr_amt);
}
}
else {
//document.all[field].value = "";
//document.all[field2].innerHTML = "";
$("#"+field2).html("");
$("#"+field).val("");
}
}
if(changeAmt_temp_variable) {
try { document.form1.onreset = resetSpAmt; } catch(e) {}
try { document.form2.onreset = resetSpAmt; } catch(e) {}
changeAmt_temp_variable = false;
}
}
function changeAmtE2E(field, amount, gubun, field2) {
if(field2 == null || field2 == undefined) {
field2 = "sp_amt";
}
amount = removeComma(amount);
if(!isNum(amount)) {
if(amount != "") {
var obj = eval("document.form1." + field);
obj.value = uf_onlyNum(obj.value);
return;
}
}
amount = trim(amount);
if(amount.length <= 19) {
amount = amount != "" ? parseInt(removeComma(amount)) : "";
if(amount != "" && amount != "0") {
var curr_amt = removeComma($("#"+field).val());
if(gubun == 1) {
curr_amt = wfcb_putComma(Number(curr_amt));
$("#"+field2).html("[" + NUM_TO_HAN(curr_amt, 3) + "]");
clearAllE2EByNm(field);
$("#"+field).val(curr_amt);
}
else if(gubun == 3) {
curr_amt = wfcb_putComma(Number(curr_amt) * 10000);
$("#"+field2).html("[" + NUM_TO_HAN(curr_amt, 3) + "]");
}
else {
clearAllE2EByNm(field);
curr_amt = wfcb_putComma(Number(curr_amt) + Number(amount));
$("#"+field2).html("[" + NUM_TO_HAN(curr_amt, 3) + "]");
$("#"+field).val(curr_amt);
}
}
else {
clearAllE2EByNm(field);
$("#"+field2).html("");
$("#"+field).val("");
}
}
if(changeAmt_temp_variable) {
try { document.form1.onreset = resetSpAmt; } catch(e) {}
try { document.form2.onreset = resetSpAmt; } catch(e) {}
changeAmt_temp_variable = false;
}
}
function resetSpAmt() {
try {
document.all["sp_amt"].innerHTML = "";
}
catch(e) {}
}
/**
* #Áֹεî·Ï¹øÈ£ üũ.
*/
function isValidJuminNo(userSid1,userSid2){
var ju = userSid1.value;
var ju1 = userSid2.value;
juid = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0);
if(!isNumber(userSid1) || !isNumber(userSid2)){
return false;
}
if(getByteLength(userSid1)!=6 || getByteLength(userSid2)!=7){
return false;
}
for(var i = 0; i<6;i++)
juid[i] = ju.substring(i,i+1);
for(i=0;i<7;i++)
juid[i+6] = ju1.substring(i,i+1);
for(var sum = 0, i = 0;i<12;i++)
sum += juid[i] * ((i >7) ? (i-6) : (i+2));
var mod = 11 - sum%11;
if(mod >= 10)
mod -= 10;
if(mod != juid[12])
return false;
else
return true;
}
/**
* µÎ ³¯Â¥ÀÇ ³¯¼ö¸¦ °è»êÇØ ÁØ´Ù.
*
* param
* from day(YYYYMMDD)
* to day(YYYYMMDD)
* return
* from day¿Í to dayÀÇ Â÷À̸¦ ¸®ÅÏÇÑ´Ù.
* author
* freedae
*/
function numberOfDays(fromDay, toDay){
var fromD = new Date(fromDay.substring(0,4),fromDay.substring(4,6)-1,fromDay.substring(6,8));
var toD = new Date(toDay.substring(0,4),toDay.substring(4,6)-1,toDay.substring(6,8));
var totD = toD.getTime() - fromD.getTime();
totD = totD / 1000 / 60 / 60 / 24+1;
return totD;
}
/****************************************************************
Xecure Ajax ÇÔ¼ö Ãß°¡ ½ÃÀÛ
****************************************************************/
var xmlHttp;
function createXMLHttpRequest() {
if (window.ActiveXObject) {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
}
}
/*
to-be sendAjax·Î ´ëü by hks@
function sendAjax(url, param, callBack, xmlHttpObj) {
//url = XecureAjaxGet(url);
//param = XecureAjaxPost(param);
createXMLHttpRequest();
xmlHttp.onreadystatechange = callBack;
xmlHttp.open("POST", url, true);
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
xmlHttp.send(param);
}
*/
/****************************************************************
Xecure Ajax ÇÔ¼ö Ãß°¡ ³¡
****************************************************************/
document.write('');
// ·Î±×¾Æ¿ô
function uf_logout(gubun) {
if(gubun == 'timeout'){ // ¼¼¼ÇŸÀӾƿô
try{
if(opener != null && opener != undefined) {
try{
self.close();
}catch(e){}
}
var url = location.href+'';
if(url.indexOf('baromsg') > -1){
hideIfr();
var src = "/uib/jsp/common/timeout.jsp";
// ¸Þ½ÅÀú¹ðÅ·
if(url.indexOf('baromsg') > -1){
src = "/uib/baromsg/common/msgr_timeout.jsp";
}
//document.body.style.overflow='hidden'
//var common_flash_txt = '