<!--
/*--------------------------------------------*/
/* 	- °øÅë ÀÚ¹Ù½ºÅ©¸³Æ® ÇÔ¼ö				  */
/*--------------------------------------------*/
function allblur()
{
for (i = 0; i < document.links.length; i++)
	document.links[i].onfocus = document.links[i].blur;
}
document.onfocusin = allblur;

var win;
//¿ÀÇÂ À©µµ¿ì
function winOpen(f, w, h) {    
   	if(!win || win.closed){
	   	win = window.open(f,"win","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width="+w+",height="+h);   
   	}
   	else
    {
	    win.close();
	   	win = window.open(f,"win","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width="+w+",height="+h);   
	    win.focus();
    }
}

var popwin;
function popWin(f, w, h) { 
		if ( getCookie("openChk") != "true" ) 
		{
			popwin = window.open(f, 'popwin', "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,left=20,top=20,width="+w+",height="+h);   
			if(win)
			{
				popwin = window.open(f, 'popwin',"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,left=20,top=20,width="+w+",height="+h);   
				popwin.focus();
			}
		}
}

var popwin2;
function popWin2(f, w, h) { 
		if ( getCookie("openChk2") != "true" ) 
		{
			popwin = window.open(f, 'popwin2', "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,left=430,top=20,width="+w+",height="+h);   
			if(win)
			{
				popwin = window.open(f, 'popwin2',"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,left=430,top=60,width="+w+",height="+h);   
				popwin.focus();
			}
		}
}



var win2;
//¿ÀÇÂ À©µµ¿ì
function winOpen2(f, w, h) {    
   	if(!win2 || win2.closed){
	   	win2 = window.open(f,"win2","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left=50,copyhistory=yes,width="+w+",height="+h);   
   	}
   	else
    {
	    win2.close();
	   	win2 = window.open(f,"win2","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left=50,copyhistory=yes,width="+w+",height="+h);   
	    win2.focus();
    }
}


var win3;
//¿ÀÇÂ À©µµ¿ì
function winOpen3(f, w, h) {    
   	if(!win3 || win3.closed){
	   	win3 = window.open(f,"win3","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width="+w+",height="+h);   
   	}
   	else
    {
	    win3.close();
	   	win3 = window.open(f,"win3","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width="+w+",height="+h);   
	    win3.focus();
    }
}
var win4;
//¿ÀÇÂ À©µµ¿ì
function winOpen4(f, w, h) {    
   	if(!win4 || win4.closed){
	   	win4 = window.open(f,"win4","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left=100,copyhistory=yes,width="+w+",height="+h);   
   	}
   	else
    {
	    win4.close();
	   	win4 = window.open(f,"win4","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left=100,copyhistory=yes,width="+w+",height="+h);   
	    win4.focus();
    }
}

