var gToggle=0;
var gsIndex1;
var gsIndex2;
var gsIndex3;
var gsIndex4;
var gSubmit_TF=1;
var preLogin='';
var fgMarginType = 'Y';
var fgArgSSQry = '0';
var fgArgSCQry = '0';
var fgArgSQry = '0';
var fgArgSCQry = '0';
current_date=parseInt(20250818,10);
if (navigator.userAgent.indexOf("MSIE") == -1)
{
if(navigator.userAgent.indexOf("Trident") == -1)
{
alert('ÀÎÅÍ³Ý ÀͽºÇ÷η¯ ºê¶ó¿ìÀú¿¡¼¸¸ Á¢¼Ó ÇÒ ¼ö ÀÖ½À´Ï´Ù. \nÅ©·Ò ¶Ç´Â ¿§Áö ºê¶ó¿ìÀú¿¡¼´Â Á¢¼Ó µÇÁö ¾Ê½À´Ï´Ù.');
// gSubmit_TF=0;
// this.close();
}
}
//document.onkeydown=key_check;
document.onmouseover=status_lock;
document.oncontextmenu=right_lock;
// -> PDA Login
function browser_check()
{
if (navigator.userAgent.indexOf("Windows CE") != -1)
{
document.forms[0].action='http://www.neoib.com/pda/zz011.php3';
}
}
// -> ¿î¿µÃ¼Á¦¿¡ µû¸¥ BARCODE Cab ÆÄÀÏ Á¤º¸
/*
var oCtlFile0= ""; // Win98
var oCtlFile1= ""; // WinNT
var oCtlFile2= ""; // WinXP
*/
var oCtlFile0='';
var oCtlFile1='';
var oCtlFile2='';
function fvCheckOS()
{
var nType;
if ((navigator.userAgent.indexOf('Win') != -1) && (navigator.userAgent.indexOf('98') != -1))
nType = 0;
else if ((navigator.appVersion.indexOf("NT") !=-1) && (navigator.appVersion.indexOf("5.0") !=-1))
nType = 1;
else if ((navigator.appVersion.indexOf("NT") !=-1) && (navigator.appVersion.indexOf("5.1") !=-1))
nType = 2;
else nType = 0;
switch (nType)
{
case 0 : oClientModule.innerHTML = oCtlFile0; break;
case 1 : oClientModule.innerHTML = oCtlFile1; break;
default : oClientModule.innerHTML = oCtlFile2; break;
}
}
// -> status bar Á¦¾î (°æ·Î ¸·¾ÆÁÜ)
function status_lock()
{
window.status='';
//event.returnValue=false;
}
// -> ¸¶¿ì½º ¿À¸¥ÂÊ Å° Àá±Ý
function right_lock()
{
return event.ctrlKey
}
// -> ??
function sub_print()
{
this.focus();
this.print();
}
// -> ¹ÝÀü??
function toggle(fname)
{
obj=eval("document."+fname);
for (i=0,j=1;i ¸Þ´º¹Ù ½Ã°£ Setting (/stage/MainMenu.php3¿¡ µ¿ÀÏÇÔ¼ö »ç¿ë. È®Àοä)
function SerTime()
{
var today = new Date(Cyear,Cmon,Cday,Chour,Cmin,Csec);
timeyear=today.getYear()
if (timeyear<1000)
timeyear+=1900;
timemon=today.getMonth();
if (timemon==0) timemon=12;
timeday=today.getDate()
timehour=today.getHours()
timemin =today.getMinutes()
timesec =today.getSeconds()
if (timemon < 10)
timemon='0'+timemon;
if (timeday < 10)
timeday='0'+timeday;
if (timehour < 10)
timehour='0'+timehour;
if (timemin < 10)
timemin='0'+timemin;
if (timesec < 10)
timesec='0'+timesec;
//timestr=timemon+'/'+timeday+' '+timehour+':'+timemin+':'+timesec;
timestr=timehour+':'+timemin+':'+timesec;
document.all.timer.value=timestr;
Csec+=1;
}
// -> Àμ⠽ºÆ®¸³Æ® Start
function putSettings()
{
with ( document.all.factory.printing ) {
header = '';
//footer = '&bÆäÀÌÁö &p / &P';
footer = '';
//SetMarginMeasure(2);
portrait = true;
leftMargin = 0.0;
topMargin = 20.0;
rightMargin = 0.0;
bottomMargin = 10.0;
printer = "\\\\FS-LYS-01\\HP5n-759"
//disableUI = true;
}
}
var divObj;
var divObj_1;
var gClientDivPrint = '';
var gClientDivPrint_1= '';
var divWidth = 0;
var divWidth_1 = 0;
var divHeight = 0;
var divHeight_1 = 0;
var ExtendHeight = 0;
function doPrint(frame,aFlag)
{
putSettings();
if (gClientDivPrint_1 != '') // ----- table_bodyXY Àμâ½Ã »ç¿ëµÇ´Â ¸ðµâ
{
window.onbeforeprint = fvShowDivsXY;
window.onafterprint = fvRtnDivsXY;
}
else if (gClientDivPrint != '') // ----- table_body Àμâ½Ã »ç¿ëµÇ´Â ¸ðµâ
{
//divObj = eval("frame."+gClientDivPrint);
divObj = eval(gClientDivPrint);
window.onbeforeprint = fvShowDivs;
window.onafterprint = fvRtnDivs;
}
//if (arguments.length == 1)
//{
// document.all.factory.printing.Print(true, frame);
// return;
//}
if (arguments.length == 1)
{
//factory.printing.Preview(frame);
if(confirm('¼¼·Î·Î Ãâ·ÂÀ» ÇϽǷÁ¸é È®ÀÎÀ» °¡·Î·Î Ãâ·ÂÀ» ÇϽǷÁ¸é Ãë¼Ò¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.')) jFlagPrintYn = true;
else jFlagPrintYn = false;
document.all.factory.printing.portrait = jFlagPrintYn;
//document.all.factory.printing.Preview(frame);
document.all.factory.printing.Print(true, frame);
return;
}
if (fstrVersionCheck() <= 5 )
{
if (aFlag == 0) alert('MS IE 5.0x ÀÌÇÏ¿¡¼´Â µ¿ÀÛÇÏÁö ¾Ê½À´Ï´Ù.');
factory.printing.Print(true, frame);
}
else if (aFlag == 0)
{
factory.printing.Preview(frame);
}
else factory.printing.Print(true, frame);
}
function fvShowDivs ()
{
/*
divHeight = divObj.style.height;
divObj.style.height = 'auto';
*/
divHeight = divObj.style.height;
divObj.style.top = '0';
divObj.style.left = '-8';
divObj.style.height = 'auto';
divObj.style.width = 'auto';
}
function fvRtnDivs ()
{
/*
divObj.style.height = divHeight;
*/
divObj.style.top = '0';
divObj.style.left = '0';
divObj.style.height = divHeight;
divObj.style.width = '0';
}
function fvShowDivsXY ()
{
if(gClientDivPrint != '')
{
divObj = eval(gClientDivPrint);
divWidth = divObj.style.width;
divHeight = divObj.style.height;
divObj.style.top = '0';
divObj.style.left = '0';
divObj.style.height = 'auto';
divObj.style.width = 'auto';
}
divObj_1 = eval(gClientDivPrint_1);
divWidth_1 = divObj_1.style.width;
divHeight_1 = divObj_1.style.height;
divObj_1.style.top = '0';
divObj_1.style.left = '0';
divObj_1.style.height = 'auto';
divObj_1.style.width = 'auto';
}
function fvRtnDivsXY (id)
{
if(gClientDivPrint != '')
{
divObj.style.top = '0';
divObj.style.left = '0';
divObj.style.height = divHeight;
divObj.style.width = divWidth;
}
divObj_1.style.top = '0';
divObj_1.style.left = '0';
divObj_1.style.height = divHeight_1;
divObj_1.style.width = divWidth_1;
}
function fstrVersionCheck()
{
var uAgent = window.navigator.userAgent
var msie = uAgent.indexOf ( "MSIE " )
if ( msie > 0 ) return parseFloat(uAgent.substr(msie+5,3),10);
}
var headersFootersAdded = false;
function fbufPrtOutput( aNum, aParm )
{
top.Main.focus();
//oPreView.parentWindow..focus();
oPreView.ExecWB(7,1);
return;
if (arguments.length == 1) aParm = 1;
if (fstrVersionCheck() <= 5 )
oPreView.ExecWB(6,-1);
else
{
//alert(oPreView.object.Properties);
//aNum = oPreView.QueryStatusWB(aNum);
//alert(oPreView.GetProperty(oPreView.AddressBar,0));
//oPreView.ExecWB(8,aParm,null,null);
//oPreView.ExecWB(aNum, aParm, null, null);
//oPreView.ExecWB(aNum, aParm, null, '&w');
oPreView.ExecWB(aNum,aParm);
}
//PreView.ExecWB( aNum, 1, null, null );
}
// <- Àμ⠽ºÆ®¸³Æ® End
// -> table sort°ü·Ã Start (cyberpark 20021201)
function setDataType(cValue)
{
var isDate = new Date(cValue);
if (isDate == "NaN")
{
if (isNaN(cValue))
{
cValue = cValue.toUpperCase();
return cValue;
}
else
{
var myNum;
myNum = String.fromCharCode(48 + cValue.length) + cValue;
return myNum;
}
}
else
{
var myDate = new String();
myDate = isDate.getFullYear() + " " ;
myDate = myDate + isDate.getMonth() + " ";
myDate = myDate + isDate.getDate(); + " ";
myDate = myDate + isDate.getHours(); + " ";
myDate = myDate + isDate.getMinutes(); + " ";
myDate = myDate + isDate.getSeconds();
//myDate = String.fromCharCode(48 + myDate.length) + myDate;
return myDate ;
}
}
function sortTable(col,tableToSort)
{
tableToSort.cols = (tableToSort.cells.length/tableToSort.rows.length);
var iCurCell = col + tableToSort.cols;
var totalRows = tableToSort.rows.length;
var bSort = 0;
var colArray = new Array();
var oldIndex = new Array();
var indexArray = new Array();
var bArray = new Array();
var newRow;
var newCell;
var i,c,j;
for (i=1; i < tableToSort.rows.length; i++)
{
colArray[i - 1] = setDataType(tableToSort.cells(iCurCell).innerText);
iCurCell = iCurCell + tableToSort.cols;
}
for (i=0; i < colArray.length; i++)
bArray[i] = colArray[i];
colArray.sort();
for (i=0; i < colArray.length; i++)
{
indexArray[i] = (i+1);
for(j=0; j < bArray.length; j++)
{
if (colArray[i] == bArray[j])
{
for (c=0; c 0) ? nPoint : 0;
if (nPoint) var Lsrc = src.substr(0,nPoint-1);
else var Lsrc = src;
flag = (Lsrc.indexOf('?')) > 0 ? '&': '?';
nAsc = src.indexOf('asc');
nAsc = (nAsc > 0) ? src.substr(nAsc+4,nAsc+5) : 0;
if (oIdx == nIdx)
{
switch (parseInt(nAsc,10))
{
case 0 : asc = 1; break;
case 1 : asc = 0; break;
default: asc = 0; break;
}
}
else
asc = 1;
if (bCheck)
{
obj.action = Lsrc+flag+'orderby='+nIdx+'&asc='+asc;
obj.submit();
}
else
location.replace(Lsrc+flag+'orderby='+nIdx+'&asc='+asc);
}
// <- sort°ü·Ã End
// -> ´Þ·Â¸ðµâ º¯°æ iframeÀ¸·Î º¯°æ
function fstrCalView(obj,split,g_onClick,env_LANG,pParam)
{
var xPosMinus = 0;
var yPosMinus = 0;
if(pParam == '2') { xPosMinus = 69; yPosMinus = 2; }
x = event.clientX - xPosMinus;
y = event.clientY + yPosMinus;
scrollY = document.body.scrollTop;
scrollX = document.body.scrollLeft;
x += scrollX;
y += scrollY;
nTempX = event.offsetX;
nTempY = event.offsetY;
x -= nTempX;
y -= nTempY;
minical.style.pixelTop = y + 15;
minical.style.pixelLeft = x - 8;
minical.style.display = '';
oiChild.MiniCal(obj,split,g_onClick,env_LANG);
}
//´Þ·Âkeyin ¿É¼Ç½Ã ½½·¡Áã ¾ø¾Ö±â
function focus_calset(dObj)
{
val_tmp = dObj.value.split('/');
dObj.value = val_tmp[0]+val_tmp[1]+val_tmp[2];
}
//´Þ·Âkeyin ¿É¼Ç½Ã ³¯Â¥ ÀÔ·ÂÈÄ ½½·¡½¬ ¼¼ÆÃ
function blur_calset(inCalVal,toDayVal)
{
if(inCalVal.value.length == 8)
{
var dtMaxDay = new Array('0','31','28','31','30','31','30','31','31','30','31','30','31');
dtYear = parseInt(inCalVal.value.substr(0,4),10);
dtMonth = parseInt(inCalVal.value.substr(4,2),10);
dtDay = parseInt(inCalVal.value.substr(6,2),10);
if(dtYear % 4 == 0 && dtYear % 100 != 0 || dtYear % 400 == 0) dtMaxDay[2] = 29;
if(dtMaxDay[dtMonth] >= dtDay && dtDay >= 1) inCalVal.value = inCalVal.value.substr(0,4)+'/'+inCalVal.value.substr(4,2)+'/'+inCalVal.value.substr(6,2);
else inCalVal.value = toDayVal;
}
else
{
inCalVal.value = toDayVal;
}
}
//´Þ·ÂÀÌ ºñȰ¼ºÈ µÇ¾úÀ» °æ¿ì Áö¿ì°³¹öưÀ» Ŭ¸¯Çصµ Áö¿öÁöÁö ¾Ê°Ô ó¸®
function fn_eraser(obj)
{
if(obj.disabled==false)
obj.value='';
else
return;
}
// -> [¿¢¼¿] (table class)
function excel_view()
{
len=document.forms.length;
for(i=0,j=0;i0)
document.excel.submit();
else
alert('°á°ú¹°ÀÌ ¾ø½À´Ï´Ù.');
}
// -> »ç¿ë°¡´ÉÇÑ Äڵ尪 °Ë»ö
function fzFind(stCnt,stTable,stObjName) {
for(i = 0; i < stObjName.length; i++) {
if(stObjName.charAt(i) == "^") stObjName = stObjName.replace("^","=");
}
Window.open('/lib/php/codefind.php3?Arg_Object='+stObjName+'&Arg_CdCnt='+stCnt+'&Arg_Table='+stTable+'&','WinOpen','top=0,left=0,width=580,height=270');
//fShowChild('/lib/php/codefind.php3?Arg_Object='+stObjName+'&Arg_CdCnt='+stCnt+'&Arg_Table='+stTable+'&','window',580,270);
}
// -> ¹®ÀÚ°ª üũ Start
/*-------------------------------------------------------
Usage : valid_basic(oName,oText,isHan,sSpecial,eChar,isNum,iMin,iMax,is2Byte)
Usage : valid_limit(oText,isHan,sSpecial,eChar,isNum,iMax,is2Byte) 1 -- Á¶°Ç¿¡ À§¹èµÇ´Â°ÍÀº ¹«Á¶°Ç ¸®ÅÏ
Author: 20000714 P.C.S
-------------------------------------------------------
oName -> ¿ÀºêÁ§Æ®ÀÇ Label¸í (Error󸮸¦ À§ÇØ)
oText -> ¿ÀºêÁ§Æ®
isHan -> Çѱۿ©ºÎüũ 0:󸮾ÈÇÔ 1:ó¸®
sSpecial -> Ư¼ö¹®ÀÚüũ 0:󸮾ÈÇÔ 1:ó¸®
eChar -> ¿¹¿Üó¸® 0:󸮾ÈÇÔ 1:ó¸®
isNum -> ¼ýÀÚüũ 0:󸮾ÈÇÔ 1:ó¸®
iMin -> ÃÖ¼ÒÀÚ¸®¼ö ÃÖ¼ÒÀÚ¸®°ª(integer)
iMax -> ÃÖ´ëÀÚ¸®¼ö ÃÖ´ëÀÚ¸®°ª(integer)
is2Byte -> 2Byte¹®ÀÚüũ 0:󸮾ÈÇÔ 1:ó¸®
-------------------------------------------------------*/
var sSpecial_0 = 0;
var sSpecial_1 = 1;
var isHan_0 = 0;
var isHan_1 = 1;
var isNum_0 = 0;
var isNum_1 = 1;
var eChar_0 = 0;
var eChar_1 = 1;
var is2Byte_0 = 0;
var is2Byte_1 = 1;
function valid_basic(oName,oText,isHan,sSpecial,eChar,isNum,iMin,iMax,is2Byte)
{
sStr=oText.value;
rLen=sStr.length;
iLen=sStr.length-1;
check_flag=0;
mTxt='';
if(eChar == 'Default') eChar = " `,./;:<>[]{}()-_*&%$#@!?~+|\^=";
else if(eChar == 'Add_Quot') eChar = " ',./;:<>[]{}()-_*&%$#@!?~+|\^=";
else if(eChar == 'Simple') eChar = " ,./;:<>[]{}()-_*&%$#@!?~+|\^=";
eChar_temp=eChar+'';
escape_val=eChar_temp;
escape_length=eChar_temp.length;
if (escape_val!='0' && escape_length > 0)
{
check_flag=1;
for(i=0;i0)
{
alert_msg(oText,'\''+oName+'\' Áß¿¡ ¼ýÀÚ°¡ ¾Æ´Ñ°ªÀÌ ÀÖ½À´Ï´Ù.');
return 0;
}
}
for (i=0,j=0,k=0,l=0;i<=iLen;i++)
{
comp=parseInt(sStr.charCodeAt(i),10);
if ((comp > 126 && comp < 12593) || (comp > 12634 && comp < 40000) || comp > 60000)
{
j++; l++;
}
else if (comp >= 10000)
{
j++; k++;
}
}
cmpLen=rLen+j;
if (isHan==1)
if (k>0)
{
alert_msg(oText,'\''+oName+'\' Áß¿¡ ÇѱÛ(ÀÚ)ÀÌ ÀÖ½À´Ï´Ù.');
return 0;
}
if (is2Byte==1)
if (l>0)
{
alert_msg(oText,'\''+oName+'\' Áß¿¡ 2Byte¹®ÀÚ°¡ ÀÖ½À´Ï´Ù.');
return 0;
}
cmpLen=rLen+j; // Àüü Length
if (!(cmpLen >= iMin && cmpLen <= iMax))
{
alert_msg(oText,'\''+oName+'\' ÀÇ °ªÀÌ ÀԷµÇÁö ¾Ê¾Ò°Å³ª ÀÚ¸´¼ö°¡ \rÇѰèÄ¡(ÃÖ¼Ò:'+iMin+'/ÃÖ´ë:'+iMax+') ¸¦ ¹þ¾î³³´Ï´Ù.');
return 0;
}
if (sSpecial==1)
{
var szArray=new Array('~','`','!','@','#','$','%','^','&','*','(',')','-','_','+','=','|','\\','[',']','{','}',';',':','"','\'','<',',','>','.','/','?',' ');
izLen=szArray.length;
k=0;
for (i=0,j=0;i<=iLen;i++)
for (j=0;j0)
{
if (check_flag==1)
alert_msg(oText,'\''+oName+'\' Áß¿¡ Ư¼ö¹®ÀÚ³ª °ø¹éÀÌ '+k+'°³ ÀÖ½À´Ï´Ù.\r »ç¿ë°¡´ÉÇÑ Æ¯¼ö ¹®ÀÚ´Â \''+mTxt+'\' ÀÔ´Ï´Ù.');
else
alert_msg(oText,'\''+oName+'\' Áß¿¡ Ư¼ö¹®ÀÚ³ª °ø¹éÀÌ '+k+'°³ ÀÖ½À´Ï´Ù.');
return 0;
}
}
return 1;
}
function valid_limit(oObj,isHan,sSpecial,eChar,isNum,iMax,is2Byte)
{
var ww=xx=yy=zz=tt= 0;
var check_flag = 0;
sStr=oObj.value;
iLen=sStr.length;
cmpCode = event.keyCode;
cmpChar = String.fromCharCode(cmpCode);
escape_val=eChar+'';
escape_length=escape_val.length;
//alert(cmpCode+'/'+cmpChar);
if (isNum)
if ((cmpCode < 48)||(cmpCode > 57)) ww++;
if (is2Byte)
if ((cmpCode > 126 && cmpCode < 12593) || (cmpCode > 12634 && cmpCode < 40000) || cmpCode > 60000) xx++;
if (isHan)
if (cmpCode >= 10000) yy++;
if (iLen != 0 && iMax == iLen) tt++;
if (sSpecial)
{
var szArray = new Array('~','`','!','@','#','$','%','^','&','*','(',')','-','_','+','=','|','\\','[',']','{','}',';',':','"','\'','<',',','>','.','/','?',' ');
izLen = szArray.length;
zz = 0;
for (j=0;j0 || xx>0 || yy>0 || zz>0 || tt>0)
{
event.returnValue = false;
}
}
// <- ¹®ÀÚ°ª üũ End
// -> ÁֹιøÈ£/»ç¾÷ÀÚ¹øÈ£ check
function reginum_check(oLabel,sStr,oObj,vObj)
{
if(vObj == null || vObj == '') vObj = "resi_no2";
len = sStr.length;
var no_1 = sStr.charAt(0);
var no_2 = sStr.charAt(1);
var no_3 = sStr.charAt(2);
var no_4 = sStr.charAt(3);
var no_5 = sStr.charAt(4);
var no_6 = sStr.charAt(5);
var no_7 = sStr.charAt(6);
var no_8 = sStr.charAt(7);
var no_9 = sStr.charAt(8);
var no_10 = sStr.charAt(9);
var no_ck=0;
if(len == 13) // ÁÖ¹Î, ¹ýÀÎ µî·Ï¹øÈ£
{
var no_11 = sStr.charAt(10);
var no_12 = sStr.charAt(11);
var no_13 = sStr.charAt(12);
if((no_7 > 0) && (no_7 < 5))
{
no_ck += no_1 * 2;
no_ck += no_2 * 3;
no_ck += no_3 * 4;
no_ck += no_4 * 5;
no_ck += no_5 * 6;
no_ck += no_6 * 7;
no_ck += no_7 * 8;
no_ck += no_8 * 9;
no_ck += no_9 * 2;
no_ck += no_10 * 3;
no_ck += no_11 * 4;
no_ck += no_12 * 5;
no_ck = no_ck % 11;
no_ck = 11 - no_ck;
if(no_ck > 9) no_ck = 10 - no_ck;
no_ck = Math.abs(no_ck);
if(no_ck == no_13) return 1;
else
{
alert('ÁֹιøÈ£¸¦ È®ÀÎÇϽÿÀ');
oObj.value='';
//document.forms[0].resi_no2.value='';
document.forms[0].elements[vObj].value='';
oObj.focus();
return 0;
}
}
else if(no_7 == 0) // ¹ýÀεî·Ï¹øÈ£
{
no_ck += no_1 * 1;
no_ck += no_2 * 2;
no_ck += no_3 * 1;
no_ck += no_4 * 2;
no_ck += no_5 * 1;
no_ck += no_6 * 2;
no_ck += no_7 * 1;
no_ck += no_8 * 2;
no_ck += no_9 * 1;
no_ck += no_10 * 2;
no_ck += no_11 * 1;
no_ck += no_12 * 2;
no_ck = no_ck % 10;
no_ck = 10 - no_ck;
if(no_ck > 9) no_ck = 10 - no_ck;
no_ck = Math.abs(no_ck);
if(no_ck == no_13) return 1;
else return 0;
}
else
{
alert('Áֹεî·Ï¹øÈ£¸¦ È®ÀÎÇϽÿÀ.');
oObj.value='';
//document.forms[0].resi_no2.value='';
document.forms[0].elements[vObj].value='';
oObj.focus();
return 0;
}
}
if(len == 10) // »ç¾÷ÀÚµî·Ï¹øÈ£
{
no_ck += no_1 * 1;
no_ck += no_2 * 3;
no_ck += no_3 * 7;
no_ck += no_4 * 1;
no_ck += no_5 * 3;
no_ck += no_6 * 7;
no_ck += no_7 * 1;
no_ck += no_8 * 3;
var no_ck_tmp = no_9 * 5;
if(no_ck_tmp < 10) no_ck_tmp = '0'+no_ck_tmp;
else no_ck_tmp+='';
var no_ck_tmp_1 = no_ck_tmp.charAt(0);
var no_ck_tmp_2 = no_ck_tmp.charAt(1);
no_ck = parseInt(no_ck,10) + parseInt(no_ck_tmp_1,10) + parseInt(no_ck_tmp_2,10);
no_ck=no_ck+'';
var no_ck_len = no_ck.length;
no_ck = no_ck.charAt(no_ck_len-1);
no_ck = 10 - no_ck;
no_ck = Math.abs(no_ck)+'';
no_ck_len = no_ck.length;
no_ck = no_ck.charAt(no_ck_len-1);
if(no_ck == no_10) return 1;
else
{
alert('»ç¾÷ÀÚµî·Ï¹øÈ£¸¦ È®ÀÎÇϽÿÀ.');
oObj.value='';
oObj.focus();
return 0;
}
}
}
// -> ¼ýÀÚ '00,000' Çü½Ä
function addcomma(str)
{
var intFlag = '';
// À½¼öÀÎ °æ¿ì (-°¡ ºÙÀº°æ¿ì)
if(parseFloat(str,10)<0)
{
str = str * (-1);
intFlag = '-';
}
str = str+'';
// ¼Ò¼ýÁ¡ÀÌ ºÙÀº °æ¿ì
pnt = str.indexOf('.');
if(pnt != -1)
{
decimal = str.substr(pnt, str.length);
str = str.substr(0, pnt);
}
else
decimal = '';
var len = str.length;
var arg = '';
if (len > 3)
{
switch(len%3)
{
case 0: pos = 0; break;
case 1: pos = 1; break;
case 2: pos = 2; break;
case 3: pos = 3; break;
}
for (i = 0; i < len; i++)
{
if (i < pos)
arg += str.charAt(i);
else
{
if (i != 0 && i%3 == pos)
arg += ',';
arg += str.charAt(i);
}
//alert(arg);
}
}
else
arg = str;
arg = arg+'';
arg = intFlag + arg + decimal;
return arg;
}
// ¤Ñ> '00,000' => '00000'
function rmcomma(obj)
{
var str = '';
for (i = 0; i <= obj.length; i++)
{
if (obj.charAt(i) != ',')
str += obj.charAt(i);
}
return str;
}
// -> ino ¼ýÀÚ°ªÀ» digit ÀÚ¸´¼ö¿¡ ¸ÂÃç 0À» ä¿ö Ãâ·Â
function parseStr( ino , digit )
{
tmp1 = "T" + ino ;
tmp2 = tmp1.substring( 1 );
if( digit )
{
str_len = tmp2.length ;
if( str_len < digit )
{
for( var parseStr_i = 0 ; parseStr_i < (digit - str_len) ; parseStr_i++ ) tmp2 = "0"+tmp2;
}
}
return tmp2;
}
// -> ¸ðµç°ø¹éÁ¦°Å
function trim(src)
{
var k='';
for (i=0;i ¾ÕÂÊ °ø¹é Á¦°Å
function ltrim(src)
{
var k='';
for (i=0;i µÞÂÊ °ø¹é Á¦°Å
function rtrim(src)
{
var giaTemp= new Array();
var i=src.length-1;
var result='';
for (i,j=0;i>=0;i--)
{
if (src.charCodeAt(i) != 32)
{
break;
}
}
result=src.substr(0,i+1);
return result;
}
// -> ltrim+rtrim
function lrtrim(src)
{
var s=ltrim(src);
var t=rtrim(s);
return t;
}
// -> alert + select + focus
function alert_msg(obj,msg)
{
alert(msg);
//obj.value='';
obj.select();
obj.focus();
}
/* »ç¿ëµÇ´Â üũ¹Ú½ºÀÇ class¸¦ 'CheckBox'·Î ÁöÁ¤ÇÑ´Ù. */
var CheckBox_Count;
var All_Check_Flag = 0; //Àüüüũ ¾Æ´Ô
var CheckBox_Value = new Array();
/****************************************************
üũ¹Ú½º °³¼ö/°ª ±¸Çϱâ
****************************************************/
function CheckBox_COUNT()
{
doc_len = document.all.length;
for (i=0,CheckBox_Count=0,k=0; i Àüüüũ
function All_Chk() {
for(i = j = 0; i < ChkVal.length; i++) {
if(!ChkVal[i].disabled) {
if(j == 0) flag = !ChkVal[i].checked;
ChkVal[i].checked = flag;
j++;
}
}
}
//ƯÁ¤Ã¼Å©¹Ú½º Àüüüũ
function CheckBox_Chk(chkAll, cName) { // cName : OBJECT NAME
if(typeof(cName) == "undefined") uName = "chk";
else uName = cName;
flag = chkAll.checked;
obj = document.getElementsByName(uName);
var objCnt = obj.length;
for(i = j = 0; i < objCnt; i++)
{
if(!obj[i].disabled) {
obj[i].checked = flag;
j++;
}
}
if(j != 0) {
return j;
}
}
// -> üũ¹Ú½º ¼±Åà ºÎºÐ °ª ±¸Çϱâ
var ChkVal = document.getElementsByName("chk");
function Get_Check_Value()
{
CheckList = "";
if(ChkVal!=null)
{
for(var i = ChkNum = 0;i Æ÷Ä¿½ºÀ̵¿
var gElmFg =0;
var dkCUE = new Array();
var tgTextBox = new Array();
var tgCntC;
var tgCntR;
function pcMvCsr(cIdx,rIdx,upKey,downKey,leftKey,rightKey,preKey,nextKey)
{
if(gElmFg == 0)
{
//gsElmPK(upKey,downKey,leftKey,rightKey,preKey,nextKey);
tgCntC = textbox_name.length -1;
for(i=0; i<=tgCntC; i++)
{
tgTextBox[i] = document.getElementsByName(textbox_name[i]);
}
tgCntR = tgTextBox[0].length -1 ;
tkCnt = upKey.split(',');
for(i=0;i keyCode¿¡ µû¸¥ À̺¥Æ®
function keyEvent(keyCode, eventFunc)
{
obj = document.forms[0];
obj1 = document.forms[1];
obj2 = document.forms[2];
if(event.keyCode == keyCode)
{
eval(eventFunc);
}
}
// -> ¹Ì»ç¿ë ÄÚµå°Ë»ö
function findEtCode(scEmt, gcTB, gcMin, gcMax)
{
window.open('/common/php/codefind.php3?scEmt='+scEmt+'&gcTB='+gcTB+'&gcMin='+gcMin+'&gcMax='+gcMax,'WinOpen','top=0,left=0,width=510,height=290');
}
// -> ¼±ÅÃÇÑ TR »ö º¯È¯ : °ËÁõ¿ä
function TRColor(obj)
{
// ----- ÀÌÀü ¼±ÅÃµÈ TR ¹ÝÀüÀ§ÇÑ ·ÎÁ÷
len=document.all.length;
for(i=0;i ¿µ¹® ¼Ò¹®ÀÚ>´ë¹®ÀÚ Àüȯ
function KEY_TOUPPERCASE()
{
PRESS_KEY=event.keyCode;
PRESS_KEY=String.fromCharCode(PRESS_KEY);
PRESS_KEY=PRESS_KEY.toUpperCase();
PRESS_KEY=PRESS_KEY.charCodeAt(0);
event.keyCode=PRESS_KEY;
}
//================================================================
// ¹®ÀÚ¿ ġȯ(PHP->JS) => 0x34 => ", 0x39 => '
//================================================================
function fn_decode_replace(Obj)
{
Obj = Obj.replace(/0x34/g, "\"");
Obj = Obj.replace(/0x39/g, "'");
return Obj;
}
// -> ¿ìÆí¹øÈ£ÀԷ½à ÀÚµ¿°Ë»ö
function zipSearch(arg,flag) {
if ( event.keyCode == 13 ) {
obj = document.forms[0];
if (arg=='H') {
if ( obj.zip_no.value != obj.zip_no.defaultValue ) {
if ( obj.zip_no.value.length == 6) {
var zipno1 = ""+obj.zip_no.value;
window.open("/common/php/zip_search.php3?idx="+arg+"&zipno="+zipno1,'win01','width=1,height=1,top=1500,left=1500,scrollbars=0,resizable=1');
}
}
} else if (arg=='O') {
if ( obj.c_zip_no.value != obj.c_zip_no.defaultValue ) {
if ( obj.c_zip_no.value.length == 6) {
var zipno2 = ""+obj.c_zip_no.value;
window.open("/common/php/zip_search.php3?idx="+arg+"&zipno="+zipno2,'win01','width=1,height=1,top=1500,left=1500,scrollbars=0,resizable=1');
}
}
} else if (arg=='D') {
if ( obj.d_zip_no.value != obj.d_zip_no.defaultValue ) {
if ( obj.d_zip_no.value.length == 6) {
var zipno3 = ""+obj.d_zip_no.value;
window.open("/common/php/zip_search.php3?idx="+arg+"&zipno="+zipno3,'win01','width=1,height=1,top=1500,left=1500,scrollbars=0,resizable=1');
}
}
}
}
}
// -> ¿ìÆí¹øÈ£ °Ë»ö
addr_se=null;
function addrSearch(arg) {
if (addr_se==null)
{
addr_se = window.open("/common/php/addr_search.php3?flag="+arg,'ADDR','width=460,height=340,top=200,left=200,scrollbars=0,resizable=1');
}
else
{
addr_se.close();
addr_se = window.open("/common/php/addr_search.php3?flag="+arg,'ADDR','width=460,height=340,top=200,left=200,scrollbars=0,resizable=1');
}
//window.open("./addr_search.php3?flag="+arg,'ADDR','width=400,height=300,top=200,left=200,scrollbars=0,resizable=1');
}
// -> select ¿¡ ƯÁ¤°ª selected µÇ°Ô..
function select_idx(obj,idx)
{
oLen=obj.length;
for(i=0;i0)
window.scrollTo(0,document.body.scrollHeight/3);
else
alert('ÇØ´ç ÀÚ·á°¡ ¾ø½À´Ï´Ù.');
}
//ÀÛ¼ºÀÚ: YSN
//¼³¸í : Å×À̺í Ŭ·¡½º¿¡¼ WIDTH°¡ ³Ê¹« Ŭ¶§ »ç¿ëÇÔ.(Å×À̺í Ŭ·¡½º ÂüÁ¶Çϵµ·Ï...)
function do_scroll(x,y) {
DIV_RHEAD.scrollLeft = x;
DIV_RTAIL.scrollLeft = x;
DIV_LBODY.scrollTop = y;
}
function do_scroll2(y) {
DIV_RBODY.scrollTop = y;
}
// -> ¿µ¼öÁõ Á¶È¸
function Bill_Info(sale_date, ms_no, pos_no, bill_no)
{//alert(sale_date+'/'+ms_no+'/'+pos_no+'/'+bill_no);return;
//bill_win = showModalDialog('/common/php/bill_info.php3?sale_date='+(sale_date)+'&MSNO='+(ms_no)+'&pos_no='+(pos_no)+'&bill_no='+(bill_no), "bill", "dialogWidth: 320px; dialogHeight: 450px;status:no;showMaximizeButton:1;");
bill_win = window.open('/common/php/bill_info.php3?sale_date='+(sale_date)+'&MSNO='+(ms_no)+'&pos_no='+(pos_no)+'&bill_no='+(bill_no), "bill", "width=310px,height=450px,scrollbars=1,resizable=1");
}
// -> ¿µ¼öÁõ Á¶È¸(2008.02.01ÀÌÀü ¿øº»)
//function Bill_Info(sale_date, ms_no, pos_no, bill_no)
//{//alert(sale_date+'/'+ms_no+'/'+pos_no+'/'+bill_no);return;
// //bill_win = showModalDialog('/common/php/bill_info.php3?sale_date='+(sale_date)+'&MSNO='+(ms_no)+'&pos_no='+(pos_no)+'&bill_no='+(bill_no), "bill", "dialogWidth: 320px; dialogHeight: 450px;status:no;showMaximizeButton:1;");
// bill_win = window.open('/common/php/bill_info.php3?sale_date='+(sale_date)+'&MSNO='+(ms_no)+'&pos_no='+(pos_no)+'&bill_no='+(bill_no), "bill", "width=310px,height=450px,scrollbars=1,resizable=1");
//}
function Bill_Info_E(sale_date, ms_no, pos_no, bill_no)
{
bill_win = window.open('/common/php/bill_info_e.php3?sale_date='+(sale_date)+'&MSNO='+(ms_no)+'&pos_no='+(pos_no)+'&bill_no='+(bill_no), "bill", "width=310px,height=450px,scrollbars=1,resizable=1");
}
/* ¹Ì»ç¿ë : Æ÷Ä¿½ºÀ̵¿ (YSN - 20020906)*/
function mvFocus(NObj) {
if(event.keyCode != 13) return;
document.forms[0].elements[NObj].focus();
}
// ±×·ì¿þ¾î¿¡¼ »ç¿ëÇϱâ À§ÇÑ ½ºÅ©¸³Æ® Ãß°¡ºÎºÐ -> YSN
// ÀԷ¶õ¿¡ Äĸ¶Ã³¸®Çϱâ....
function fzCommaSetting(oObj) {
rmValue = rmcomma(oObj.value);
adValue = addcomma(rmValue);
oObj.value = adValue;
}
//TRº°·Î ¸¶¿ì½º OVER ¹× OUT¿¡ °üÇÑ »ö±ò ÁÖ±â...
function MBColor(obj,bgName) {
if(gTFColor == '0') obj.style.backgroundColor = bgName;
else {
if(obj.style.backgroundColor == '#d6ebff') return;
else obj.style.backgroundColor = bgName;
}
return;
}
function TColor(rtnCnt) {
gTFColor = '1';
CObj = document.getElementsByName("tcolor");
if(gTFColor_bg != '' || gTFColor_bg == '0') CObj[gTFColor_bg].style.backgroundColor = '';
CObj[rtnCnt].style.backgroundColor = '#d6ebff';
gTFColor_bg = rtnCnt;
}
// Æ÷Ä¿½ºÀ̵¿
function mvNextFocus(nObj) {
obj = document.forms[0];
if(event.keyCode != 13) return;
if(obj.elements[nObj].disabled) return;
obj.elements[nObj].focus();
}
// ¼ýÀÚ¿Í Æ¯Á¤ÇÑ ¹®ÀÚ¸¦ ¹Þ±â À§Çؼ ó¸®
function fh_check_digit(vKeyCode)
{
if(typeof(vKeyCode) == 'undefined') vKeyCode = 45;
if ((event.keyCode<48)||(event.keyCode>57))
{
if(event.keyCode != vKeyCode)
event.returnValue=false;
}
}
// ¼ýÀÚ¸¸ ÀԷ°¡´ÉÇϵµ·Ï ÇÏ´Â ÇÔ¼ö...
function check_digit()
{
if ((event.keyCode<48)||(event.keyCode>57))
event.returnValue=false;
}
//À©µµ¿ìâ È¸é °¡¿îµ¥·Î ¿À»Û....KMS
//arg_url=°æ·Î , arg_width=°¡·Î±æÀÌ , arg_height=¼¼·Î±æÀÌ , arg_name=À©µµ¿ì¸í
function win_open( arg_url , arg_width , arg_height , arg_name)
{
var winWidth = arg_width; // »õ⠳ʺñ
var winHeight = arg_height; // »õâ ³ôÀÌ
var winPosLeft = (screen.width - winWidth) / 2; // »õâ XÁÂÇ¥
var winPosTop = (screen.height - winHeight) / 2; // »õâ YÁÂÇ¥
s_property = "width=" + arg_width + ",height=" + arg_height;
s_property = s_property + ",left=" + winPosLeft + ",top=" + winPosTop;
if(arg_name == null) arg_name = 'default';
win_tmp = window.open(arg_url,arg_name,s_property);
win_tmp.focus();
}
function selectAll()
{
var coll=document.getElementsByName("chk");
row_tot=coll.length;
if(coll!=null) {
for(i=0;i tag Ãß°¡¹æ¹ý º¯°æ 20060203 CYBERPARK
var fstr_ActiveX = function (arg1, arg2)
{
this.nLen = arguments.length;
if (this.nLen < 1)
{
strTmp = arg1;
}
document.write(arg1);
}
//XmlHttpRequest
var state = 0;
function XMLHTTP(method, _url, async)
{
var xmlhttp = false;
try
{
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (E)
{
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined')
{
xmlhttp = new XMLHttpRequest();
}
xmlhttp.open(method, _url, async);
xmlhttp.onreadystatechange= function(){}
xmlhttp.send(null);
var _ctype = xmlhttp.getResponseHeader("Content-type");
return xmlhttp.responseTEXT;
}
//-- À̹ÌÁö ¸®»çÀÌ¡ ¹× »õâ ¶ç¿ì±â
//»ç¿ë¹æ¹ýÀº imageű׿¡ onLoadÀ̺¥Æ®¸¦ »ç¿ë.
//ex)
function imgResizeWin(img, ww, hh, aL)
{
var tt = imgRsize(img, ww, hh);
tt[2] += 16;
if(img.width > ww || img.height > hh)
{ // °¡·Î³ª ¼¼·ÎÅ©±â°¡ Á¦ÇÑÅ©±âº¸´Ù Å©¸é
img.width = tt[0]; // Å©±âÁ¶Á¤
img.height = tt[1];
img.alt = 'Ŭ¸¯ÇÏ½Ã¸é ¿øº»À̹ÌÁö¸¦ º¸½Ç ¼ö ÀÖ½À´Ï´Ù.';
if(aL)
{ // ÀÚµ¿¸µÅ© on
img.onclick = function()
{
wT = Math.ceil((screen.width - tt[2])/2.6); // Ŭ¶óÀÌ¾ðÆ® Áß¾Ó¿¡ À̹ÌÁöÀ§Ä¡.
wL = Math.ceil((screen.height - tt[3])/2.6);
//mm = window.open("", 'viewOrig', 'width='+tt[2]+',height='+tt[3]+',top='+wT+',left='+wL+',scrollbars=yes' );
mm = window.open("", 'viewOrig', "width=650,height=650,top=20,left=50, scrollbars=yes" );
var doc = mm.document;
//doc.body.style.margin = 0; // ¸¶ÁøÁ¦°Å
//doc.body.style.cursor = "hand";
var previewimg = doc.createElement("img");
previewimg.src = img.src;
doc.body.appendChild(previewimg);
previewimg.onmousedown = function(){ mm.close();}
doc.title = 'NUX';
}
img.style.cursor = "hand";
}
}
else { img.onclick = function(){ alert("ÇöÀç À̹ÌÁö°¡ ¿øº» À̹ÌÁöÀÔ´Ï´Ù."); } }
}
//-- À̹ÌÁö ¸®»çÀÌ¡ - imgResizeWin() ÇÔ¼ö¿¡¼ È£ÃâÇÏ´Â ÇÔ¼ö
function imgRsize(img, rW, rH)
{
var iW = img.width;
var iH = img.height;
var g = new Array;
if(iW < rW && iH < rH)
{ // °¡·Î¼¼·Î°¡ Ãà¼ÒÇÒ °ªº¸´Ù ÀÛÀ» °æ¿ì
g[0] = iW;
g[1] = iH;
}
else
{
if (img.width > img.height) // ¿øÅ©±â °¡·Î°¡ ¼¼·Îº¸´Ù Å©¸é
{
g[0] = rW;
g[1] = Math.ceil(img.height * rW / img.width);
}
else if(img.width < img.height) //¿øÅ©±âÀÇ ¼¼·Î°¡ °¡·Îº¸´Ù Å©¸é
{
g[0] = Math.ceil(img.width * rH / img.height);
g[1] = rH;
}
else
{
g[0] = rW;
g[1] = rH;
}
if(g[0] > rW) // ±¸ÇØÁø °¡·Î°ªÀÌ Ãà¼Ò °¡·Îº¸´Ù Å©¸é
{
g[0] = rW;
g[1] = Math.ceil(img.height * rW / img.width);
}
if(g[1] > rH) // ±¸ÇØÁø ¼¼·Î°ªÀÌ Ãà¼Ò ¼¼·Î°ª°¡·Îº¸´Ù Å©¸é
{
g[0] = Math.ceil(img.width * rH / img.height);
g[1] = rH;
}
}
g[2] = img.width; // ¿ø»çÀÌÁî °¡·Î
g[3] = img.height; // ¿ø»çÀÌÁî ¼¼·Î
return g;
}