<!--

var msbrowser = (navigator.userAgent.indexOf('MSIE') > -1 && navigator.userAgent.indexOf('Opera') == -1)? true:false;

/////  Cache ÃÊ±âÈ­
var initCache = Math.floor(Math.random()*9999999999);

function getCookieVal (offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
		endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function sgGetCookie (name)  {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen)  {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
			return getCookieVal (j);i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break;
	}
	return "";
}

var ret_url = String(window.location);
var encode_ret_url = escape(ret_url);

/////  Å¥ºñ¾ÆÀÌµð
var qubi_mode = sgGetCookie("qubi_mode");
var qubi_id = sgGetCookie("qubi_id");
var qubi_name = sgGetCookie("qubi_name");
var korail_name = sgGetCookie("korail_name");
var korail_mode = sgGetCookie("korail_mode");

var objName = "railplus";
var sg_url = "http://file.qubi.com/sg_framework/";
var barota_url = "http://ret.qubi.com";
var sg_top_url = sg_url + "sg_framework_top/season2/" + objName + "/";
var sg_common_url = sg_url + "sg_framework_top/season2/common/";
var sg_default_img = sg_url + "sg_framework_img/season2/sg_eticket/";
var sg_common_img = sg_url + "sg_framework_img/season2/sg_common/";
var sg_banner_url = sg_url + "sg_framework_img/season2/banner/";


/* ****************** ¿¹¾à½Ã½ºÅÛ URL ******************* */
var selectedImg;
var seletedView;
var seletedobjN;
var imgPath = sg_default_img + 'common/';

function sg_rollover(obj,changeImg){
	obj.src = sg_default_img+changeImg;
}

function eventQubiPress(e) {
	if ( navigator.userAgent.indexOf("Firefox") > -1 ) {
		if ( e.which == 13 ) {
			retQubiSearch();
		}
	} else {
		if ( e.keyCode == 13 ) {
			retQubiSearch();
		}
	}
}

function retQubiSearch() {
	var word = document.getElementById("keyword").value.replace(/\s/g,"");
	if ( word == "" ) {
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä!");
		document.getElementById("keyword").focus();
		return;
	} else {
		word = document.getElementById("keyword").value;
		document.getElementById("qubi_search").innerHTML = "<form name='search' method='get' target='_top'><input type='hidden' name='mode' value='A'><input type='hidden' name='from' value=''><input type='hidden' name='to' value=''><input type='hidden' name='sort' value=''><input type='hidden' name='api' value=''><input type='hidden' name='page' value='1'><input type=hidden name='category' value='" + document.getElementById("category").value + "'><input type=hidden name='keyword' value=''></form>";
		document.search.keyword.value = word;
		document.search.action = "http://search.qubi.com/index.jsp";
		document.search.submit();
	}
}

var script=document.createElement("script");

