﻿function openPop(VN){
   var url="";
   switch(VN){
   		case 1:
			url="/Html/event/C1.html";
		break;
		case 2:
			url="/Html/event/C2.html";
		break;
		case 3:
			url="/Html/event/C3.html";
		break;
		case 4:
			url="/Html/event/C4.html";
		break;
   }
   window.open(url,"popup","left=0,top=0,width=480,height=600,directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,status=no,titlebar=no,toolbar=no");
}

function ObjLoad(commentId)
{
	document.write(commentId.innerHTML);
	commentId.id="";
}

function Viewshop(VR){
	for(var i=1;i<5;i++){
		eval("document.all.div_shop0"+i+".style").display = "none";
	}
	eval("document.all.div_shop0"+VR+".style").display = "";
}
function ViewshopSki(VR){
	for(var i=1;i<8;i++){
		eval("document.all.div_shop0"+i+".style").display = "none";
	}
	eval("document.all.div_shop0"+VR+".style").display = "";
}

function ViewshopHuis(VR){
	for(var i=1;i<5;i++){
		eval("document.all.div_shop0"+i+".style").display = "none";
	}
	eval("document.all.div_shop0"+VR+".style").display = "";
}

var hpyy=1;
var pyy=1;
function swapHotel(vr){
	hp=vr;
	document.hhpp.src="/newslt/images/0612/hp0"+hp+".gif";
}
function swapPGnext(){
	p++;
	if(p>20){
		p=1;
	}
	document.ppgg.src="/newslt/images/0612/pg"+p+".gif";
}
function swapPGpre(){
	p--;
	if(p<1){
		p=20;
	}
	document.ppgg.src="/newslt/images/0612/pg"+p+".gif";
}


function ObjLoad(commentId)
{
	document.write(commentId.innerHTML);
	commentId.id="";
}

//
function cnj(id,after) 
{ 
eval(id+'.filters.blendTrans.stop();'); 
eval(id+'.filters.blendTrans.Apply();'); 
eval(id+'.src="'+after+'";'); 
eval(id+'.filters.blendTrans.Play();'); 
}

//
function clearField(field){
	if (field.value == field.defaultValue) {
		field.value = '';
	}
}
function checkField(field){
	if (field.value == '') {
		field.value = field.defaultValue;
	}
}


//
var refer=true;
function combo() {
if (refer) {
  document.all.contents.style.visibility="visible";
  refer=false;
}
else {
  document.all.contents.style.visibility="hidden";
  refer=true;
}
}

// 
function scroll(){
    var a=document.body.scrollTop+302
        // 
    menu.style.top=a
}

//
function ryokan01(url, target, width, height, top, left)
{
	window.open(url, target, "width=" + width + ",height=" + height + ",top=" + top + ",left=" + left +",status=1,scrollbars=1,resizable=0");
}

function tokyo_guide()
{
	location.href='/Page/common/commonness.aspx?master=46&=1&content=29';
	//window.open('/html/jproad/narita/narita_tokyo_road01.html', '', 'toolbar=no,status=no,resizable=0,width=1018,height=740,left=80,top=80');
}

function pop01()
{
	window.open('login01.htm', '', 'toolbar=no,status=no,resizable=0,width=425,height=350,left=80,top=80');
}

function pop02()
{
	window.open('login04.htm', '', 'toolbar=no,status=no,resizable=0,width=425,height=350,left=80,top=80');
}
function pop_ques()
{
	window.open('pop_ques.htm', '', 'toolbar=no,status=no,resizable=0,width=560,height=510,left=80,top=80');
}
function pop_story()
{
	window.open('pop_story.htm', '', 'toolbar=no,status=no,resizable=0,width=540,height=560,left=80,top=80');
}

function popupMovie(url) {
	var SearchWindow;
	SearchWindow = window.open(url, "MovieWindow", 
      "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=580,height=385");
	SearchWindow.focus();
 }


function company()
{
	SearchWindow = window.open("Summery/Command/popup_company.htm", "SearchWindow",  "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=336,height=284");
	SearchWindow.focus();
}

function popup01()
	{
		SearchWindow = window.open("personal_popup.htm", "popup01",  "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,copyhistory=0,width=680,height=490,left=50, top=50");
		SearchWindow.focus();
	}
function id()
	{
		SearchWindow = window.open("id_check.html", "popup01",  "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=428,height=253,left=50, top=50");
		SearchWindow.focus();
	}
function add()
	{
		SearchWindow = window.open("address.html", "popup01",  "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=428,height=365,left=50, top=50");
		SearchWindow.focus();
	}
function roomtype()
	{
		SearchWindow = window.open("pop_room.htm", "popup01",  "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=650,height=365,left=50, top=50");
		SearchWindow.focus();
	}
function movie()
	{
		SearchWindow = window.open("pop_movie.htm", "popup01",  "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=650,height=567,left=50, top=50");
		SearchWindow.focus();
	}
