function Win( sURL, sName, scrollbars, left, top) { 
	var win 
//	win = window.open(sURL, sName, "status=no,toolbar=no,resizable=no,scrollbars="+scrollbars+",menubar=no, width=1, height=1, left="+left+", top="+top); 
	win = window.open(sURL, sName, "status=no,toolbar=no,resizable=no,scrollbars=yes,menubar=no, width=1, height=1, left="+left+", top="+top); 
}

function WinOpen( sURL, sName, scrollbars, left, top,width,height) { 
	var win 
	win = window.open(sURL, sName, 'status=no,toolbar=no,resizable=no,scrollbars='+scrollbars+',menubar=no, width='+width+', height='+height+', left='+left+', top='+top); 
}

function popup(Fn,Win, X, Y, Scroll){
l = (screen.width) ?	(screen.width- X) / 2	: 0;
t = (screen.height) ?	(screen.height- Y) / 2 : 0;	
	NewWindow=window.open(Fn,Win,'width='+X+',height='+Y+',top='+t+',left='+l+',scrollbars='+Scroll+',toolbar=no,location=no,directories=no,status=no,resizable=no,menubar=no');
}

function flash(swf,width,height) {
	var flash_tag = "";
	flash_tag = '<OBJECT id="mainFlash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
	flash_tag +='codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ';
	flash_tag +='WIDTH="'+width+'" HEIGHT="'+height+'" >';
	flash_tag +='<param name="movie" value="'+swf+'">';
	flash_tag +='<param name="wmode" value="transparent">';
	flash_tag +='<param name="quality" value="high">';
	flash_tag +='<PARAM NAME="menu" VALUE="false">';
	flash_tag +='<embed id="mainFlash" name="mainFlash" src="'+swf+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" ';
	flash_tag +='type="application/x-shockwave-flash"  WIDTH="'+width+'" HEIGHT="'+height+'"></embed></object>'

	document.write(flash_tag);
}


function resizeHeight(){

	h = document.body.scrollHeight;
	w = document.body.scrollWidth;
	resizeTo(w, h);

}

//document.domain = "keb.co.kr";

function branch_pop(br){
	alert(br);
	var sUrl = 'http://keb.chzero.com:8000/pop_listdetail.jsp?strname='+br;
	var sEnv = 'toolbar=no, scrollbars=yes, directories=no, resizable=0, menubar=no, width=672, height=600,left=0,top=0';
	remote = window.open('', 'branch', sEnv);
	remote.focus();
	remote.location.href = sUrl;
}


//function flashGoUrl(a){
//	var popUrl = "";
//	if(a == "quick_01_01") popUrl = "http://ebank.keb.co.kr/IBS/b2c/cibs/cietc/csra001r.jsp";
//	else if(a == "quick_01_02") popUrl = "http://ebank.keb.co.kr/IBS/b2c/cibs/cietc/csra006r.jsp";
//	else if(a == "quick_01_03") popUrl = "http://ebank.keb.co.kr/IBS/b2c/cibs/cietc/csra008r.jsp";

//	window.open(popUrl,"RATEPOP","width=500,height=400");

//}


function eMail(){
	document.location.href = "/IBS/ncustomer/kor/cd/ad_100.jsp?vcode=05000000000000&scode=05010300000000"
}


function Win_coupon(){ 
	var win;
	win = window.open("http://www.fxkeb.com/fxportal/html/CO/coupon/fx_inch_cou01.html","coupon", "width=510,height=600,status=no,toolbar=no,resizable=no,scrollbars=no,menubar=no, left=10, top=10"); 
}

function uhak(){
	document.location.href = "/IBS/ncustomer/kor/cd/ad_100.jsp?vcode=05000000000000&scode=05010300000000"
}
//http://uhak.fxkeb.com/abroad/index.jsp

function WinFx1(){ 
	var win;
	win = window.open("http://www.fxkeb.com/fxportal/jsp/nfxportal/RS/RS06030.jsp","WinFx1", "width=970,height=600,status=no,toolbar=no,resizable=no,scrollbars=yes,menubar=no, left=10, top=10"); 
}


// banking link
var thisLinkTarget = "keb";
var ebankHostName = "http://ebank.keb.co.kr";


function eLink_bank(arg) {
	while ( arg.indexOf("&") > 0 )
		arg = arg.replace("&","%26");
	    window.open(ebankHostName+"/IBS/eBank.jsp?returnURL="+arg,thisLinkTarget,"");
}



