<!--
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_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_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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function turInf(cty,cod) {
	window.open('/Travel_Guide/PopUp/TurInf.asp?ctycod=' + cty + '&turCod=' + cod, 'turInf', 'screenX=0,screenY=0,top=0,left=0,width=682,height=416,scrollbars=yes, marginwidth=0, marginheight=0, menubar=0, resizable=0');
}

function TurInfPhoto(cty,cod) {
//	window.open('http://www.kaltour.com/Travel_Guide/PopUp/Pop_Sche_Photo.asp?ctycod=' + cty + '&turCod=' + cod, 'turInf', 'screenX=0,screenY=0,top=0,left=0,width=700,height=600,scrollbars=yes, marginwidth=0, marginheight=0, menubar=0, resizable=0');
	window.open('/Travel_Guide/PopUp/Pop_Sche_Photo.asp?ctycod=' + cty + '&turCod=' + cod, 'turInf', 'screenX=0,screenY=0,top=0,left=0,width=700,height=600,scrollbars=yes, marginwidth=0, marginheight=0, menubar=0, resizable=0');
}

function open_win(theURL,winName,features) {
	window.open(theURL,winName,features);
}

function open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable) {
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

function showtip(current,e,num)
{
	if (document.layers) { // Netscape 4.0+
		theString="<DIV CLASS='ttip'>"+num+"</DIV>"
		document.tooltip.document.write(theString)
		document.tooltip.document.close()
		document.tooltip.left=e.pageX+14
		document.tooltip.top=e.pageY+2
		document.tooltip.visibility="show"
	} else {
		if(document.getElementById) { // Netscape 6.0+ , Internet Explorer 5.0+
			elm=document.getElementById("tooltip")
			elml=current
			elm.innerHTML=num
			elm.style.height=elml.style.height
			elm.style.top=200
			elm.style.left=100
			elm.style.visibility = "visible"
		}
	}
}

function addwish(user,pkgpnh,hg1hno,cty,htl)
{
	if (user == "") {
		var result = confirm("È¸¿ø ¸Þ´ºÀÔ´Ï´Ù.\n·Î±×ÀÎ ÇÏ½Ã°Ú½À´Ï±î.?");
		if (result == true)
		{
			open("/Login/Login.asp", "post", 'left=80,top=20,width=500,height=570,toolbar=no,menubar=no,status=no,scrollbars=yes,resizable=no');
		}
	} else {
		//alert('/include/Wish_input.asp?PKGPNH='+pkgpnh+'&HG1HNO='+hg1hno+'&CTYCOD='+cty+'&HTLHTL='+htl);
		mempkg.location.href='/include/Wish_input.asp?PKGPNH='+pkgpnh+'&HG1HNO='+hg1hno+'&CTYCOD='+cty+'&HTLHTL='+htl;
	}
}

function hidetip(){
if (document.layers) // Netscape 4.0+
   {
    document.tooltip.visibility="hidden"
   }
else
  {
   if(document.getElementById) // Netscape 6.0+ , Internet Explorer 5.0+
     {
      elm.style.visibility="hidden"
     }
  } 
}

//-- ÀÎÀÚ textarea, byteÇ¥½Ã textÇÊµå, Á¦ÇÑbyte
function textCounter(theField,maxChars)
{
	var strCharCounter = 0;
	var intLength = theField.value.length;
	var nowChr = 1 ;

	for (var i = 0; i < intLength; i++)
	{
		var charCode = theField.value.charCodeAt(i);
//ÇÑ±ÛÀÏ °æ¿ì
		if (charCode > 128)        {
			strCharCounter += 2;
			thsChr = 2 ;
		} else {
			strCharCounter++;
			thsChr = 1 ;
		}

		if ( thsChr != nowChr )	{
			strCharCounter++;
			nowChr = thsChr ;
		}

		if(strCharCounter >= (maxChars+1)) {
			eval("alert('ÇÑ±Û" + maxChars/2 + ", ¿µ¹®" + maxChars+ "ÀÚ Á¦ÇÑÀÔ´Ï´Ù. ÃÊ°úµÈ ¹®ÀÚ´Â Àß¸³´Ï´Ù.')");
			if(!cutStr(theField, i, maxChars)) {
				alert("¹®ÀÚ¿­ Ä¿Æ® ÇÔ¼ö°¡ ÀÛµ¿µÇÁö ¾Ê½À´Ï´Ù.");
			}
			break;
		}
	}
}

function cutStr(theField, i, maxChars) {
	var intLength = theField.value.length;        //-- ½ÇÁ¦ ¹®ÀÚÀÇ ±æÀÌ¸¦ ±¸ÇÑ´Ù.
	var strChar = theField.value.substring(0,i);  //¸¶Áö¸· ¹®ÀÚ¸¦ Àß¶ó³½´Ù.
	
	theField.value = strChar;
	textCounter(theField,maxChars);
	return true;
}

function ShowFlash(url, width, height) {
        document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + width + '" height="' + height + '" VIEWASTEXT>');
		document.write('<param name="allowScriptAccess" value="always">');
        document.write('<param name="movie" value="' + url + '">');
        document.write('<param name="quality" value="high">');
        document.write('<embed src="' + url + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"  allowScriptAccess="always" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed>');
        document.write('</object>');
}

//ÇÃ·¡½¬
function fnFlashPlayNoTrans(strUrl, numWidth, numHeight) {
	var tmpStr = '';
	tmpStr += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+ numWidth +'" height="'+ numHeight +'" >'
    tmpStr += '<param name="allowScriptAccess" value="always">'
    tmpStr += '<param name="movie" value="'+ strUrl +'">'
	tmpStr += '<param name="quality" value="high">'
	tmpStr += '<embed src="'+ strUrl +'" width="'+ numWidth +'" height="'+ numHeight +'" align="right" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always"  type="application/x-shockwave-flash" wmode="transparent"></embed>'
	tmpStr += '</object>'
	
	document.write (tmpStr);
}


//ÇÃ·¡½¬ ¹è°æÀ» Åõ¸íÇÏ°Ô
function fnFlashPlay(strUrl, numWidth, numHeight) {
	var tmpStr = '';
	tmpStr += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+ numWidth +'" height="'+ numHeight +'" >'
    tmpStr += '<param name="allowScriptAccess" value="always">'	
	tmpStr += '<param name="movie" value="'+ strUrl +'">'
	tmpStr += '<param name="quality" value="high">'
	tmpStr += '<param name="wmode" value="transparent">'
	tmpStr += '<embed src="'+ strUrl +'" width="'+ numWidth +'" height="'+ numHeight +'" align="right" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" type="application/x-shockwave-flash" wmode="transparent"></embed>'
	tmpStr += '</object>'
	
	document.write (tmpStr);
}

function kst_Tgp_mr() {
	var Layer_world = document.getElementById('hts_AD_flash');
	var yMenuFrom = parseInt(hts_AD_flash.style.top, 10);
	var yMenuTo = document.body.scrollTop;				// scrollTopÀº ÇØ´ç À¥ÆäÀÌÁö¿¡ Á¾½ºÅ©·Ñ¹Ù°¡ ÀÖ°í Á¾½ºÅ©·Ñ¹Ù¸¦ ¾Æ·¡·Î ÀÌµ¿½ÃÄ×À» ¶§, scrollLeftÀº ÇØ´ç À¥ÆäÀÌÁö¿¡ È¾½ºÅ©·Ñ¹Ù°¡ ÀÖ°í È¾½ºÅ©·Ñ¹Ù¸¦ ¾Æ·¡·Î ÀÌµ¿½ÃÄ×À» ¶§
	
	var ymenu = document.body.clientHeight+yMenuTo;
	if (yMenuTo > ymenu) yMenuTo = ymenu;
	if (yMenuTo < 0) yMenuTo = 0;
	if (yMenuFrom != yMenuTo) {
		var yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) * 0.07);	// ceil(ÃµÀå) ¼Ò¼öÁ¡ÀÌÇÏ ¿Ã¸², abs - Àý´ë°ª
		if (yMenuTo < yMenuFrom) yOffset = -yOffset;
		hts_AD_flash.style.top = yMenuFrom + yOffset + 20;
	}
	setTimeout ('kst_Tgp_mr()', 5);
}

