//새창
function resPage() {
	location.href = 'https://www.oceanside.co.kr:40000/en/reservations.html';
}

function gallery() {
	window.open('/kr/etc/gallery.html','gallery','resizable=no,scrollbars=no,status=no,top=0,left=0,width=800,height=450');
}

// 플래시 테두리 없애기	
function flash(c,d,e) {
 var flash_tag = "";
 flash_tag = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
 flash_tag +='codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ';
 flash_tag +='WIDTH="'+c+'" HEIGHT="'+d+'" >';
 flash_tag +='<param name="movie" value="'+e+'">';
 flash_tag +='<param name="WMode" value="Transparent">';
 flash_tag +='<param name="play" value="true">';
 flash_tag +='<param name="loop" value="true">';
 flash_tag +='<param name="menu" value="false">';
 flash_tag +='<param name="quality" value="high">';
 flash_tag +='<embed src="'+e+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" ';
 flash_tag +='type="application/x-shockwave-flash"  WIDTH="'+c+'" HEIGHT="'+d+'"></embed></object>'

 document.write(flash_tag);

}

//큰 이미지 보기 (창크기 자동 조절)	

var imgObj = new Image();
function showImgWin(imgName) {
  imgObj.src = imgName;
  setTimeout("createImgWin(imgObj)", 100);
}
function createImgWin(imgObj) {
  if (! imgObj.complete) {
    setTimeout("createImgWin(imgObj)", 100);
    return;
  }
  imageWin = window.open("", "imageWin",
    "width=" + imgObj.width + ",height=" + imgObj.height);
  imageWin.document.write("<html><body style='margin:0'>");
  imageWin.document.write("<a href=javascript:window.close()><img src='" + imgObj.src + "' border=0></a>");
  imageWin.document.write("</body><html>");
  imageWin.document.title = imgObj.src;
}

// 이미지롤오버
function swapImg() 
{ 
  var img  = event.srcElement; 
  var argu = arguments[0];  
  if(typeof(argu) == "string") 
  {  
    img.onload="";  
      img.attachEvent("onmouseover",swapImg) 
      img.attachEvent("onmouseout" ,swapImg) 
      img.defaultImg = img.src; 
img.overImg    = argu; 
  } 
  else 
  {  
      img.src = (img.src == img.defaultImg )? img.overImg: img.defaultImg ;    
  } 
} 

//셀렉트 바로가기
function goto_byselect(sel, targetstr)
{
  var index = sel.selectedIndex;
  if (sel.options[index].value != '') {
     if (targetstr == 'blank') {
       window.open(sel.options[index].value, 'win1');
     } else {
       var frameobj;
       if (targetstr == '') targetstr = 'self';
       if ((frameobj = eval(targetstr)) != null)
         frameobj.location = sel.options[index].value;
     }
  }
}

//스트링 끊기
function getCutString(str,num,ss)
{
	return str.substring(0,num) + ss;
}

//타입비교 (비교문자 , 비교형식 ; ex: getTypeCheck(string , "1234567890") ) 
function getTypeCheck (s, spc)
{
	var i;

	for(i=0; i< s.length; i++) 
	{
		if (spc.indexOf(s.substring(i, i+1)) < 0) 
		{
			return false;
		}
	}        
	return true;
}

//콤마삽입 (number_format)
function commaSplit(srcNumber) 
{ 
	var txtNumber = '' + srcNumber; 

	var rxSplit = new RegExp('([0-9])([0-9][0-9][0-9][,.])'); 
	var arrNumber = txtNumber.split('.'); 
	arrNumber[0] += '.'; 
	do { 
		arrNumber[0] = arrNumber[0].replace(rxSplit, '$1,$2'); 
	} 
	while (rxSplit.test(arrNumber[0])); 
	if (arrNumber.length > 1) { 
		return arrNumber.join(''); 
	} 
	else { 
		return arrNumber[0].split('.')[0]; 
	} 
}

//콤마제거
function filterNum(str) 
{ 
	re = /^\$|,/g; 
	return str.replace(re, ""); 
}

//날짜format - getDateFormat('20040605121212' , 'xxxx-xx-xx [xx:xx:xx]');
function getDateFormat(date , type)
{
	var ck;
	var rtstr = "";
	var j = 0;
	for(var i = 0; i < type.length; i++) 
	{
		if(type.substring(i,i+1) == 'x')
		{
			rtstr += date.substring(j,j+1);
		}
		else {
			j--;
			rtstr += type.substring(i,i+1);
		}
		j++;
	}
	document.write(rtstr);	
}