//// /style/common.js ///

function numFormat(obj) {
	var temp = "";
	var buff = "";
	var i = 0;
  	var n = String(obj.value);
	if (n.charAt(0) == '-') {
		temp = '-' ;
		n = n.substring(1,n.length);
	}
	if (n.indexOf('-',0) != -1) {
		obj.focus();
		return;
	}
	var len = n.length;
	if ((pos=n.indexOf('.',0)) != -1) {
		buff = n.substring(pos,len);
		n = n.substring(0,pos);
	}
	while (n.charAt(i) == '0') i++;
	n = n.substring(i,len);
	len = n.length;
	if(len < 3) {
		obj.value = n;
		return;
	}
	else {
		var pos = len % 3;
		if (pos > 0) {
			temp = temp + n.substring(0,pos) + ',';
			len = len - pos;
		}
		while (len > 3) {
			temp = temp + n.substring(pos,pos+3) + ',';
			len = len - 3;
			pos = pos + 3;
		}
		temp = temp + n.substring(pos,pos+3) + buff;
		obj.value = temp;
	}
}
function numUnformat(obj) {
	var temp = "";
	var n = String(obj.value);
	var len = n.length;
	var pos = 0;
  	var ch = '';
	while (pos < len) {
		ch = n.charAt(pos);
		if (((ch >= '0') && (ch <= '9')) || (ch == '-') || (ch == '.')) temp = temp + ch;
			pos = pos + 1;
	}
	obj.value = temp;
}

function keyCheck(e) {
	if(n4) var keyValue = e.which;
	else if(e4) var keyValue = event.keyCode;
	if ( ((keyValue >= 48) && (keyValue <= 57)) || keyValue == 8 || keyValue == 13)	
		return true; 
	else return false;
}
function unformat(obj) {
	var temp = "";
	var n = String(obj.value);
	var len = n.length;
	var pos = 0;
  	var ch = '';
	while (pos < len) {
		ch = n.charAt(pos);
		if ((ch >= '0') && (ch <= '9')) temp = temp + ch;
		pos = pos + 1;
	}
	obj.value = temp;
}
function isNumeric(data) {
	var s = '01234567890';
	var re_data = String(data);
	
	for ( var i = 0 ; i < re_data.length ; i++ ) {
		if ( s.indexOf( re_data.substring( i, i+1 ) ) == -1 )
			return true;
	}
	return false;
}
function checkEmpty(obj, msg, emptyOk)
{
	res = true;
	if(isEmptyObj(obj))
	{
		if(!emptyOk)
		{
			alert(msg);
			obj.focus();
		}
		res = emptyOk;
	}
	return res;		
}
function isEmptyObj(para)
{
  for(var i=0; i<isEmptyObj.arguments.length; i++)
  {
    if( typeof(isEmptyObj.arguments[i]) == "object" && 
   		isEmptyObj.arguments[i].value.length > 0)
      return false;
  }
  return true;
}
function checkLength(obj, len, msg)
{
	if( obj.value.length != len )
	{
		alert(msg);
		obj.focus();
		return false;
	}
	return true;	
}
function checkLengthM(obj, len, msg)
{
	if( obj.value.length <len )
	{
		alert(msg);
		obj.focus();
		return false;
	}
	return true;	
}
function check_number(str){
	var str_len = str.length;
	var i;		
	var num = '1234567890';
	
	for (i=0; i < str_len; i++)
	{
	   if(num.indexOf(str.substring(i,i+1)) < 0)
	   {
	       return false;
	   }
	}
	return true;
}  

function f_print(){
	self.focus();
	self.print();
}


function keyCheckLength(objno,num){
	if(document.f.elements[objno].value.length == num ) {
		
		document.f.elements[objno+1].focus();
		
	}
}