function kst_Tgp_view(strUrl, numWidth, numHeight) {
	fnFlashPlay(strUrl, numWidth, numHeight) ;
	//var Layer_world = document.getElementById('hts_AD_flash');
	//Layer_world.style.visibility='visible';
	//Layer_world.style.display='';
	kst_Tgp_mr();
}
function getout() { document.all["hts_AD_flash"].style.visibility="hidden"; }

//³»¿ëº¸±â

function blockSchedule(idx)
{
	var objDiv = document.all["div_Schedule"+idx];
	var objImg = document.all["imgDate" + idx];
	
	if (typeof objDiv != "object")
		return;
	
	if (objDiv.style.display == "none")
	{
		objImg.src = "../images/btn/btn_hidden_date.gif";
		objDiv.style.display = "block";
	}
	else
	{
		objImg.src = "../images/btn/btn_view_date.gif";
		objDiv.style.display = "none";
	}
}

//¸ÞÀÎ Ç®´Ù¿î ¸Þ´º Àü¿ë ½ºÅ©¸³Æ®
function MainScrollMenuShowHide()
{
	var objDiv = document.all["MainScrollMenu"];
	
	if (typeof objDiv != "object")
		return;
	
	if (objDiv.style.display == "none")
	{
		objDiv.style.display = "block";
	}
	else
	{
		objDiv.style.display = "none";
	}
}