var sz_top = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">";
	sz_top += "<HTML>";
	sz_top += "<HEAD>";
	sz_top += "<TITLE>¢Æ¢Æ Ã£¾Æ°¡´Â Áñ°Å¿ò, QUBI ¢Æ¢Æ<"+"/TITLE>";
	sz_top += "<meta http-equiv='Content-Type' content='text/html; charset=euc-kr' />";
	sz_top += "<link href=\"" + sg_common_url + "common.css\" type=text/css rel=stylesheet>";
	sz_top += "<link href=\"" + sg_common_url + "tour.css\" type=text/css rel=stylesheet>";
	sz_top += "<script src=\"http://tour.qubi.com/js/AC_RunActiveContent.js\" type=\"text/javascript\"></script>";
	sz_top += "<style type='text/css'>";
	sz_top += "#apDiv1 {position:absolute; width:40; height:40; z-index:1;}";
	sz_top += "#apDiv2 {position:absolute; width:40; height:40; z-index:1;}";
	sz_top += "</style>";

	sz_top += "</HEAD>";
	sz_top += "<BODY>";
	sz_top += "<table width=\"100%\" height=\"100%\" cellspacing=\"0\" cellpadding=\"0\">";
	sz_top += "<tr><td align=\"center\" valign=\"top\">";
	sz_top += "<table width=\"960\" cellspacing=\"0\" cellpadding=\"0\">";
	sz_top += "<tr><td class=\"logo_top\">";
	sz_top += "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">";
	sz_top += "<tr><td>";
	sz_top += "<table cellspacing=\"0\" cellpadding=\"0\">";
	sz_top += "<tr><td><a href=\"http://www.qubi.com\"><img src=\"" + sg_common_img + "logo.jpg\"></a></td><td width=\"17\" align=\"center\"><img src=\"" + sg_common_img + "logo_bar.gif\"></td><td><a href=\"http://eticket.qubi.com\"><img src=\"" + sg_default_img + "logo.gif\"></a></td></tr>";
	sz_top += "</table></td>";
	//sz_top += "<td colspan=2 style=\"background:url(" + sg_default_img + "top_banner.jpg) no-repeat;\" align=\"right\" valign=\"top\">";
	sz_top += "<td colspan=2 align=\"right\" valign=\"top\">";

	sz_top += "<table cellspacing=\"0\" cellpadding=\"0\"><tr><td id=\"qubi_global\" style=\"padding:0 0 3 0;\"></td></tr></table>";
	sz_top += "</td></tr></table></td></tr>";
	
	sz_top += "<tr><td height=\"115\" valign=\"top\" class=\"top_con\" style=\"width:960px;background-image:url(" + sg_common_img + "top.jpg) ; background-repeat:no-repeat ; background-position:center\"><table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">";
	sz_top += "<tr><td><table cellspacing=\"0\" cellpadding=\"0\"><tr>";

	sz_top += "<td><a href=\"javascript:goQubiTabMenu(1);\" onMouseOut='MM_swapImgRestore()' onMouseOver=\"MM_swapImage('menu_top01','','" + sg_default_img + "ret_menu01_o.jpg',1)\"><img id='menu_top01' src=\"" + sg_default_img + "ret_menu01.jpg\"></a></td><td><img src=\"" + sg_common_img + "menu_bar.jpg\" hspace=\"0\"></td>";
	sz_top += "<td><a href=\"javascript:goQubiTabMenu(2);\" onMouseOut='MM_swapImgRestore()' onMouseOver=\"MM_swapImage('menu_top02','','" + sg_default_img + "ret_menu02_o.jpg',1)\"><img id='menu_top02' src=\"" + sg_default_img + "ret_menu02.jpg\"></a></td><td><img src=\"" + sg_common_img + "menu_bar.jpg\" hspace=\"0\"></td>";
	sz_top += "<td><a href=\"javascript:goQubiTabMenu(7);\" onMouseOut='MM_swapImgRestore()' onMouseOver=\"MM_swapImage('menu_top07','','" + sg_default_img + "ret_menu07_o.jpg',1)\"><img id='menu_top07' src=\"" + sg_default_img + "ret_menu07.jpg\"></a></td><td><img src=\"" + sg_common_img + "menu_bar.jpg\" hspace=\"0\"></td>";
	sz_top += "<td><a href=\"javascript:goQubiTabMenu(8);\" onMouseOut='MM_swapImgRestore()' onMouseOver=\"MM_swapImage('menu_top08','','" + sg_default_img + "ret_menu08_o.gif',1)\"><img id='menu_top08' src=\"" + sg_default_img + "ret_menu08.gif\"></a></td><td><img src=\"" + sg_common_img + "menu_bar.jpg\" hspace=\"0\"></td>";
	sz_top += "<td><a href=\"javascript:goQubiTabMenu(9);\" onMouseOut='MM_swapImgRestore()' onMouseOver=\"MM_swapImage('menu_top09','','" + sg_default_img + "ret_menu09_o.gif',1)\"><img id='menu_top09' src=\"" + sg_default_img + "ret_menu09.gif\"></a></td><td><img src=\"" + sg_common_img + "menu_bar.jpg\" hspace=\"0\"></td>";
	sz_top += "<td><a href=\"javascript:goQubiTabMenu(3);\" onMouseOut='MM_swapImgRestore()' onMouseOver=\"MM_swapImage('menu_top03','','" + sg_default_img + "ret_menu03_o.jpg',1)\"><img id='menu_top03' src=\"" + sg_default_img + "ret_menu03.jpg\"></a></td><td><img src=\"" + sg_common_img + "menu_bar.jpg\" hspace=\"0\"></td>";	
	sz_top += "<td><a href=\"javascript:goQubiTabMenu(11);\" onMouseOut='MM_swapImgRestore()' onMouseOver=\"MM_swapImage('menu_top11','','" + sg_default_img + "ret_menu11_o.jpg',1)\"><img id='menu_top11' src=\"" + sg_default_img + "ret_menu11.jpg\"></a></td><td><img src=\"" + sg_common_img + "menu_bar.jpg\" hspace=\"0\"></td>";
	sz_top += "<td><a href=\"javascript:goQubiTabMenu(5);\" onMouseOut='MM_swapImgRestore()' onMouseOver=\"MM_swapImage('menu_top05','','" + sg_default_img + "ret_menu05_o.jpg',1)\"><img id='menu_top05' src=\"" + sg_default_img + "ret_menu05.jpg\"></a></td><td><img src=\"" + sg_common_img + "menu_bar.jpg\" hspace=\"0\"></td>";
	sz_top += "<td><a href=\"javascript:goQubiTabMenu(6);\" onMouseOut='MM_swapImgRestore()' onMouseOver=\"MM_swapImage('menu_top06','','" + sg_default_img + "ret_menu06_o.jpg',1)\"><img id='menu_top06' src=\"" + sg_default_img + "ret_menu06.jpg\"></a></td></tr></table></td>";

	sz_top += "<td align=\"right\"><table cellspacing=\"0\" cellpadding=\"0\">";
	sz_top += "<tr>";
	sz_top += "<td><a href=\"http://ret.qubi.com/qubi/pc/pc51100/familycard_info.html\"><img src=\"" + sg_default_img + "btn_trip.gif\" border=0 hspace=\"5\"></a><td>";
	sz_top += "<td><a href='http://eticket.qubi.com/railplus/index.jsp'><img src=\"" + sg_default_img + "btn_rail.gif\"></a></td></tr></table></td></tr>";

	sz_top += "<tr><td colspan=\"2\" valign=\"bottom\"><table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">";
	sz_top += "<tr><td width=\"220\" height=\"59\" align=\"left\" style=\"padding-top:6px;\"><iframe id='ad_cp_01' name='ad_cp_01' src='http://file.qubi.com/sg_framework/sg_framework_top/season2/adserver_cp_001.html' width='200' height='45' marginheight='0' marginwidth='0' scrolling='no' frameborder='0' allowtransparency='true' style='display:;'></iframe></td>";
	sz_top += "<td align=\"center\"><table cellspacing=\"0\" cellpadding=\"0\">";

	sz_top += "<tr><td><select id='category' style='font-family:Dotum;font-size:12px;width:100px;background-color:#F2F5F9;height:20px;'><option value='A'>ÅëÇÕ°Ë»ö</option><option value='G'>ºí·Î±×</option><option value='E'>¿©ÇàÁ¤º¸</option><option value='F'>¿©ÇàÁö½Ä</option><option value='H'>¿©Çà»óÇ°</option><option value='I'>¼÷¹Ú»óÇ°</option><option value='Q'>ÃàÁ¦À¥Áø</option><option value='L'>µ¿¿µ»ó</option><option value='N'>ÀÌ¹ÌÁö</option><option value='O'>´º½º</option><option value='R'>Å¥ºñ¼­ºñ½º</option></select></td><td width=\"2\" id='qubi_search'></td>";
	sz_top += "<td><input id='keyword' type='text' style='width:240px;border: 1px solid #a0bcde; font-family: Dotum; font-size: 12px; color: #777777; height:20px; padding-top:3px; ime-mode:active;' onkeydown='eventQubiPress(event);'></td><td width=\"2\"></td>";
	sz_top += "<td style='padding:1 0 0 0;'><img src=\"" + sg_common_img + "btn_search.jpg\" width=55 height=20 border=0 onclick=\"javascript:retQubiSearch();\" style=\"cursor:pointer;\"></td></tr>";

	sz_top += "</table></td><td width=\"220\" align=\"right\" style=\"padding-top:6px;\"><iframe id='ad_cp_02' name='ad_cp_02' src='http://file.qubi.com/sg_framework/sg_framework_top/season2/adserver_cp_002.html' width='200' height='45' marginheight='0' marginwidth='0' scrolling='no' frameborder='0' allowtransparency='true' style='display:;'></iframe></td></tr>";
	sz_top += "</table></td></tr>";
	sz_top += "<tr><td height=\"21\" colspan=\"2\" valign=\"bottom\"><table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">";
	sz_top += "<tr><td><div id='qubi_bnr_roll_left' style='height:18px;'></td>";
	sz_top += "<td align='left' style='text-align:left;padding:1 0 0 0;'><img src='" + sg_common_img + "wwwbl_arrow.gif' style='vertical-align:middle;'><font style='font-family:Dotum;font-size:12px;color:#ffffff;font-weight:bold;cursor:pointer;' onclick=\"location.href='http://eticket.qubi.com/rt/index.jsp';\"> Å¥ºñÈ¸¿ø ±ÝÈ£·»ÅÍÄ« 40% ¹«Á¶°Ç ÇÒÀÎ</font></td>";
	sz_top += "<td align='right' style='text-align:right;padding:1 0 0 0;'><img src='" + sg_common_img + "wwwbl_arrow.gif' style='vertical-align:middle;'><font style='font-family:Dotum;font-size:12px;color:#ffffff;font-weight:bold;cursor:pointer;' onclick=\"location.href='http://air.qubi.com/index.jejudo';\"> Á¦ÁÖµµ Ç×°ø¿ä±Ý ÃÖ°í 50% ÇÒÀÎ</font></td></tr></table></td></tr></table></td></tr>";
	sz_top += "<tr><td class=\"height15\"></td></tr>";
	sz_top += "<tr><td>";