function f_getMaxDay(year,month){
    if( month ==1 ) return 31;
    if( month ==2 ){       
        var year1=year;   
        var gubun = 28;
        if( (year1%4)==0 )gubun=29;
        if( (year1%100)==0)gubun=28;
        if( (year1%400)==0)gubun=29;        
        return gubun;       
    }
    if( month==3 ) return 31;
    if( month==4 ) return 30;
    if( month==5 ) return 31;
    if( month==6 ) return 30;
    if( month==7 ) return 31;
    if( month==8 ) return 31;
    if( month==9 ) return 30;
    if( month==10 ) return 31;
    if( month==11 ) return 30;
    if( month==12 ) return 31;
}
function f_setdate(year, month, day){
	y 		= year[year.selectedIndex].value;
	m 		= month[month.selectedIndex].value;
	maxday 	= f_getMaxDay(y,m);
	d 		= day[day.selectedIndex].text;
	day.length = maxday;
	for ( i = 1  ; i <= maxday ; i++ ) {
		if ( i < 10 ) {
			day[i-1].value = "0"+i;
			day[i-1].text = i;
		} else {
			day[i-1].value = i;
			day[i-1].text = i;
		}
	}
	if ( maxday < d ) {
		day[0].selected = true;
	} else {
		day[d-1].selected = true;
	}
}

// 20020424
/*-------------------------------------------------------------------------

 -------------------------------------------------------------------------*/
function isNull(obj) {
	if (obj.value == "") 
		return true;
	else	
		return false;
}

function isSpace(szString){
	var iYn;
	iSpaceYn	= 0;
	
	for (var i = 0; i<szString.length; i++){
		if (szString.charAt(i)==" ")	iSpaceYn = iSpaceYn + 0;
		else							iSpaceYn = iSpaceYn + 1;
	}
	
	if (iSpaceYn == 0) 	return 1;		//
	else				return 0;
}
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
function f_move_focus(Obj) { 	
  if(event.keyCode == 13) {    		
     Obj.focus();
     event.returnValue = false;
  }
 
}
function goFirstFocus(Obj, Obj2) {
        var field = Obj;
        var formType;
        if(Obj2) {
                Obj2.focus();
                return;
        }
        for (i = 0; i < field.length; i++) {
                formType = field.elements[i].type;
                if ((formType == "text") || (formType == "TEXT") || (formType == "Text") || (formType == "password")) {
                        Obj.elements[i].focus();
                        break;
                 }
        }
}
/*-------------------------------------------------------------------------

-------------------------------------------------------------------------*/
 function removeKor(obj) {
	var str = String(obj.value);
	var len = str.length;
	var sit = 0;
	var tmp = "";
  	var ch  = '';
  	
	i = 0;
	while (sit < len) {
		ch = str.charAt(sit);
		if( (ch == ' ') || (ch >= '0' && ch <= '9') || (ch == '-') || (ch == '.') || (ch == ',') || ((ch >= 'A') && (ch <= 'Z')) || ((ch >= 'a' && ch <= 'z'))) {
			tmp = tmp + ch;
		} else {
			if (i == 0) {
				i++;
			}
			obj.value = tmp;
		}
		sit++;
	}
}

/*-------------------------------------------------------------------------

-------------------------------------------------------------------------*/
function hasOnlyNumber()
{
	if (event.keyCode != 13) {
		if((event.keyCode<48) || (event.keyCode>57)) {
		alert("");
		event.returnValue = false;
		}
	}
}

/*-------------------------------------------------------------------------

-------------------------------------------------------------------------*/
function hasonlyNumberDot()
{
	
	if (event.keyCode != 13) {
		if((event.keyCode<46) || (event.keyCode>57)) {
		alert("");
		event.returnValue = false;
		}
	}
}

/*-------------------------------------------------------------------------

 -------------------------------------------------------------------------*/
function setFocusToFirstTextField(form) {
  if ( typeof(form) == 'undefined' ){ 
  	//alert("undefined");
  	return; } // if form is invalid, just return.

  var count = form.elements.length;
        //alert(count);
        //alert(form.elements[0].type);
        //alert(form.elements[1].type+"1");
        //alert(form.elements[2].type+"2");
      
  for ( var i = 0; i < count; i++ ) {
    if ( form.elements[i].type == "text" || form.elements[i].type == "password" || form.elements[i].type == "select-one" || form.elements[i].type == "select-multiple") {
    	//alert("if_focus");
      form.elements[i].focus();
      return;
    }
  }  
}

/*-------------------------------------------------------------------------

 -------------------------------------------------------------------------*/
function compareDate(strParam1, strParam2) {
	var dateParam1, dateParam2;
	
	if(strParam1.length == 10) strParam1 = 	strParam1.substring(0,4) + strParam1.substring(5,7) + strParam1.substring(8,10);
	if(strParam2.length == 10) strParam2 = 	strParam2.substring(0,4) + strParam2.substring(5,7) + strParam2.substring(8,10);
	
	dateParam1 = new Date(strParam1.substring(0,4), strParam1.substring(4,6), strParam1.substring(6,8), 0, 0, 0, 0);
	dateParam2 = new Date(strParam2.substring(0,4), strParam2.substring(4,6), strParam2.substring(6,8), 0, 0, 0, 0);
	
	return dateParam1 - dateParam2;
}