function blockScheduleDiv(idx)
{
	var objDiv = document.all["div_Schedule"+idx];
	
	if (typeof objDiv != "object")
		return;
	
	if (objDiv.style.display == "none")
	{
		objDiv.style.display = "block";
	}
	else
	{
		objDiv.style.display = "none";
	}
}

function blockScheduleTable(idx)
{
	var objDiv = document.all["table_Schedule"+idx];
	
	if (typeof objDiv != "object")
		return;
	
	if (objDiv.style.display == "none")
	{
		objDiv.style.display = "block";
	}
	else
	{
		objDiv.style.display = "none";
	}
}

function blockSchedule2(idx)
{
	var objDiv2 = document.all["div_Schedule"+idx];
	var objImg2 = document.all["imgDate" + idx];
	
	if (typeof objDiv2 != "object")
		return;
	
	if (objDiv2.style.display == "none")
	{
		objImg2.src = "/images/btn/btn_hidden_date2.gif";
		objDiv2.style.display = "block";
	}
	else
	{
		objImg2.src = "/images/btn/btn_view_date2.gif";
		objDiv2.style.display = "none";
	}
}


function BlockScheduleKalPak(idx)
{
	var objDiv2 = document.all["div_Schedule"+idx];
	var objImg2 = document.all["imgDate" + idx];
	
	if (typeof objDiv2 != "object")
		return;
	
	if (objDiv2.style.display == "none")
	{
		objImg2.src = "images/detail/btn1.gif";
		objDiv2.style.display = "block";
	}
	else
	{
		objImg2.src = "images/detail/btn1.gif";
		objDiv2.style.display = "none";
	}
}

//Å×ÀÌºíÀ» ÀÌ¿ëÇÑ ·¹ÀÌ¾î ±â´É(º¸¿©¾ßµÉ ·¹ÀÌ¾î¹øÈ£, ÃÑ ·¹ÀÌ¾î °¹¼ö)
function fnTableLayerView(idx,Num) {
	for( i=1 ; i <= Num ; i++) {
		var objDiv = document.all["TableLayer"+i];
		//alert(objDiv+"\n\n"+Num+"\n\n"+i)
		if (i == idx) {
			objDiv.style.display = "block";
		} else {
			objDiv.style.display = "none";
		}
	}
}