//단어 필터링
function CheckWords(words)
{

	if(words.length < 1) return '';

	var BadWordSet = frames.WordFilterFrame.document.body.innerHTML;
	var BadWordArr = BadWordSet.split(',');	
	var BadWordNum = BadWordArr.length;

	for (var i = 0; i < BadWordNum; i++)
	{
		if(words.indexOf(BadWordArr[i]) != -1) return BadWordArr[i];
	}
	return '';
}

//페이징처리
function getPageLink1(lnum,p,tpage,imgpath)
{
	var g_p1 = "<IMG src='"+imgpath+"/prev1.gif' border='0' ALIGN=ABSMIDDLE>";
	var g_p2 = "<IMG src='"+imgpath+"/prev2.gif' border='0' ALIGN=ABSMIDDLE>";
	var g_n1 = "<IMG src='"+imgpath+"/next1.gif' border='0' ALIGN=ABSMIDDLE>";
	var g_n2 = "<IMG src='"+imgpath+"/next2.gif' border='0' ALIGN=ABSMIDDLE>";
	var g_cn = "<IMG src='"+imgpath+"/cutln.gif' border='0' ALIGN=ABSMIDDLE>";
	var g_q  = "";

	if(p < lnum+1) { g_q += g_p1; }
	else{ var pp = parseInt((p-1)/lnum)*lnum; g_q += "<A HREF='javascript:getPageGo1("+pp+");'>"+g_p2+"</A>";} g_q += g_cn;

	var st1 = parseInt((p-1)/lnum)*lnum + 1;
	var st2 = st1 + lnum;

	for(var jn = st1; jn < st2; jn++)
	if ( jn <= tpage)
	(jn == p)? g_q += "<FONT COLOR=RED>"+jn+"</FONT>"+g_cn : g_q += "<A HREF='javascript:getPageGo1("+jn+");'>"+jn+"</A>"+g_cn;

	if(tpage < lnum || tpage < jn) { g_q += g_n1; }
	else{var np = jn; g_q += "<A HREF='javascript:getPageGo1("+np+");'>"+g_n2+"</A>"; }
	
	document.write(g_q);
}

//페이지클릭
function getPageGo1(n)
{ 
	var p   = getUriString1('p');
	var que = location.href.replace('&p='+p,'');
		que = que.indexOf('?') != -1 ? que : que + '?';

	location.href= que + '&p=' + n; 
}

//파라미터값
function getUriString1(param)
{
	var QuerySplit = location.href.split('?');
	var ResultQuer = QuerySplit[1] ? QuerySplit[1].split('&') : '';

	for (var i = 0; i < ResultQuer.length; i++)
	{
		var keyval = ResultQuer[i].split('=');
		if (param == keyval[0]) return keyval[1];
	}
	return "";
}
//레이어 보이기
function  showAdd(n)
{
	var sm = document.getElementById('add_'+n);
	if (sm.style.display == 'none') sm.style.display = 'block';
	else  sm.style.display = 'none';
}

function bluring(){ 
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") 
	document.body.focus(); 
} 
document.onfocusin=bluring; 