/*-------------------------------------------------------------------------

 -------------------------------------------------------------------------*/
function compareToday(strParam) {
	dateCurrent = new Date();
	
	strCurrent = "" + dateCurrent.getFullYear() 
	
	// date.getMonth()는 0~11 로 반환됨.. 그래서..
	if(dateCurrent.getMonth() < 9) strCurrent += "0" + (dateCurrent.getMonth() + 1);
	else strCurrent += dateCurrent.getMonth() + 1;
	
	if(dateCurrent.getDate() < 10) strCurrent += "0" + dateCurrent.getDate();
	else strCurrent += dateCurrent.getDate();	
	
	return compareDate(strParam, strCurrent);
}		
/*------------------------------------------------------------------------- 

 -------------------------------------------------------------------------*/
function comparePWD(Pwd,Pwdd) {
	var Pwd1 = Pwd.value;
	var Pwdd1 = Pwdd.value;
	
	if ( Pwd1 != Pwdd1 ) {
        alert("");
        Pwdd.select();
        return false;
    }else 
    return true;
}
/*-------------------------------------------------------------------------

 -------------------------------------------------------------------------*/
function isValidDate(strParam) {
	
	if(strParam == null || strParam.length != 8) return false;
	//alert(strParam);
	nYear  = parseInt(strParam.substring(0,4));
	
	// XXX parseInt 
	nMonth = (parseInt(strParam.substring(4,5)) * 10) + parseInt(strParam.substring(5,6))
	nDate  = (parseInt(strParam.substring(6,7)) * 10) + parseInt(strParam.substring(7,8))	
	
	if(isNaN(nYear) || isNaN(nMonth) || isNaN(nDate)) return false;
	
	if (nYear < 1901 || nYear > 2100) return false;
	if (nMonth < 1 || nMonth > 12)  return false;
	if (nDate < 1 || nDate > 31) return false;	
	
	// 
	if(nMonth == 2) {
		if(nYear % 4 == 0) {
			if(nDate < 1 || nDate > 29) return false;			
		} else {
			if(nDate < 1 || nDate > 28) return false;
		}
	}
	
	if(nMonth < 8) {
		if(nMonth % 2 == 0) 
			if(nDate < 1 || nDate > 30) return false;		
		else 
			if(nDate < 1 || nDate > 31) return false;
	} else {
		if(nMonth % 2 == 0) 
			if(nDate < 1 || nDate > 31) return false;		
		else 
			if(nDate < 1 || nDate > 30) return false;	
	}
	
	return true;
}	

/*-------------------------------------------------------------------------

-------------------------------------------------------------------------*/
function IsValidEmail(obj) {
	num = 0;
	num_1 = 0;
	var email = obj.value;
	for (i=0;i<email.length;i++){
		if (email.charAt(i) == '@') num++;
		if (email.charAt(i) == '.') num_1++;
	}
	if (num != 1 || num_1 == 0) {
		alert("");
		obj.focus();
		obj.select();
		return false;
	}
}

/*-------------------------------------------------------------------------

 -------------------------------------------------------------------------*/
function isValidJuminNo(strParam) {
	var nYear, nMonth, nDate;
	var nSum, nMod;
	nMod = nSum = nYear = nMonth = nDate = 0;
	
	if(strParam.length != 13) return false;			
	for(i=0; i<12; i++) {
		if(i == 0) nYear += parseInt(strParam.charAt(i)) * 10;
		if(i == 1) nYear += parseInt(strParam.charAt(i));
		if(i == 2) nMonth += parseInt(strParam.charAt(i)) * 10;
		if(i == 3) nMonth += parseInt(strParam.charAt(i));
		if(i == 4) nDate += parseInt(strParam.charAt(i)) * 10;
		if(i == 5) nDate += parseInt(strParam.charAt(i));
		if(i < 6) nSum += parseInt(strParam.charAt(i)) * (i+2);
		if(i > 5 && i < 8) nSum += parseInt(strParam.charAt(i)) * (i+2);
		if(i > 7) nSum += parseInt(strParam.charAt(i)) * (i-6);		
	}
	
	nMod = 11 - (nSum % 11);	
	if((11 - (nSum % 11)) >= 10) nMod -= 10;

	if(nMod != parseInt(strParam.charAt(12))) return false;
	if(nMonth < 1 || nMonth > 12 || nDate < 1 || nDate > 31) return false;
	if((nMonth == 4 || nMonth == 6 || nMonth == 9 || nMonth == 11) && nDate > 30) return false;
	if(nMonth == 2 && nDate > 29) return false;
	
	return true;
}
/*-------------------------------------------------------------------------

-------------------------------------------------------------------------*/
function MakeBlur(theObj) {
    theObj.blur();
}
/*-------------------------------------------------------------------------

 -------------------------------------------------------------------------*/
