
//  ¸µÅ©¸¦ °É±âÀ§ÇÑ ÇÔ¼ö
function goUrl(name, win) {
	if (name == null) {
			alert("¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù.");
			return;
	} else {
		if (win == null) {
			if(name.indexOf("(") != -1)     eval(name);
			else
				document.location.href = eval(name);
		} else {
				window.open(eval(name), win);
		}
	}
}



//Popup
function WinOpen(src,win, X, Y, scroll){
l = (screen.width) ?    (screen.width- X) / 2   : 0;
t = (screen.height) ?   (screen.height- Y) / 2 : 0;
	NewWindow=window.open(src,win,'width='+X+',height='+Y+',top='+t+',left='+l+',scrollbars='+scroll+',toolbar=no,location=no,directories=no,status=no,resizable=no,menubar=no');
}

function WinOpenTL(src, win, w, h, scroll)
{
	var src= src;
	var posi = "width="+ w +",height="+h+",toolbar=no,location=no,status=no,menubar=no,top=10,left=50,scrollbars=" + scroll +",resizable=no" ;
	NewWindow = window.open(src,win,posi);
}

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 setURL(value){
 location.href=value;
}


function goMenu(thisURL,thisTarget) {
		if (thisURL == "" || thisURL == null) return;
		var nowTarget = "_self";
		if (thisTarget != null && thisTarget != "" ) nowTarget = thisTarget;
		window.open(thisURL, nowTarget, "");
	}

//flash
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+'?xmlPath=/2007/flash/">';
	flash_tag +='<param name="wmode" value="opaque">';
	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 flashinnerhtml(swf,width,height,obj) {
	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+'?xmlPath=/2007/flash/">';
	flash_tag +='<param name="wmode" value="opaque">';
	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.getElementById(obj).innerHTML = flash_tag;

}