/////////////////////////////////////////////////½º¿ÒÄÃ·¯//////////////////////////////////////////
function swap_color(obj,color){
	obj.style.backgroundColor=color;			//obj.bgColor=color°ú µ¿ÀÏ
}

function getAddr(OpenType) {
	window.open('/Login/Search_address.asp?OpenType='+OpenType, 'tour', 'left=580,top=20,width=500,height=570,toolbar=no,menubar=no,status=no,scrollbars=yes,resizable=no')
}
	
	function EmailCheck(obj){
		var format = /^((\w|[\-\.])+)@((\w|[\-\.])+)\.([A-Za-z]+)$/;
		return format.test(obj);
	 }

	function viewImg(imgName){
		var imageWin = window.open("/include/imagePop.asp?imgSrc="+ imgName,"imageWin", "resizable=no,top=0,left=0,width=350,height=350");
		imageWin.focus();
	}

function popPkgDes(msg,bak){

	var content ="<table width='300' border='0' cellspacing='0' cellpadding='0'><tr><td colspan='2'><table width='298' border='0' cellpadding='0' cellspacing='1' bgcolor='#FAD14C'><tr><td bgcolor='#FFFBF5'><table width='296' border='0' cellspacing='0' cellpadding='0'><tr><td colspan='2' height='1' bgcolor='#F9F0E3'></td></tr><tr><td width='2' bgcolor='#F9F0E3'></td><td width='294' style='padding-top:5; padding-bottom:3; padding-left:6; padding-right:6;'><font color='90550D'>" + msg + "</font></td></tr></table></td></tr></table></td><td width='2' bgcolor='#f2f2f2'></td></tr><tr><td width='2' height='2'></td><td width='296' bgcolor='#f2f2f2'></td><td bgcolor='#f2f2f2'></td></tr></table>";

	yyy=Yoffset;
	if(ns4){skn.document.write(content);skn.document.close();skn.visibility="visible"}
	if(ns6){document.getElementById("dek").innerHTML=content;skn.display=''}
	if(ie4){document.all("dek").innerHTML=content;skn.display=''}
}

function kill(){
	yyy=-1000;
	if(ns4){skn.visibility="hidden";}
	else if (ns6||ie4)
	skn.display="none"
}


function ignoreSpaces(string) {
	var temp = "";
	string = '' + string;
	splitstring = string.split(" ");
	for(i = 0; i < splitstring.length; i++)
		temp += splitstring[i];
	return temp;
}

function chkNumOnly(objNam) {
	var tmp=objNam.value.replace(/[^0-9]/g, '');
	tmp = tmp * 1 ;
	if (tmp==0)	objNam.value = '' ;
	else objNam.value = tmp ;
}

function viewYunaImg(imgWid,imgSeq) {
	var arrImgseq = imgSeq.split('!') ;
	var tempTbl  = "<table cellpadding='5' cellspcing='0' border='0' align='center'>" ;
	    tempTbl += "  <tr>" ;
	for ( var i=0; i<arrImgseq.length; i++ ) {
		tempTbl  = tempTbl + "  <td><img src='http://www.kaltour.com/event/america/usa/images/yuna" + arrImgseq[i] + ".jpg' border='0' width='" + imgWid + "' style='cursor:hand;' onClick=\"window.open('http://www.kaltour.com/event/america/usa/images/yuna" + arrImgseq[i] + "_l.jpg','yunaImgPop','height=770, width=520, scrollbars=no')\" /></td>"
	}
	    tempTbl  = tempTbl + "</tr>" ;
	    tempTbl += "</table>" ;
	document.write (tempTbl) ;
}

function cx_trim(str){			// trim
    return str.replace(/(^\s*)|(\s*$)/g,"");
}

//-->
