///È£ÅÚÀÚ¼¼È÷º¸±â
function QuickViewHotel(con, city, hcd) {
location.href="hotel_detail.php?hcd="+hcd+"&s_country="+con+"&s_city="+city+"&rm_doublecd=1&mode=detail";
return;
}


//ÆË¾÷
function getCookie(Name) {
  var search = Name + "="
  if (document.cookie.length > 0) { // ÄíÅ°°¡ ¼³Á¤µÇ¾î ÀÖ´Ù¸é
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // ÄíÅ°°¡ Á¸ÀçÇÏ¸é
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset)
      // ÄíÅ° °ªÀÇ ¸¶Áö¸· À§Ä¡ ÀÎµ¦½º ¹øÈ£ ¼³Á¤
      if (end == -1)
        end = document.cookie.length
      return unescape(document.cookie.substring(offset, end))
    }
  }
}
function openNotice() {
  if (getCookie("notice") != "deny") {
    window.open("http://www.ticketstation.co.kr/popup/popup.php","notice",
      "width=376,height=489,resizable=yes");
  }
  self.name = "jenny";// names current window as "main"
}



// flashWrite(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î, ¾ÆÀÌµð, ¹è°æ»ö, º¯¼ö, À©µµ¿ì¸ðµå)
function flashWrite(url,w,h,id,bg,vars,win){

	// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ
	var flashStr=
	"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
	"<param name='allowScriptAccess' value='always'>"+
	"<param name='movie' value='"+url+"'>"+
	"<param name='FlashVars' value='"+vars+"'>"+
	"<param name='wmode' value='"+win+"'>"+
	"<param name='menu' value='false'>"+
	"<param name='quality' value='high'>"+
	"<param name='bgcolor' value='"+bg+"'>"+
	"<embed src='"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'>"+
	"</object>";

	// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
	document.write(flashStr);

}


///////////////////////////////////////////////////////////////////////////////////////////////

/////// IE ¾÷±×·¹ÀÌµå Àû¿ë

function __ws__(id){
document.write(id.text);id.id='';
}

//¹®ÀÚÅ¸ÀÔ Ã¼Å©

///////////////////////////////////////////////////////////////////////////

var NUM = "0123456789"; 
var SALPHA = "abcdefghijklmnopqrstuvwxyz";
var ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"+SALPHA;
var SPACE = " ";
var N_ALPHA = NUM + ALPHA;

////////////////////////////////////////////////////////////////////////////////
function TypeCheck (s, spc) {
var i;

for(i=0; i< s.length; i++) {
if (spc.indexOf(s.substring(i, i+1)) < 0) {
return false;
}

}        
return true;
}

////////////////////////////////////////////////////////////////////////////////

//°ø¹é¹®ÀÚ ¾ø¾Ö±â

function ignoreSpaces(string) {
var temp = "";
string = '' + string;
splitstring = string.split(" ");
for(i = 0; i < splitstring.length; i++)
temp += splitstring[i];
return temp;
}

/////////////////////////////////////////////////////////////

function EmailChange2()
{
	var f = document.WriteForm;
	var value=f.domain[f.domain.selectedIndex].value;

	if( value != ""){
		f.emailaddr.disabled = false;
		f.emailaddr.value=value;	}
	else{
		f.emailaddr.disabled = false; 	}
        f.emailaddr.value=value;
        f.emailid.focus();
	return;
}
//////////////////////////////////////////////////////////////


//»õÃ¢¶ç¿ì±â
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//¿ìÆí¹øÈ£Ã£±â
function OpenZipcode() {
window.open('../../pack/zipcode/zipcode.php?form=WriteForm&address=address&zip1=zip1&zip2=zip2','zip_win','width=460,height=550,statusbar=no,scrollbars=yes,toolbar=no');
}


//¿ìÆí¹øÈ£Ã£±â
function OpenZipcode2() {
window.open('../../pack/zipcode/zipcode.php?form=WriteForm&address=address2&zip1=zip12&zip2=zip22','zip_win','width=460,height=550,statusbar=no,scrollbars=yes,toolbar=no');
}


//Á¤¸»»èÁ¦ ÇÒ·¡¿ä
function really(){
if (confirm('Á¤¸»·Î »èÁ¦ÇÏ½Ã°Ú½À´Ï±î? »èÁ¦´Â º¹±¸°¡ ºÒ°¡´ÉÇÕ´Ï´Ù.')) return true;
return false;
}