function pop_gallery()
	{
		SearchWindow = window.open("pop_gallery.htm", "popup01",  "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=700,height=620,left=50, top=50");
		SearchWindow.focus();
	}	
	
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];}
}

<!-- //여행정보 환전 faq부분(영선이가 추가함) -->	

/************************************************************************ 
Author: Eric Simmons
Contact: info@jswitch.com
Browser Target: Mozilla 6+/FireFox Netscape 6+, IE 5.0+
Type : XP style sliding dropdown menus (aka Switch Menu II on Dynamicdrive.com)
Note: Modification by Dynamicdrive.com to dynamically determine sub menus widths
***********************************************************************/
var TIMER_SLIDE = null;
var OBJ_SLIDE;
var OBJ_VIEW;
var PIX_SLIDE = 10; //this is the amount of slide/DELAY_SLIDE
var NEW_PIX_VAL;
var DELAY_SLIDE = 30; //this is the time between each call to slide
var DIV_HEIGHT = 22; //value irrelevant
var SUB_MENU_NUM =0;
var RE_INIT_OBJ = null;
var bMenu = document.getElementById("curMenu");
var MainDiv,SubDiv

//DD added code
document.write('<div id="tempcontainer" class="mainDiv" style="visibility: hidden; position: absolute"></div>')

function Init(objDiv)
{
    if (TIMER_SLIDE == null)
    {
        SUB_MENU_NUM = 0;
        MainDiv = objDiv.parentNode;
        SubDiv =  MainDiv.getElementsByTagName("DIV").item(0);
        SubDiv.onclick = SetSlide;
        
        OBJ_SLIDE = MainDiv.getElementsByTagName("DIV").item(1)
        OBJ_VIEW = OBJ_SLIDE.getElementsByTagName("DIV").item(0);

                document.getElementById("tempcontainer").innerHTML=MainDiv.getElementsByTagName("DIV").item(2).innerHTML //DD added code
                DIV_HEIGHT=document.getElementById("tempcontainer").offsetHeight //DD added code
        
        for (i=0;i<OBJ_VIEW.childNodes.length;i++)
        {
            if (OBJ_VIEW.childNodes.item(i).tagName == "SPAN")
            {
                SUB_MENU_NUM ++;
                OBJ_VIEW.childNodes.item(i).onmouseover= ChangeStyle;
                OBJ_VIEW.childNodes.item(i).onmouseout= ChangeStyle;
            }
        }   
        
              NEW_PIX_VAL = parseInt(MainDiv.getAttribute("state")); 
    }

}
function SetSlide()
{   
            if (window.TIMER_SLIDE) clearInterval(TIMER_SLIDE) //DD added code
      if (TIMER_SLIDE == null && this.parentNode == MainDiv)
            TIMER_SLIDE = setInterval('RunSlide()', DELAY_SLIDE);
      else
      {
          RE_INIT_OBJ = this;
          setTimeout('ReInit()', 200);
      }
}

function ReInit(obj)
{
    Init(RE_INIT_OBJ);
    TIMER_SLIDE = setInterval('RunSlide()', DELAY_SLIDE);
    RE_INIT_OBJ = null;
}

function RunSlide()
{

    if (OBJ_VIEW.getAttribute("state") == 0)
    {

        NEW_PIX_VAL += PIX_SLIDE;
        OBJ_SLIDE.style.height = NEW_PIX_VAL;

        if (NEW_PIX_VAL >= DIV_HEIGHT) //DD modified code
        {
            clearInterval(TIMER_SLIDE);
            TIMER_SLIDE = null;
            OBJ_VIEW.style.display = 'inline';
            OBJ_VIEW.setAttribute("state","1")
            MainDiv.setAttribute("state",NEW_PIX_VAL);
        }
    } else
    {
        OBJ_VIEW.style.display = 'none';
        NEW_PIX_VAL -= PIX_SLIDE;
        if(NEW_PIX_VAL > 0)OBJ_SLIDE.style.height = NEW_PIX_VAL;
        if (NEW_PIX_VAL <= 0)
        {
            NEW_PIX_VAL = 0;
            OBJ_SLIDE.style.height = NEW_PIX_VAL
            clearInterval(TIMER_SLIDE);
            TIMER_SLIDE = null;
            OBJ_VIEW.setAttribute("state","0")
            MainDiv.setAttribute("state",NEW_PIX_VAL);
        }
    }
}

function ChangeStyle()
{
    if (this.className == this.getAttribute("classOut"))
        this.className = this.getAttribute("classOver");
    else
        this.className = this.getAttribute("classOut");
}
//활성화코드_작성자:김영주
function FlashTag(movie, width, height){
	var FlashObject = '<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="' + width + '" height="' + height + '">'+
	'<param name="movie" value="' + movie + '">' +
	'<param name="quality" value=high>' +
	'<param name="wmode" value="transparent">' +
	'<embed src="' + movie + '"  wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed></object>';

	document.write(FlashObject)
}