function openWindow(url, name, width, height)   {
    
    url = IBS_Chck(url);

//	alert("url==>"+url);
    
    var top     =       screen.height / 2 - height / 2 - 50;
    var left    =       screen.width / 2 - width / 2 ;
    var win = open(url, name, 'width='+width+',height='+height+',top='+top+',left='+left+',scrollbars=yes,resizable=yes,status=no,toolbar=no,menubar=no');
    //win.focus();
    return win;
}

function openWindowNo(url, name, width,height)   {
    
    url = IBS_Chck(url);
    
    var top     =       screen.height / 2 - height / 2 - 50;
    var left    =       screen.width / 2 - width / 2 ;
    var win = open(url, name, 'width='+width+',height='+height+',top='+top+',left='+left+',scrollbars=no,resizable=yes,status=no,toolbar=no,menubar=no');
    win.focus();
   // return win;
}

function openWindow_pop(url, name, width, height,top,left, scroll, resize, status, toolbar, mbar)   {
	
	url = IBS_Chck(url);
	
    var top     =       screen.height / 2 - height / 2 - 50;
    var left    =       screen.width / 2 - width / 2 ;
    var win = open(url, name, 'width='+width+',height='+height+',top='+top+',left='+left+',scrollbars='+scroll+',resizable='+resize+',status='+status+',toolbar='+toolbar+',menubar='+mbar+'');
    //win.focus();
   // return win;
}

function openWindow_chg(body, top, button){
        if(top=="b2c"){
			top = "/IBS/include/b2c_main_top.jsp?site="+button;
		}else if(top=="b2b"){
			top = "/IBS/include/b2b_main_top.jsp?site="+button;
		}else if(top=="info"){
			top = "/IBS/include/info_main_top.jsp?site="+button;
		}else if(top=="cust"){
			top = "/IBS/include/cc_main_top.jsp?site="+button;
		}else if(top=="inside"){
			top = "/IBS/include/inside_main_top.jsp?site="+button;
		}

		GoPage(top,body);


}
function openWindow01(url, name, width, height)   {	
	
	url = IBS_Chck(url);
	
    var top     =       screen.height / 2 - height / 2 - 50;
    var left    =       screen.width / 2 - width / 2 ;
	var a		=		width - 12;
	var b		=		height - 31;
    var win = open(url, name, 'width='+a+',height='+b+',top='+top+',left='+left+',resizable=yes,status=no,toolbar=no,menubar=no,scrollbars=no');
    //win.focus();
    return win;
}

/*-------------------------------------------------------------------------

-------------------------------------------------------------------------*/
function ClearVal(form) 
{
	var count = form.elements.length;
	//alert(count);
	for ( var i = 0; i < count; i++ ) {
    	if ( form.elements[i].type == "text" || form.elements[i].type == "password") {    		
      		form.elements[i].value = "";      
    	}
  	}
  	return;
}

function fLink(arg){
	window.location = IBS_Chck(arg);
}

document.write("<form name='TP' method='post'></form>");

function fTarget(arg1,arg2){

	var MF = methodFind(arg1);
	document.TP.action = IBS_Chck(arg1);
	document.TP.target = arg2;
	//alert(IBS_Chck(arg1));
	//alert(MF);
	document.TP.method = MF;
	document.TP.submit();

}

function fTarget1(arg1,arg2){

	//var MF = methodFind(arg1);
	document.TP.action = arg1;
	document.TP.target = arg2;
	//alert(arg1);
	//alert(arg2);
	//document.TP.method = MF;
	document.TP.submit();

}

/***********************************

 ***********************************/
