<!--
 
/* -----------------------------------------------------
	   Å«ÀÌ¹ÌÁöº¸±â Ã¢¶ç¿ì±â
	----------------------------------------------------- */
 
function fnPic_Show(hCode)
{
	LeftPosition=(screen.width)?(screen.width)/2 - 200:300;
	TopPosition=(screen.height)?(screen.height)/2 - 150:450;

	window.open('/hotel/hotel_imgshow.asp?hCode='+hCode,'IMAGE_VIEW','width=600, height=588,top='+TopPosition+',left='+LeftPosition+',scrollbars=no, status=no');
}


/* -----------------------------------------------------
	   ÀÛÀºÀÌ¹ÌÁö°¡ Å«ÀÌ¹ÌÁö Ã¢À¸·Î ±³Ã¼µÇ¾î º¸ÀÌ°Ô µÊ.
	----------------------------------------------------- */

function fnViewimg(mode)
{
	var nowcnt = frmimgcnt.nowcnt.value;
	var imgcnt = frmimgcnt.imgcnt.value;

	for(var i=1;i<=imgcnt;i++)
	{
		var img = "img"+i;
		document.all[img].style.display='none';
	}

	if(mode=="pre")
	{
		if(nowcnt==1)
		{
			var imgs = "img"+nowcnt;
			document.all[imgs].style.display='';
			alert("°¡Àå Ã³À½ ÀÌ¹ÌÁöÀÔ´Ï´Ù.");
			return;
		}else{
			frmimgcnt.nowcnt.value=parseInt(frmimgcnt.nowcnt.value)-1;
			nowcnt = frmimgcnt.nowcnt.value;
			var imgs = "img"+nowcnt;
			document.all[imgs].style.display='';
		}
	}else{
		if(nowcnt==imgcnt)
		{
			var imgs = "img"+nowcnt;
			document.all[imgs].style.display='';
			alert("°¡Àå ¸¶Áö¸· ÀÌ¹ÌÁöÀÔ´Ï´Ù.");
			return;
		}else{
			frmimgcnt.nowcnt.value=parseInt(frmimgcnt.nowcnt.value)+1;
			nowcnt = frmimgcnt.nowcnt.value;
			var imgs = "img"+nowcnt;
			document.all[imgs].style.display='';
		}

	}
}


function imgchg(name,img){
name.src = img;
}			 



//»çÀÌÆ® Áñ°ÜÃ£±â

var favoriteurl="http://www.hoteljoa.com/" 
var favoritetitle="½Ç±â°£ È£ÅÚ¿¹¾à - È£ÅÚÁ¶¾Æ" 
	function addfavorites(){ 
	if (document.all) 
	window.external.AddFavorite(favoriteurl,favoritetitle)
} 

//È£ÅÚ»ó¼¼º¸±â¿¡¼­ Áñ°ÜÃ£±â
function addfavoritesView(favoriteurl,favoritetitle){ 
if (document.all) 
window.external.AddFavorite(favoriteurl,favoritetitle)} 

 
function Fun_Copy(strData) {
clipboardData.setData("Text", strData);
alert("ÇØ´ç È£ÅÚ ÆäÀÌÁöÀÇ ÁÖ¼Ò°¡ º¹»çµÇ¾ú½À´Ï´Ù.\n Ctrl+V·Î ºÙÇô³Ö±â ÇÏ½Ã¸é µË´Ï´Ù.");}
 

function FunWinOpen(Hcode,URL,Title,Height,Width)
{
	 LeftPosition=(screen.width)?(screen.width)/2 - 200:300;
	TopPosition=(screen.height)?(screen.height)/2 - 150:450;

  window.open(URL+'?Hcode='+Hcode,Title,'width='+Width +', height='+Height +',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes, status=no');
}