var win5;
//¿ÀÇÂ À©µµ¿ì
function winOpen5(f, w, h,s) {    
   	if(!win5 || win5.closed){
	   	win5 = window.open(f,"win5","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+s+",resizable=no,left=100,copyhistory=yes,width="+w+",height="+h);   
   	}
   	else
    {
	    win5.close();
	   	win5 = window.open(f,"win5","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+s+",resizable=no,left=100,copyhistory=yes,width="+w+",height="+h);   
	    win5.focus();
    }
}

var win6;
//¿ÀÇÂ À©µµ¿ì
function winOpen6(f, w, h) {    
   	if(!win6 || win6.closed){
	   	win6 = window.open(f,"win6","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left=100,copyhistory=yes,width="+w+",height="+h);   
   	}
   	else
    {
	    win6.close();
	   	win6 = window.open(f,"win6","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left=100,copyhistory=yes,width="+w+",height="+h);   
	    win6.focus();
    }
}
var win7;
//¿ÀÇÂ À©µµ¿ì
function winOpen7(f, w, h,l,t,s) {    
   	if(!win7 || win7.closed){
	   	win7 = window.open(f,"win7","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+s+",resizable=no,left="+l+",top="+t+",copyhistory=yes,width="+w+",height="+h);   
   	}
   	else
    {
	    win7.close();
	   	win7 = window.open(f,"win7","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+s+",resizable=no,left="+l+",top="+t+",copyhistory=yes,width="+w+",height="+h);   
	    win7.focus();
    }
}

//ÀÚ¸´¼ö Ã¼Å© ÈÄ ÀÚµ¿ ³Ñ¾î°¡±â
function nextForm(el1, el2, num)
{
	if(el1.value.length == num)
	{
		el2.focus();
	}
}

//ÁÖ¹Î¹øÈ£ Ã¼Å©-------------------------------------------------
function resnoCheck(val)
{
	//-----------------ÁÖ¹Îµî·Ï¹øÈ£ Ã¼Å© ·çÆ¾	
	IDtot = 0;
	IDAdd="234567892345";
	var resno = val;
	for(i=0;i<12;i++) {
	IDtot=IDtot+parseInt(resno.substring(i,i+1))*parseInt(IDAdd.substring(i,i+1));
	}
	IDtot=11-(IDtot%11);
	if(IDtot==10) {
	IDtot=0;
	}
	else if(IDtot==11){
	IDtot=1;
	}
	if(parseInt(resno.substring(12,13))!=IDtot)
	{
		 return false;
	}
	return true;
}
//-------------------------------------------------------------------

//¼ýÀÚ Ã¼Å©-------------------------------------------------
function numberCheck(val)
{
	var len = val.length;
	var str = "";
	var validstr = "0123456789";
	if(validstr.search(val.substring(0,1)) == -1)
	{
		return false;
	}
	return true;
}
//-------------------------------------------------------------------


//ÀÌ¸ÞÀÏ Ã¼Å©-------------------------------------------------
function emailCheck(val)
{
	var num = val.length
	var check = false
	for(i=0;i<num;i++)
	{
		if(val.substring(i,i+1)=="@")
		{
			for(j=i;j<num;j++)
			{
				if(val.substring(j,j+1)==".")
				{
					check = true
					return true;
					break
				}
			}
		}
	}
	return check;
}

function fileCheck(val)
{
	var len = val.length;

	if(len > 0)
	{
	    val = val.substring(val.lastIndexOf(".")+1,val.length);
	    if(val == "php"||val == "PHP"||val == "php3"||val == "PHP3"||val == "phtml"||val == "PHTML"||val == "html"||val == "htm"||val == "inc"||val == "INC"||val == "txt"||val == "TXT"||val == "asp"||val == "ASP")
	    {
	    	alert("Å¸ÀÔÀÌ ."+val+"ÀÎ ÆÄÀÏÀº ¾÷·ÎµåÇÒ ¼ö ¾ø½À´Ï´Ù.");
	    	return false;
	    }else
	    {
	    	return true;
	    }
	} else {
		return true;
	}
}

//°¡°ÝÇ¥½Ã-------------------------------------------------
function getPriceFormat(f)
{
	/*
	var val = f.value;
	var num = val.length
	var str = '';
	var j = 0;
	for(var i=num;i > 0;i--)
	{
		j = j+1;
		if(i%3 == 0)
		{
			str = ',' + val.substring(i, i-1) + str;
		}else{
			str = val.substring(i, i-1) + str;
		}
	}
	//alert(str);
	return str;*/

}

//¿ø·¡ Ç¥½Ã-------------------------------------------------
function getNormalFormat(val)
{
}
//-------------------------------------------------------------------

//ÄíÅ°¼³Á¤
function setCookie( name, value, expiredays )
{
    var todayDate = new Date();
    todayDate.setDate( todayDate.getDate() + expiredays );
    document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

// ÄíÅ°Á¤º¸ °¡Á®¿À±â
function getCookie(strName)
{
	var strArg = new String(strName + "=");	
	var nArgLen, nCookieLen, nEnd;
	var i = 0, j;

	nArgLen    = strArg.length;
	nCookieLen = document.cookie.length;

	if(nCookieLen > 0) {
		while(i < nCookieLen) {
			j = i + nArgLen;
			if(document.cookie.substring(i, j) == strArg) {
				nEnd = document.cookie.indexOf (";", j);
				if(nEnd == -1) nEnd = document.cookie.length;
				return unescape(document.cookie.substring(j, nEnd));
			}
			i = document.cookie.indexOf(" ", i) + 1;
			if (i == 0) break;
		}
	}
	return("");
}
	
//ÅäÆÄ½ºÇ×°ø±Ç//////////////////////////////////////////////
function plz_booking_i()
{
	document.booking_i.submit();
}

function plz_booking_d()
{
	document.booking_d.submit();
}

function plz_change()
{
	document.change.submit();
}

function plz_schedule()
{
	document.schedule.submit();
}

function plz_arrival()
{
	document.arrival.submit();
}


/*--------------------------------------------*/
/* 	- µå¸²À§¹ö »ý¼º ÀÚ¹Ù½ºÅ©¸³Æ® ÇÔ¼ö			  */
/*--------------------------------------------*/

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
///////////////////////////////////////////////////////////
//-->