function fReloadPage(stReturn, stTarget) {
	frm = document.fLoginReturnForm;
	frm.action = IBS_Chck(stReturn);
	frm.submit();
}

/***********************************
 * Send Mail PopUp Window
 * 2002/05/16
 ***********************************/
function fSendMail(sJobCode, sToEmail, sToName) {
	frm = document.fSendMailForm;
	sOption = "width=480,height=445,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1";
	popWindow = window.open("",'SendMailOpen', sOption);
	frm.target = "SendMailOpen";
	frm.sJobCode.value = sJobCode;
	frm.sToEmail.value = sToEmail;
	frm.sToName.value = sToName;
	frm.submit();   
}

<!-- -->
document.write("<Form Name=\"fSendMailForm\" Method=\"Post\" Action=\"/IBS/common/mail.jsp\">");
document.write("  <input type=\"hidden\" name=\"sJobCode\" value=\"\">");
document.write("  <input type=\"hidden\" name=\"sToEmail\" value=\"\">");
document.write("  <input type=\"hidden\" name=\"sToName\" value=\"\">");
document.write("</Form>");

<!--  -->
document.write("<Form Name=\"fLoginReturnForm\" Method=\"Post\" Action=\"\">");
document.write("</Form>");

function methodFind(Arg){
	var methodtype;
	if(Arg.indexOf("http://")!=-1){
		methodtype = "post"; 
	}else{
		if(Arg.indexOf(".html") != -1) {
			methodtype = "get"; 
		}else if( Arg.indexOf(".jsp")!=-1 || Arg.indexOf(".")!=-1){
			methodtype = "post"; 
		}else {
			methodtype = "post"; 
		}
	}
return methodtype;
} 
/**********************************]

 **********************************/
function tabPass(Arg1,Arg2){
	if (Arg1!='') parent.frames[0].location = IBS_Chck(Arg1);
	window.location = IBS_Chck(Arg2);
}

function fuOpen(arg1,arg2){	
	document.tappass.target = 'top';
	document.tappass.action = IBS_Chck(arg1);
	document.tappass.submit();

	var MF	= methodFind(arg2);
	document.tappass.target = 'body';
	document.tappass.method = MF
	document.tappass.action = IBS_Chck(arg2);
	document.tappass.submit();

	self.close();

}

function fuLink(arg1,arg2){	
	
	document.tappass.target = 'top';
	document.tappass.action = IBS_Chck(arg1);
	document.tappass.submit();
	
	document.tappass.target = 'body';
	document.tappass.action = IBS_Chck(arg2);
	document.tappass.submit();

}

function Login_Need(){
	alert("Please log in first to get services.");
}

//document.write("<form name='tappass' method='get'><input type=hidden name=site></form>");
document.write("<form name='tappass' method='post'></form>");


/***********************************

 ***********************************/
function byteLen(arg,arg2){
	
	var len = 0; 
	var fbyte = arg.value;
	
	if ( fbyte == null ) return 0; 
	for(var i=0;i<fbyte.length;i++){ 
		var c = escape(fbyte.charAt(i)); 
		if ( c.length == 1 ) len ++; 
		else if ( c.indexOf("%u") != -1 ) len += 2; 
	} 
	
	if(arg2 < len){
		alert("");
		arg.focus();
		return false;
	}else{
		return true;
	}
	
}
function setPage() {
	if(parent.bank != null) {
		parent.document.all.bank.style.height = (document.body.scrollHeight <= 600) ? 650 : document.body.scrollHeight + 50;
		parent.scrollTo(0,0);
	} 
}


function setCacu() { //
	if(parent!=self) { 
		parent.document.all.csca_iframe.style.height = document.body.scrollHeight;
		parent.scrollTo(0,0);
	} 
}

/**
 * Help popup
 */
function fHelpPopUp(sName, iWidth, iHeight) {
	sUrl = "/b2c/cibs/ciguide/" + sName + ".html";

	if(iWidth == null || iHeight == null) {
		iWidth = 617;
		iHeight = 527;
	}
	iTop	=	screen.height / 2 - iHeight / 2 - 50;
   	iLeft	=	screen.width / 2 - iWidth / 2 ;
	sOption = "width="+iWidth+",height="+iHeight+",top="+iTop+",left="+iLeft+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1";
	window.open(sUrl, sName, sOption);
}