//var Ovr2='';if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat'){cot_t1_DOCtp="_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);}";}else{cot_t1_DOCtp="_top:expression(document.body.scrollTop+document.body.clientHeight-this.clientHeight);_left:expression(document.body.scrollLeft + document.body.clientWidth - offsetWidth);}";}if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat'){cot_t1_DOCtp2="_top:expression(document.documentElement.scrollTop-20+document.documentElement.clientHeight-this.clientHeight);}";}else{cot_t1_DOCtp2="_top:expression(document.body.scrollTop-20+document.body.clientHeight-this.clientHeight);}";}var cot_bgf0="http://www.hotelincheonairport.com/en/image/cot_bgf0.gif";
//var cot_tl_bodyCSS='* html {background:url('+cot_bgf0+') fixed;background-repeat: repeat;background-position: right bottom;}';var cot_tl_fixedCSS='#cot_tl_fixed{position:fixed;';var cot_tl_fixedCSS=cot_tl_fixedCSS+'_position:absolute;';var cot_tl_fixedCSS=cot_tl_fixedCSS+'bottom:0px;';var cot_tl_fixedCSS=cot_tl_fixedCSS+'right:0px;';var cot_tl_fixedCSS=cot_tl_fixedCSS+'clip:rect(0 100 85 0);';var cot_tl_fixedCSS=cot_tl_fixedCSS+cot_t1_DOCtp;var cot_tl_popCSS='#cot_tl_pop {background-color: transparent;';var cot_tl_popCSS=cot_tl_popCSS+'position:fixed;';var cot_tl_popCSS=cot_tl_popCSS+'_position:absolute;';var cot_tl_popCSS=cot_tl_popCSS+'height:194px;';var cot_tl_popCSS=cot_tl_popCSS+'width: 244px;';var cot_tl_popCSS=cot_tl_popCSS+'right: 120px;';var cot_tl_popCSS=cot_tl_popCSS+'bottom: 20px;';var cot_tl_popCSS=cot_tl_popCSS+'overflow: hidden;';var cot_tl_popCSS=cot_tl_popCSS+'visibility: hidden;';var cot_tl_popCSS=cot_tl_popCSS+'z-index: 100;';var cot_tl_popCSS=cot_tl_popCSS+cot_t1_DOCtp2;document.write('<style type="text/css">'+cot_tl_bodyCSS+cot_tl_fixedCSS+cot_tl_popCSS+'</style>');function cot_tl_bigPopup(url){newwindow=window.open(url,'name','WIDTH=450,HEIGHT=500,FRAMEBORDER=0,MARGINWIDTH=0,MARGINHEIGHT=0,SCROLLING=no,allowtransparency=true');if(window.focus){newwindow.focus()}return false;}function cot_tl_toggleMiniPOPUP_hide(){var cred_id='cot_tl_pop';var NNtype='hidden';var IEtype='hidden';var WC3type='hidden';if(document.getElementById){eval("document.getElementById(cred_id).style.visibility=\""+WC3type+"\"");}else{if(document.layers){document.layers[cred_id].visibility=NNtype;}else{if(document.all){eval("document.all."+cred_id+".style.visibility=\""+IEtype+"\"");}}}}function cot_tl_toggleMiniPOPUP_show(){cred_id='cot_tl_pop';var NNtype='show';var IEtype='visible';var WC3type='visible';if(document.getElementById){eval("document.getElementById(cred_id).style.visibility=\""+WC3type+"\"");}else{if(document.layers){document.layers[cred_id].visibility=NNtype;}else{if(document.all){eval("document.all."+cred_id+".style.visibility=\""+IEtype+"\"");}}}}function COT(cot_tl_theLogo,cot_tl_LogoType,LogoPosition,theAffiliate){host=location.host;if(window.location.protocol.toLowerCase()=="https:"){var cot_tl_miniBaseURL='https://secure.comodo.net/ttb_searcher/trustlogo?v_querytype=C&v_shortname='+cot_tl_LogoType+'&v_search='+host+'&x=6&y=5';var cot_tl_bigBaseURL='https://secure.comodo.net/ttb_searcher/trustlogo?v_querytype=W&v_shortname='+cot_tl_LogoType+'&v_search='+host+'&x=6&y=5';}else{var cot_tl_miniBaseURL='http://www.trustlogo.com/ttb_searcher/trustlogo?v_querytype=C&v_shortname='+cot_tl_LogoType+'&v_search='+host+'&x=6&y=5';var cot_tl_bigBaseURL='http://www.trustlogo.com/ttb_searcher/trustlogo?v_querytype=W&v_shortname='+cot_tl_LogoType+'&v_search='+host+'&x=6&y=5';};document.write('<div id="cot_tl_pop">');document.write('<IFRAME src="'+cot_tl_miniBaseURL+'" WIDTH=244 HEIGHT=194 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=no allowtransparency=true></IFRAME>');document.write('</div>');document.write('<div id="cot_tl_fixed">');document.write('<a href="http://www.instantssl.com" onClick="return cot_tl_bigPopup(\''+cot_tl_bigBaseURL+'\')"><img src='+cot_tl_theLogo+' alt="SSL Certificate" border="0" onMouseOver="Ovr=setTimeout(\'cot_tl_toggleMiniPOPUP_show()\',1000);clearTimeout(Ovr2)" onMouseOut="Ovr2=setTimeout(\'cot_tl_toggleMiniPOPUP_hide()\',3000);clearTimeout(Ovr)"</a>');document.write('</div>');}