//Á¤¸»»èÁ¦ ÇÒ·¡¿ä
function Cancelreally() {
if (confirm('Á¤¸»·Î ¿¹¾àÃë¼ÒÇÏ½Ã°Ú½À´Ï±î? Ãë¼Ò¿äÃ»Àº º¹±¸°¡ ºÒ°¡´ÉÇÕ´Ï´Ù.')) return true;
return false;
}





//////////////////////////////////  »óÇ°°ü¸®ÀÚ¿ë

//È£ÅÚ¸µÅ©
//function SearchHotel(country,city) {
//url="hotel_list.php?s_country="+country+"^s_city="+city ;  //&´ë½Å ^ ·Î ±¸ºÐÇÒ°Í
//location.href="./loading.php?url="+url;
//return;
//}

function SearchHotel(country,city) {
location.href="./hotel_list.php?s_country="+country+"&s_city="+city ;
return;
}

function SearchHotelDetail(country,city,checkinDate,duration,grade,roomtype,roomc,hlocation,sortvar) {
location.href="./hotel_list.php?s_country="+country+"&s_city="+city+"&checkinDate="+checkinDate+"&duration="+duration+"&grade="+grade+"&roomtype="+roomtype+"&roomc="+roomc+"&hlocation="+hlocation+"&sortvar="+sortvar ;
return;
}

//Æ÷Åä°¶·¯¸® ¿¬°á
function FindPHOTO(gr,cate) {
window.open('./photo_find.php?gr='+gr+'&cate='+cate,'photo_win','width=480,height=550,statusbar=no,scrollbars=yes,toolbar=no');
return;
}

//È£ÅÚ¿¬°á
function FindHOTEL(gr,cate1,cate2,htype) {
window.open('./hotel_find.php?gr='+gr+'&cate1='+cate1+'&cate2='+cate2+'&htype='+htype,'hotel_win','width=520,height=550,statusbar=no,scrollbars=yes,toolbar=no');
return;
}

//°ñÇÁÀå ¿¬°á
function OpenGOLF() {
window.open('./golf_list.php?form=WriteForm&goods_photo=goods_photo','photo_win','width=460,height=550,statusbar=no,scrollbars=yes,toolbar=no');
return;
}

//¼±ÅÃ°ü±¤
function OpenCHOICE() {
window.open('./golf_list.php?form=WriteForm&goods_photo=goods_photo','photo_win','width=460,height=550,statusbar=no,scrollbars=yes,toolbar=no');
return;
}

//¼îÇÎÁ¤º¸
function OpenSHOPPING() {
window.open('./golf_list.php?form=WriteForm&goods_photo=goods_photo','photo_win','width=460,height=550,statusbar=no,scrollbars=yes,toolbar=no');
return;
}


//ÀÏÁ¤Ç¥ ¹Ì¸®º¸±â
function OpenSCH(gcd,view) {
window.open('./sch_preview.php?viewType='+view+'&gcd='+gcd,'PREVIEW','width=720,height=550,statusbar=no,scrollbars=yes,toolbar=no');
return;
}


//ÀÌ¹ÌÁö Å©±â ¸¸Å­ À©µµ¿ì »õÃ¢¶ç¿ì±â//////////////////////////

function CaricaFoto(img){ 
foto1= new Image(); 
foto1.src=(img); 
Controlla(img); 
} 
function Controlla(img){ 
if((foto1.width!=0)&&(foto1.height!=0)){ 
viewFoto(img); 
} 
else{ 
funzione="Controlla('"+img+"')"; 
intervallo=setTimeout(funzione,20); 
} 
} 

function viewFoto(img){ 
largh=foto1.width+20; 
altez=foto1.height+20; 
stringa="width="+largh+",height="+altez; 
finestra=window.open(img,"",stringa); 
} 

////////////////////////////////////////////////////////////////



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 NextFocus(prev,val,next)
{
	if(document.getElementById(prev).value.length==val)
	{
		document.getElementById(next).focus();
	}
}

/////////////////////////////////////////////////////////////////////////////

function donghwadetail()
{	
	var url = "http://www.ondutyfree.com/coupon/9224/ticketstation.htm";
	noticeWindow  =  window.open(url, 'notice', "toolbar=no, menubar=no, width=670, height=550, scrollbars=yes");
	noticeWindow.opener = self; 
}


/////////////////////////////////////////////////////////////////////////////