function fLongin(arg){
	//alert(LoginYN);
	if( LoginYN == 'null'){
		alert("nPlease log in first to get services.");
		document.all.Login.style.height=103;
		fFlag = 1;
		return;
	}else{
		window.location = arg;
	}	
}	

function tabLogin(arg,arg1){
	//alert(LoginYN);
	if( LoginYN == 'null'){
		alert("nPlease log in first to get services.");
		document.all.Login.style.height=103;
		fFlag = 1;
		return;
	}else{
		tabPass(arg,arg1);
	}	
}	

function fuLogin(arg,arg1){
	//alert(LoginYN);
	if( LoginYN == 'null'){
		alert("nPlease log in first to get services.");
		document.all.Login.style.height=103;
		fFlag = 1;
		return;
	}else{
		fuOpen(arg,arg1);
	}	
}	

function fuLogin1(arg,arg1){
	//alert(LoginYN);
	if(LoginYN == 'null'){
		alert("");
		//document.all.Login.style.height=103;
		//fFlag = 1;
		var arg = "/IBS/intro/ebank_index.jsp?seq=2";//return false;
	    var arg1 = "keb";
		fTarget1(arg,arg1);
		//fuOpen(arg,arg1);
        self.close(); 
	}else{
		var arg = "/IBS/intro/ebank_index.jsp?seq=3";//return false;
	    var arg1 = "keb";
		fTarget1(arg,arg1);
		// fTarget(arg,arg1);
		//fuOpen(arg,arg1);
        self.close();  
	}	
}	

function fuLogin2(arg,arg1){
	//alert(LoginYN);
	if(LoginYN == 'null'){
		alert("");
		//document.all.Login.style.height=103;
		//fFlag = 1;
		var arg = "/IBS/intro/ebank_index.jsp?seq=2";//return false;
	    var arg1 = "keb";
		fTarget1(arg,arg1);
		//fuOpen(arg,arg1);
        self.close(); 
	}else{
		var arg = "/IBS/intro/ebank_index.jsp?seq=4";//return false;
	    var arg1 = "keb";
		fTarget1(arg,arg1);
		// fTarget(arg,arg1);
		//fuOpen(arg,arg1);
        self.close();  
	}	
}

function popWindow(url, name, width, height, scrollYN)   {
	
    //var top     =       screen.height / 2 - height / 2 - 50;
    //var left    =       screen.width / 2 - width / 2 ;
    
    url = IBS_Chck(url);
    
    var top     =       0;
    var left    =       0 ;
    var win = open(url, name, 'width='+width+',height='+height+',top='+top+',left='+left+',scrollbars='+scrollYN+',resizable=yes,status=no,toolbar=no,menubar=no');

    return win;
}

/****************************
 * 2002.09.16
 */
function IBS_Chck(Arg){


	if(Arg=="") return;
    //alert(Arg);  
	var ReturnURL = "";

 	if( Arg.indexOf("http://")!=-1 || Arg.indexOf(".html")!=-1 || Arg.indexOf(".gif")!=-1 || Arg.indexOf(".jpg")!=-1 || Arg.indexOf(".pdf")!=-1 || Arg.indexOf("/IBS")!=-1 || Arg.indexOf(".htm")!=-1){
	    //alert(Arg);  
    	ReturnURL = Arg;
	    //alert(ReturnURL);  
    }else{
        //alert(Arg);  
    	ReturnURL = "/IBS"+Arg;
	    //alert(ReturnURL);  
	}
	//alert(ReturnURL);
	return ReturnURL;
	
}

document.write("<form name='f5' method='post' action='/IBS/menu'>");        
document.write("<input type='hidden' name=menuCode>");	
document.write("<input type='hidden' name='cmd' value='searchLink'>");
document.write("</form>");

function depth(Arg){
	document.f5.menuCode.value = Arg;
	document.f5.submit();
}

document.write("<form name='LF' method='post'>");
document.write("<input type='hidden' name='top'>");
document.write("<input type='hidden' name='body'>");
document.write("</form>");

function forward_link(arg1,arg2){

	document.LF.top.value = arg1;
	document.LF.body.value = arg2;

	document.LF.action = "/IBS/etc/index_link.jsp";
	document.LF.submit();
}

////  /style/common.js   20070408////



///자산관리 관련된 함수 추가///
function PfmsLoginCheck(PFMS_URL) {
 //사용신청 약관동의 페이지로 이동
   document.location.href="/IBS/npebank/pms/index.jsp?vcode=10000000000000&scode=10050000000000";
}