document.write(sz_top);

/* »ó´Ü ÅÇ¸Þ´º */
function goQubiTabMenu(id) {
	switch ( id ) {
		case 1:
			location.href = "http://eticket.qubi.com";
			break;
		case 2:
			location.href = "http://ret.qubi.com/qubi/pr/pr21100/w_pr21110.jsp";
			break;
		case 3:
			location.href = "http://worldrail.qubi.com";
			break;		
		case 5:
			location.href = "http://eticket.qubi.com/bus/TR_BUS.jsp";
			break;
		case 6:
			location.href = "http://eticket.qubi.com/rt/index.jsp";
			break;
		case 7: 
			location.href = "http://ship.qubi.com";
			break;
		case 8: 
			location.href = "http://air.qubi.com";
			break;
		case 9: 
			location.href = "http://072.qubi.com";
			break;
		case 11: 
			location.href = "http://tourbus.qubi.com";
			break;
	}
}

if ( msbrowser ) {

	script=document.createElement("script");
	script.src = sg_common_url+"common.js?ver=" + initCache;
	document.getElementsByTagName("head")[0].appendChild(script);

	/////  ±Û·Î¹ú¸Þ´º CSS
	script = document.createElement("link");
	script.href = sg_common_url + "global.css";
	script.rel = "stylesheet";
	script.type = "text/css";
	document.getElementsByTagName("head")[0].appendChild(script);

	///// Å¥ºñ ±Û·Î¹ú¸Þ´º
	script = document.createElement("script");
	script.src = sg_common_url + "global.js?ver=" + initCache;
	document.getElementsByTagName("head")[0].appendChild(script);

	///// °Ë»öÃ¢ ·Ñ¸µ
	script = document.createElement("script");
	script.src = sg_common_url + "rolling_ajax.js";
	document.getElementsByTagName("head")[0].appendChild(script);

}
-->