function flashMap(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+'?xmlPath=/2007/flash/">';
	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 FlashObject(swf, width, height, bgcolor, flashvars)
{
	var strFlashTag = new String();

	if (navigator.appName.indexOf("Microsoft") != -1)
	{
		strFlashTag += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
		strFlashTag += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=version=8,0,0,0" ';
		strFlashTag += 'width="' + width + '" height="' + height + '">';
		strFlashTag += '<param name="movie" value="' + swf + '"/>';

		if(flashvars != null)
			{strFlashTag += '<param name="flashvars" value="' + flashvars + '"/>'};

		strFlashTag += '<param name="quality" value="best"/>';
		strFlashTag += '<param name="bgcolor" value="' + bgcolor + '"/>';
		strFlashTag += '<param name="menu" value="false"/>';
		strFlashTag += '<param name="salign" value="LT"/>';
		//strFlashTag += '<param name="salign" value="T"/>';
		strFlashTag += '<param name="scale" value="noscale"/>';
		strFlashTag += '<param name="wmode" value="transparent"/>';
		//strFlashTag += '<param name="allowScriptAccess" value="sameDomain"/>';
		strFlashTag += '<param name="allowScriptAccess" value="always"/>';
		strFlashTag += '</object>';
	}
	else
	{
		strFlashTag += '<embed src="' + swf + '" ';
		strFlashTag += 'quality="best" ';
		strFlashTag += 'bgcolor="' + bgcolor + '" ';
		strFlashTag += 'width="' + width + '" ';
		strFlashTag += 'height="' + height + '" ';
		strFlashTag += 'menu="false" ';
		strFlashTag += 'scale="noscale" ';
		strFlashTag += 'salign="LT" ';
		//strFlashTag += 'wmode="transparent" ';
		//strFlashTag += 'allowScriptAccess="sameDomain" ';
		strFlashTag += 'allowScriptAccess="always" ';
		//if(flashvars != null) {strFlashTag += 'flashvars="' + flashvars + '" '};
		strFlashTag += 'type="application/x-shockwave-flash" ';
		strFlashTag += 'pluginspage="http://www.macromedia.com/go/getflashplayer">';
		strFlashTag += '</embed>';
	}

	document.write(strFlashTag);
}

//¸¶¿ì½º¿À¹ö

function menuOver() {
	this.src = this.src.replace(".gif", "_on.gif");
}
function menuOut() {
	this.src = this.src.replace("_on.gif", ".gif");
}


	//ÅÇ ·¹ÀÌ¾î

function initTabMu(menuElId) {
	var tabMenu = document.getElementById(menuElId).getElementsByTagName("a");
	for(i=0; i<tabMenu.length; i++) {
		thismenu = tabMenu.item(i);
		thismenu.menuContainer = document.getElementById(menuElId);
		thismenu.targetEl = document.getElementById(tabMenu.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.getElementsByTagName("img").item(0).onmouseover = menuOver;
		thismenu.getElementsByTagName("img").item(0).onmouseout = menuOut;
		thismenu.onclick = tabMenuClick;
	}

	initmenu = tabMenu.item(0);
	initmenu.targetEl.style.display = "block";
	initmenu.getElementsByTagName("img").item(0).onmouseover();
	initmenu.getElementsByTagName("img").item(0).onmouseover = null;
	initmenu.getElementsByTagName("img").item(0).onmouseout = null;
	initmenu.menuContainer.current = initmenu;
}
function tabMenuClick() {
	currentmenu = this.menuContainer.current;
	if (currentmenu != this) {
		currentmenu.targetEl.style.display = "none";
		currentmenu.getElementsByTagName("img").item(0).onmouseover = menuOver;
		currentmenu.getElementsByTagName("img").item(0).onmouseout = menuOut;
		currentmenu.getElementsByTagName("img").item(0).onmouseout();

		this.targetEl.style.display = "block";
		this.getElementsByTagName("img").item(0).onmouseover = null;
		this.getElementsByTagName("img").item(0).onmouseout = null;
		this.menuContainer.current = this;
	}
	return false;
}

/*Top Global Menu*/
//1Depth Menu rollOn
function ImgPreLoad(imgTitle, imageNum) {
		imageNum++;
		rollOn = new Array(imageNum);
		rollOff = new Array(imageNum);
		for (j = 1; j <= imageNum; j++) {
			if (j < 8) {
				tmp = "0";
			} else {
				tmp ="";
			}
			rollOn[j] = new Image();
			rollOn[j].src = imgTitle + tmp + j + "_on.gif";
			rollOff[j] = new Image();
			rollOff[j].src = imgTitle + tmp + j + "_off.gif";
		}
	}
	function imgOn(Num) {
	if (rollOn[Num] != null) {
				document["T"+Num].src = rollOn[Num].src;
		}
	}
	function imgOff(Num) {
		if (rollOn[Num] != null) {
			if (Num != Depth1) {
				document["T"+Num].src = rollOff[Num].src;
			}
	  else {
	  document["T"+Num].src = rollOn[Num].src;
	  }
	}
}
ImgPreLoad('/2007/img/top/tm',8);

//2Depth Menu rollOn
function sImgPreLoad(simgTitle, simageNum) {
		simageNum++;
		srollOn = new Array(simageNum);
		srollOff = new Array(simageNum);
		for (h = 1; h <= simageNum; h++) {
			if (h < 10) {
				tmp = "_0";
			} else {
				tmp ="_";
			}
			srollOn[h] = new Image();
			srollOn[h].src = simgTitle + tmp + h + "_on.gif";
			srollOff[h] = new Image();
			srollOff[h].src = simgTitle + tmp + h + "_off.gif";
		}
	}
	function simgOn(gNum) {
	if (srollOn[gNum] != null) {
				document["G"+gNum].src = srollOn[gNum].src;
		}
	}
	function simgOff(gNum) {
		if (srollOn[gNum] != null) {
			if (gNum != Depth2_tms) {
				document["G"+gNum].src = srollOff[gNum].src;
			}
	  else {
	  document["G"+gNum].src = srollOn[gNum].src;
	  }
	}
}
sImgPreLoad ('/2007/img/top/tms',43);

function PreImgLoad(Title, imgNum) {
		imgNum++;
		rollOver = new Array(imgNum);
		rollOut = new Array(imgNum);
		for (i = 1; i <= imgNum; i++) {
			if (i < 10) {
				tmp = "0";
			} else {
				tmp ="";
			}
			rollOver[i] = new Image();
			rollOver[i].src = Title + tmp + i + "_on.gif";
			rollOut[i] = new Image();
			rollOut[i].src = Title + tmp + i + "_off.gif";
		}
	}
	function imgOver(lNum) {
	if (rollOver[lNum] != null) {
				document["L"+lNum].src = rollOver[lNum].src;
		}
	}
	function imgOut(lNum) {
		if (rollOver[lNum] != null) {
			if (lNum != Depth2) {
				document["L"+lNum].src = rollOut[lNum].src;
			}
	  else {
	  document["L"+lNum].src = rollOver[lNum].src;
			 }
		}
	}
	//3Depth Menu rollOn
	function sPreImgLoad(simgTitle, simgNum) {
		simgNum++;
		srollOver = new Array(simgNum);
		srollOut = new Array(simgNum);
		for (k = 1; k <= simgNum; k++) {
			if (k < 15) {
				tmp = "_0";
			} else {
				tmp ="_";
			}
			srollOver[k] = new Image();
			srollOver[k].src = simgTitle + tmp + k + "_on.gif";
			srollOut[k] = new Image();
			srollOut[k].src = simgTitle + tmp + k + "_off.gif";
		}
	}

	function simgOver(sNum) {
		if (srollOver[sNum] != null) {
			document["S"+sNum].src = srollOver[sNum].src;
		}
	}
	function simgOut(sNum) {
		if (srollOver[sNum] != null) {
			if (sNum != Depth3) {
				document["S"+sNum].src = srollOut[sNum].src;
			}
	  else {
	  document["S"+sNum].src = srollOver[sNum].src;
			 }
			}
		}


// ¿ìÃø  ´•¸µÅ© ½ºÅ©·ÑµÇ´Â ÇÔ¼ö
var isDOM = (document.getElementById ? true : false);
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);

function getRef(id)
{
	if (isDOM) return document.getElementById(id);
	if (isIE4) return document.all[id];
	if (isNS4) return document.layers[id];
}

var isNS = navigator.appName == "Netscape";

function moveRightEdge()
{
	var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;
	if (isNS4)
	{
		yMenuFrom   = Top_Layer.top;
		yMenuTo     = windows.pageYOffset + 120;   // À§ÂÊ À§Ä¡
	}
	else if (isDOM)
	{
		yMenuFrom   = parseInt (Top_Layer.style.top, 10);
		yMenuTo     = (isNS ? window.pageYOffset : document.body.scrollTop) + 120; // À§ÂÊ À§Ä¡
	}

	timeoutNextCheck = 500;

	if (yMenuFrom != yMenuTo)
	{
		yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20);
		if (yMenuTo < yMenuFrom)
			yOffset = -yOffset;
		if (isNS4)
			Top_Layer.top += yOffset;
		else if (isDOM)
			Top_Layer.style.top = parseInt (Top_Layer.style.top, 10) + yOffset;
			timeoutNextCheck = 10;
	}
	setTimeout ("moveRightEdge()", timeoutNextCheck);
}