function FunWinOpen2(URL,Title,Height,Width)
{
	 LeftPosition=(screen.width)?(screen.width)/2 - 200:300;
	TopPosition=(screen.height)?(screen.height)/2 - 150:450;

  window.open(URL,Title,'width='+Width +', height='+Height +',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes, status=no');
}




		/* »ç¿ëHTML
		
		   <table width="268" height="207" cellpadding="0" cellspacing="1" border="0" bgcolor="#CCCCCC">
			<tr>
			<td bgcolor="#FFFFFF" align="center">
			
			<!-- Å« »çÁø -->
			<img id="mainimg" src="http://www.hoteltrees.com/hotel/hotelimg/JP/TYO/JPTYO_0132_1.jpg" width="260" height="199" border="0" align="absmiddle" onerror="this.src='/img/bg_noimagel.gif'"></td>
			</tr>
			</table>

			<!-- ÀÛÀº»çÁø -->
			<table height="62" cellpadding="0" cellspacing="0" border="0">
			<tr>
			<td width="14"><a href="Javascript:fnViewimg('pre');"><img src="http://www.hoteltrees.com/img/hotel/bt_preimage.gif" border="0" align="absmiddle"></a></td>
			<td width="240" align="center">
				<table border="0" width="100%">
					<tr id="img1">

				<td width="60" align="center"><img id="imgCnt1" style="display:" src="http://www.hoteltrees.com/hotel/hotelimg/JP/TYO/JPTYO_0132_1.jpg" width="57" height="45" border="0" align="absmiddle" onclick="mainimg.src='http://www.hoteltrees.com/hotel/hotelimg/JP/TYO/JPTYO_0132_1.jpg'" style="cursor:hand" onerror="this.src='/img/bg_noimages.gif'">
				</td>

				<td width="60" align="center"><img id="imgCnt2" style="display:" src="http://www.hoteltrees.com/hotel/hotelimg/JP/TYO/JPTYO_0132_2.jpg" width="57" height="45" border="0" align="absmiddle" onclick="mainimg.src='http://www.hoteltrees.com/hotel/hotelimg/JP/TYO/JPTYO_0132_2.jpg'" style="cursor:hand" onerror="this.src='/img/bg_noimages.gif'">
				</td>

				<td width="60" align="center"><img id="imgCnt3" style="display:" src="http://www.hoteltrees.com/hotel/hotelimg/JP/TYO/JPTYO_0132_3.jpg" width="57" height="45" border="0" align="absmiddle" onclick="mainimg.src='http://www.hoteltrees.com/hotel/hotelimg/JP/TYO/JPTYO_0132_3.jpg'" style="cursor:hand" onerror="this.src='/img/bg_noimages.gif'">
				</td>

				<td width="60" align="center"><img id="imgCnt4" style="display:" src="http://www.hoteltrees.com/hotel/hotelimg/JP/TYO/JPTYO_0132_4.jpg" width="57" height="45" border="0" align="absmiddle" onclick="mainimg.src='http://www.hoteltrees.com/hotel/hotelimg/JP/TYO/JPTYO_0132_4.jpg'" style="cursor:hand" onerror="this.src='/img/bg_noimages.gif'">
				</td>

					</tr>
					<tr id="img2" style="display:none">

				<td width="60" align="center"><img id="imgCnt5" style="display:" src="http://www.hoteltrees.com/hotel/hotelimg/JP/TYO/JPTYO_0132_5.jpg" width="57" height="45" border="0" align="absmiddle" onclick="mainimg.src='http://www.hoteltrees.com/hotel/hotelimg/JP/TYO/JPTYO_0132_5.jpg'" style="cursor:hand" onerror="this.src='/img/bg_noimages.gif'">
				</td>

				<td width="60" align="center"><img id="imgCnt6" style="display:" src="http://www.hoteltrees.com/hotel/hotelimg/JP/TYO/JPTYO_0132_6.jpg" width="57" height="45" border="0" align="absmiddle" onclick="mainimg.src='http://www.hoteltrees.com/hotel/hotelimg/JP/TYO/JPTYO_0132_6.jpg'" style="cursor:hand" onerror="this.src='/img/bg_noimages.gif'">
				</td>

				<td width="60" align="center"><img id="imgCnt7" style="display:" src="http://www.hoteltrees.com/hotel/hotelimg/JP/TYO/JPTYO_0132_7.jpg" width="57" height="45" border="0" align="absmiddle" onclick="mainimg.src='http://www.hoteltrees.com/hotel/hotelimg/JP/TYO/JPTYO_0132_7.jpg'" style="cursor:hand" onerror="this.src='/img/bg_noimages.gif'">
				</td>

				<td width="60" align="center">&nbsp;</td>

					</tr>
				</table>
			</td>
			<td width="14" align="right"><a href="Javascript:fnViewimg('next');"><img src="http://www.hoteltrees.com/img/hotel/bt_nextimage.gif" style="cursor:hand" border="0" align="absmiddle"></a></td>
			</tr>
			<form name="frmimgcnt">
			<input type="hidden" name="imgcnt" value="2">
			<input type="hidden" name="nowcnt" value="1">
			</form>
			</table>

			<table width="268" height="20" cellpadding="0" cellspacing="0" border="0">
			<tr>
			<td align="right">
			
			<!-- Å©°Ôº¸±â ¹öÆ° -->
			<a href="Javascript:fnPic_Show('JPTYO_0132');"><img src="http://www.hoteltrees.com/img/hotel/bt_zoom.gif" border="0"></a><!--<a href="/Hotel/hotel_list.asp?smode=S&page=&area=JP&nationcd=JP&citycd=TYO&Shnm=&ciDt=2007-11-06&coDt=2007-11-07&ngt=1&rmType1=SB&rmQty1=1&rmType2=&rmQty2=0">aaa</a>--></td>
			</tr>
			</table>	*/
  
	

	
	/* -----------------------------------------------------
	   ¿¹¾àÀÚ º»ÀÎÆ÷ÇÔ
	----------------------------------------------------- */
 