//ÆùÆ®È®´ëÃà¼Ò ÇÔ¼ö ½ÃÀÛ
var customFontSize = 12;
var customLineHeight = 14;
var customInputSize = 17;
function setFontSize(obj){
	try{
		obj.style.fontSize=customFontSize+'px';
		obj.style.lineHeight=customLineHeight+'px';
		if(obj.tagName=='INPUT'){
			obj.style.height=customInputSize+'px';
		}
	}catch(e){}
}
function searchTargetNode(obj){
	setFontSize(obj);
	var ml=obj.childNodes.length;
	if(ml>0){
		for(var i=0;i<ml;i++){
			setFontSize(obj.childNodes[i]);
			if(obj.childNodes[i].tagName=='IFRAME'){
				try{
					searchTargetNode(frames[obj.childNodes[i].name].document.body);
				}catch(e){}
			} else {
				if(obj.childNodes[i].childNodes.length>0){
					searchTargetNode(obj.childNodes[i]);
				}
			}
		}
	}
}
function resetFontSize(targetObjectId){
	if (targetObjectId==null) targetObjectId = "center";
	var obj=document.getElementById(targetObjectId);
	searchTargetNode(obj);
}
function increaseFontSize(targetObjectId) {
	if (customFontSize>=18) {
		alert("´õÀÌ»ó Å©°Ô ÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
		return;
	}
	customFontSize = customFontSize + 2;
	customLineHeight = customLineHeight + 2;
	customInputSize = customInputSize + 2;
	resetFontSize(targetObjectId);
}
function decreaseFontSize(targetObjectId) {
	if (customFontSize<=12) {
		alert("´õÀÌ»ó ÀÛ°Ô ÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
		return;
	}
	customFontSize = customFontSize - 2;
	customLineHeight = customLineHeight - 2;
	customInputSize = customInputSize - 2;
	resetFontSize(targetObjectId);
}
function returnFontSize(targetObjectId) {
	customFontSize = 12;
	customLineHeight = 14;
	customInputSize = 17;
	resetFontSize(targetObjectId);
}
//ÆùÆ®È®´ëÃà¼Ò ÇÔ¼ö ³¡

function FontScale(){
  document.write('<a href="javascript:increaseFontSize();"><img src="/2007/img/common/icon_plus.gif" alt="Å©°Ô"></a><a href="javascript:decreaseFontSize();"><img src="/2007/img/common/icon_minus.gif" alt="ÀÛ°Ô" hspace="1"></a><a href="javascript:returnFontSize();"><img src="/2007/img/common/icon_return.gif" alt="¿ø·¡´ë·Î"></a>')
}

// 1depth ·Ñ¿À¹ö½Ã ¶ß´Â ¸Þ´º
function open_sub01() { sub01.style.visibility="visible";}
function close_sub01() {sub01.style.visibility="hidden";}
function open_sub02() { sub02.style.visibility="visible";}
function close_sub02() {sub02.style.visibility="hidden";}
function open_sub03() { sub03.style.visibility="visible";}
function close_sub03() { sub03.style.visibility="hidden";}
function open_sub04() { sub04.style.visibility="visible";}
function close_sub04() { sub04.style.visibility="hidden";}
function open_sub05() { sub05.style.visibility="visible";}
function close_sub05() { sub05.style.visibility="hidden";}
function swapImgRestore() { //v3.0
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}


//ÅÇ ·¹ÀÌ¾î
function changeToMenu01Tab()
{
   document.getElementById("menu01DIV").style.display = "inline";
   document.getElementById("menu02DIV").style.display = "none";
	}
function changeToMenu02Tab()
{
	document.getElementById("menu02DIV").style.display = "inline";
  document.getElementById("menu01DIV").style.display = "none";
}//1

function menu01Tab()
{
   document.getElementById("menu01").style.display = "inline";
   document.getElementById("menu02").style.display = "none";
	}
function menu02Tab()
{
	document.getElementById("menu02").style.display = "inline";
  document.getElementById("menu01").style.display = "none";
}//2

function changeMenu01Tab()
{
   document.getElementById("mnu01").style.display = "inline";
   document.getElementById("mnu02").style.display = "none";
	 document.getElementById("mnu03").style.display = "none";
	}
function changeMenu02Tab()
{
   document.getElementById("mnu01").style.display = "none";
   document.getElementById("mnu02").style.display = "inline";
	 document.getElementById("mnu03").style.display = "none";
	}
function changeMenu03Tab()
{
	document.getElementById("mnu01").style.display = "none";
	document.getElementById("mnu02").style.display = "none";
	document.getElementById("mnu03").style.display = "inline";

}//3

// »ó´Ü ¸Þ´º ÀÌµ¿
function gomove(formname,inx)
{
	var frm=eval("document."+formname);
	var t_target="";

	if(inx == "1")
	{
		t_target="/pr/pr21100/w_pr21110.jsp";
	}
	else if(inx == "2")
	{
		t_target="/pr/pr21100/w_pr21120.jsp";
	}
	else if(inx == "3")
	{
		t_target="/pr/pr21100/w_pr21150.jsp";
	}
	else if(inx == "4")
	{
		//alert('¼­ºñ½º ÁØºñÁß ÀÔ´Ï´Ù.');
		//return;
		t_target="/pr/pr12500/w_pr12501.jsp";
	}

	frm.target='';
	frm.action=t_target;
	frm.submit();
}

// qubi »ó´Ü ¸Þ´º ÀÌµ¿
function Qubigomove(formname,inx)
{
	var frm=eval("document."+formname);
	var t_target="";

	if(inx == "1")
	{
		t_target="/qubi/pr/pr21100/w_pr21110.jsp";
	}
	else if(inx == "2")
	{
		t_target="/qubi/pr/pr21100/w_pr21120.jsp";
	}
	else if(inx == "3")
	{
		t_target="/qubi/pr/pr21100/w_pr21150.jsp";
	}
	else if(inx == "4")
	{
		//alert('¼­ºñ½º ÁØºñÁß ÀÔ´Ï´Ù.');
		//return;
		t_target="/qubi/pr/pr12500/w_pr12501.jsp";
	}

	frm.target='';
	frm.action=t_target;
	frm.submit();
}

/*****************************************/
/*   2009.05.15 nkh ¿­Â÷ Á¤º¸ Ã¼Å©       */
/*   Train_no :  ¿­Â÷ ¹øÈ£               */
/*   Train_dt :  ¿­Â÷ ¿îÇàÀÏÀÚ           */
/*****************************************/
function Train_info(Train_dt,Train_no)
{
	var strBool = false;
	Train = new Array();
	Train = [
				"01204",
				"01951",
				"01210",
				"01941",
				"01212",
				"01352",
				"01004",
				"01953",
				"01942",
				"01222",
				"01342",
				"01931"
				]

	if(Train_dt == '20090524' || Train_dt == '20090531')
	{
		for(var w=0; w<=Train.length; w++)
		{
			if(Train_no == Train[w])
			{
				strBool = true;
				break;
			}
		}
	}

	if(strBool)
	{
		alert('È­¸í¿ª ¹«·á¼ÅÆ²¹ö½º ¾È³»\n\n'+
			  '¼±ÅÃÇÏ½Å ±¸°£Àº °æºÎ¼± È­¸í¿ª »óÇà¿­Â÷ÀÇ ½ÂÂ÷°¨ ¹×\n\n'+
			  '¼ÓµµÇâ»óÀ» À§ÇÑ °ø»ç·Î ÀÎÇØ È­¸í¿ª¿¡ ¿­Â÷°¡ Á¤Â÷ÇÏÁö ¾ÊÀ¸¸ç,\n\n'+
			  'È­¸í¿ª¿¡¼­ ±¸Ç¥¿ª±îÁö ¹«·á¿¬°è¹ö½º¸¦ ¿îÇàÇÏ°í ÀÖ½À´Ï´Ù.\n\n'+
			  '¿­Â÷ÀÌ¿ë¿¡ Âü°í ÇÏ½Ã±â ¹Ù¶ø´Ï´Ù.');
	}

}

function fn_mobile()
{
	var uAgent = navigator.userAgent.toLowerCase();
	var mobilePhones = new Array('iphone','ipod','ipad','android','blackberry','windows ce',
								 'nokia','webos','opera mini','sonyericsson','opera mobi','iemobile','presto');
	for(var i=0;i<mobilePhones.length;i++)
		if(uAgent.indexOf(mobilePhones[i]) != -1)
			return true;
			
	return false;
}


function fn_acnt_help()
{
	var pop  = window.open('','acnt_help',"width=800,height=800,scrollbars=yes");
	pop.location = 'http://www.bankpay.or.kr/bankpay_new/custom/InstallGuideAll.htm';
}


/*  °ø¹é¾ø¾Ö±â : ±ÛÀÚÁß°£ÀÇ °ø¹éµµ ¾ø¾Ø´Ù */
function removeChar(obj, ch)
{
	var newStr = '';
	var oldStr = obj.value;
	for ( var ii=0 ; ii<oldStr.length ; ii++ )
	{
		if ( oldStr.charAt(ii) != ch )
			newStr = newStr+oldStr.charAt(ii);
	}
	return newStr;
}


/*  ÆË¾÷°ü¸® */
function setCookie2( name, value, expiredays )
{
	var todayDate = new Date();
		todayDate.setDate( todayDate.getDate() + expiredays );
		todayDate.setHours  ( 23 );
		todayDate.setMinutes( 59 );
		document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function getCookie2( name )
{
	//document.domain="korail.com";

	var nameOfCookie = name + "=";
	var x = 0;

	while ( x <= document.cookie.length )
	{
		var y = (x+nameOfCookie.length);

		if ( document.cookie.substring( x, y ) == nameOfCookie )
		{
			var done="done";
			return(done);
		}
		x = document.cookie.indexOf( " ", x ) + 1;
		if ( x == 0 )
		{
			break;
		}
	}
	return "";
}

function goPopup(linkurl,option)
{
	var rstr = window.open('', linkurl, option);
	rstr.location = eval(linkurl);
}

function winResize() {
	var Dwidth  = parseInt(document.body.scrollWidth);
	var Dheight = parseInt(document.body.scrollHeight);
	var divEl = document.createElement("div");
	
	divEl.style.position = "absolute";
	divEl.style.left = "0px";
	divEl.style.top  = "0px";
	divEl.style.width  = "100%";
	divEl.style.height = "100%";
	
	document.body.appendChild(divEl);
	//document.body.insertBefore(divEl, document.body.firstChild);
	//alert("Dwidth : " + Dwidth + ", divEl.offsetWidth : " + divEl.offsetWidth
	//     +", Dheight : " + Dheight + ", divEl.offsetHeight : " + divEl.offsetHeight);
	if(navigator.userAgent.indexOf("MSIE 6") != -1 )
		window.resizeBy(0, Dheight-divEl.offsetHeight);
	else
		window.resizeBy(0, Dheight-divEl.offsetHeight + 30);

	document.body.removeChild(divEl);
}

function isEmail(strEmail) {
	var regDoNot = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/;
	var regMust = /^[a-zA-Z0-9\-\.\_]+\@[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3})$/;

	if ( !regDoNot.test(strEmail) && regMust.test(strEmail) )
		return true;
	else
		return false;
}

function autoFosCard(obj1,obj2,len)
{
	var strObj1 = obj1.value;

	if(strObj1.length >= len)
	{
		obj2.focus();
	}
}

function openWindowZipCode(name1, name2, name3)
{
	rstr = window.open('', '', 'height=280, width=420, top=200, left=300, scrollbars=yes');
	rstr.location = '/pc/pc11100/w_pc11130.jsp?hidName1=' +name1+ '&hidName2=' +name2+ '&hidName3=' +name3;
}

function imgReload(img, max) {
	if ( !max ) {
		max = 120;
	}
	if ( img.width >= img.height && img.width > max) {
		img.width = max;
	} else if ( img.width < img.height && img.height > max ) {
		img.height= max;
	}
}

function imgError(img) {
	img.onerror = null;
	img.src = "/2009/img/tr/tr_default_146.gif";
}