//-------------------------------------------------------
// ÁÖ¹Î¹øÈ£ check Main Function.
//-------------------------------------------------------
function id_no_chk(obj1,obj2)    
{
    // CheckSum Ã¼Å©
    if (chksumID(obj1,obj2) == false)
        return false;

    strReg1 = obj1.value;
    strReg2 = obj2.value;

    sGender = strReg2.substring(0,1);
    sYear = strReg1.substring(0,2);

    // µÎ¹øÂ° ´Ü¶ô Ã¹¹øÂ° ¼ýÀÚ´Â 4º¸´Ù Å¬ ¼ö ¾ø´Ù.
    if (sGender > 4) {
        return false;
    }
    
    // 2000³âµµ ÀÌÀüÀº ³²ÀÚ´Â 1, ¿©ÀÚ´Â 2
    // 2000³âµµ ÀÌÈÄ´Â ³²ÀÚ´Â 3, ¿©ÀÚ´Â 4
    if (sYear != '00') {
        if ((sGender != '1') && (sGender != '2')) {
            alert( "aaa" );
            return false;
        }
    } else {
        if ((sGender != '3') && (sGender != '4')) {
            return false;
        }
    }
        
    // »ý¼º±â·Î ¸¸µç°Ô ¾Æ´Ñ°¡ »ý³â¿ùÀÏ Ã¼Å©
    if (ValidRegNo(obj1) == false)
        return false; 
}

//-------------------------------------------------------
// ÁÖ¹Î¹øÈ£ ¾ÕÀÚ¸® check check.
//-------------------------------------------------------
function ValidRegNo(obj1)    
{
    strReg1 = obj1.value;

    // YYMMDD°¡ ¸Â´ÂÁö È®ÀÎÇÑ´Ù.
    a = new String(strReg1);

    if(a == '') return false;
    if(a.length != 6 ) return false;

    intYear = parseInt(a.substring(0,2) , 10);
    intMonth = parseInt(a.substring(2,4) , 10);
    intDay = parseInt(a.substring(4,6) , 10);
    
    if(intMonth < 0 || intMonth > 12){ 
        return false;
    }
        
    switch(intMonth){
        case 2 :
            if(intDay < 0 || intDay > 29){
                return false;
                breake;
            }
        case 4 :
            if(intDay < 0 || intDay > 30){
                return false;
                breake;
            }
        case 6 :
            if(intDay < 0 || intDay > 30){
                return false;
                breake;
            }
        case 9 :
            if(intDay < 0 || intDay > 30){
                return false;
                breake;
            }
        case 11 :
            if(intDay < 0 || intDay > 30){
                return false;
                breake;
            }
        default :
            if(intDay < 0 || intDay > 31){
                return false;
                breake;
            }
    }
    
    return true;
}

//-------------------------------------------------------
// ÁÖ¹Î¹øÈ£ checksum check.
//-------------------------------------------------------
function chksumID(obj1,obj2)    
{
    //¼ýÀÚ·Î¸¸±¸¼ºµÇ¾î ÀÖ´ÂÁö TestÇÒ Á¤±ÔÇ¥Çö.
	var regExpr = /^[0-9]+$/;

    var str1 = obj1.value;
    var str2 = obj2.value;
    var li_lastid,li_mod,li_minus,li_last;
    var value0,value1,value2,value3,value4,value5,value6;
    var value7,value8,value9,value10,value11,value12;
    
    if (regExpr.test(str1) &&  regExpr.test(str2)) {
        li_lastid    = parseFloat(str2.substring(6,7));
        value0  = parseFloat(str1.substring(0,1))  * 2;
        value1  = parseFloat(str1.substring(1,2))  * 3;
        value2  = parseFloat(str1.substring(2,3))  * 4;
        value3  = parseFloat(str1.substring(3,4))  * 5;
        value4  = parseFloat(str1.substring(4,5))  * 6;
        value5  = parseFloat(str1.substring(5,6))  * 7;
        value6  = parseFloat(str2.substring(0,1))  * 8;
        value7  = parseFloat(str2.substring(1,2))  * 9;
        value8  = parseFloat(str2.substring(2,3))  * 2;
        value9  = parseFloat(str2.substring(3,4))  * 3;
        value10 = parseFloat(str2.substring(4,5))  * 4;
        value11 = parseFloat(str2.substring(5,6))  * 5;
        value12 = 0;
        
        value12 = value0+value1+value2+value3+value4+value5+value6+value7+value8+value9+value10+value11+value12 ;
        
        li_mod = value12 %11;
        li_minus = 11 - li_mod;
        li_last = li_minus % 10;
        if (li_last != li_lastid){
            return false;
        } else
            return true;
    } else
    return false;
}



// ÁÖ¾îÁø ¹®ÀÚ¿­ÀÌ ºñ¾îÀÖ´ÂÁö °Ë»çÇÑ´Ù.(true:ºñ¾îÁø°æ¿ì, false:ºñÁö¾ÊÀº°æ¿ì)
function IsEmpty(m_str)
{
	var LNum;
	
	LNum = m_str.length;
	
	for(i=0;i<LNum;i++) {
		m_str = m_str.replace(" ", "");
	}
	
	if (m_str == "") {
		return true;
	} else {
		return false;
	}
}

//¸ÞÀÏÁÖ¼Ò°¡ ÀûÇÕÇÑÁö °Ë»ç(true:ÀûÇÕÇÑ ¸ÞÀÏÁÖ¼Ò, false:ÀûÇÕÇÏÁö¾ÊÀº ¸ÞÀÏ)
function IsEmail(E_value)
{
	var strEmail = E_value.value;
    var i;
    var strCheck1 = false;
    var strCheck2 = false;
	var iEmailLen = strEmail.length

	if (iEmailLen > 0) {
		// strEmail ¿¡ '.@', '@.' ÀÌ ÀÖ´Â °æ¿ì ¿¡·¯¸Þ½ÃÁö.
		// strEmailÀÇ ¸Ç¾Õ ¶Ç´Â ¸ÇµÚ¿¡  '@', '.' ÀÌ ÀÖ´Â °æ¿ì ¿¡·¯¸Þ½ÃÁö.
		if ((strEmail.indexOf(".@") != -1) || (strEmail.indexOf("@.") != -1) ||
			(strEmail.substring(0,1) == ".") || (strEmail.substring(0,1) == "@") ||
			(strEmail.substring(iEmailLen-1,iEmailLen) == ".") || (strEmail.substring(iEmailLen-1,iEmailLen) == "@"))
		{   
			return false;
		}
		
	    for(i=0; i < iEmailLen; i++) {
	        if ((strEmail.substring(i,i+1) == ".") || 
	        	(strEmail.substring(i,i+1) == "-") || (strEmail.substring(i,i+1) == "_") ||
	           ((strEmail.substring(i,i+1) >= "0") && (strEmail.substring(i,i+1) <= "9")) ||
	           ((strEmail.substring(i,i+1) >= "@") && (strEmail.substring(i,i+1) <= "Z")) ||
	           ((strEmail.substring(i,i+1) >= "a") && (strEmail.substring(i,i+1) <= "z"))) {
	                if (strEmail.substring(i,i+1) == ".")
						strCheck1 = true;
	                if (strEmail.substring(i,i+1) == "@")
						strCheck2 = true;
	        }
	        else {
				return false;
	        }
	    }
	
	    if ((strCheck1 == false) || (strCheck2 == false)) {
	        return false;
	    }
	}
    return true;
}

// ÁÖ¾îÁø ¹®ÀÚ¿­ÀÌ ¼ýÀÚ·Î¸¸ ÀÌ·ç¾îÁ®ÀÖ´ÂÁö °Ë»çÇÑ´Ù.
function IsNumber(m_num)
{
	if (!IsEmpty(m_num)) {
		for (j = 0; j < m_num.length; j++)
			if (((m_num.substring(j, j+1) < "0") || (m_num.substring(j, j+1) > "9")))
				return false;
	} else {
		return false;
	}
	return true;
}

 -->





