var PlayerWidth = 330;
var PlayerHeight = 319;

function EmGET(arrayKey, arrayValue, Value) { 
    count = arrayKey.length; 
    for(i=0;i<count;i++) { 
        if(arrayKey[i]==Value) { 
            return arrayValue[i]; 
            break; 
        } 
    } 
} 

// ie ativeX Ãâ·Â º¯°æ ÇÔ¼ö 
function Embed() { 
var emtype; 
    var key = new Array(); 
    var value = new Array(); 
  
    for(i=0;i<Embed.arguments.length;i++) { 
        data = Embed.arguments[i].split('='); 
        
        if (data[0] == "FlashVars" && data.length >= 2 ) {
        	key[i] = data[0]; 
        	value[i] = data[1] + "=" + data[2];
    	} else {
    		key[i] = data[0]; 
        	value[i] = data[1]; 	
    	}
    } 

    contents = ''; 
	srcdata = EmGET(key,value,'src').toLowerCase(); 

    classid = EmGET(key,value,'classid'); 
    codebase = EmGET(key,value,'codebase'); 
    
	if(/\.(swf)$/.test(srcdata)) { //flash 
        classid = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'; 
        codebase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.c-ab#version=6,0,29,0'; 
		emtype="flash";
    } else if(/\.(wmv|wma|asf|avi|wav|asx|mpeg|mp3|midi|aiff|au|wpl|wm|wmx|wmd|wmz)$/.test(srcdata)){//media 
        classid = 'CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95'; 
        codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'; 
		emtype="media"; 
	} 
	
    if(classid && codebase) { 
        contents += '<object'; 
        if(classid) { 
            contents += ' classid="' + classid + '"'; 
        } 
        if(codebase) { 
            contents += ' codebase="' + codebase + '"'; 
        } 
        count = key.length; 
        for(i=0;i<count;i++) { 
            if(value[i]!='') { 
                if(key[i]!='src') { 
                    contents += ' ' + key[i] + '="' + value[i] + '"'; 
                } 
            } 
        } 
        contents += '>'; 
        for(i=0;i<count;i++) { 
            if(value[i]!='') { 
                if(emtype=='flash' && key[i]=='src') { 
                    contents += '<param name="movie" value="' + value[i] + '" />'; 
                } else  if(emtype=='media' && key[i]=='src') { 
                    contents += '<param name="filename" value="' + value[i] + '" />'; 
                } else { 
                    contents += '<param name="' + key[i] + '" value="' + value[i] + '" />'; 
                } 
            } 
        } 
    } 
    
    contents += '<embed'; 
    for(i=0;i<count;i++) { 
        if(value[i]!='') { 
            contents += ' ' + key[i] + '="' + value[i] + '"'; 
        } 
    }
     
    contents += '>'; 
    contents += '</embed>'; 
    if(classid && codebase) { 
        contents += '</object>'; 
    }
     
	document.write(contents); 
} 


function PlayerView(Param, Width, Height){
	if (Width) {
		PlayerWidth = Width;
	}
	
	if (Height) {
		PlayerHeight = Height;
	}
	
	document.writeln("<OBJECT id='Player' onfocus='this.blur();' codeBase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' type='application/x-oleobject' height='"+PlayerHeight+"' width='"+PlayerWidth+"' classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' VIEWASTEXT>");
	document.writeln("<PARAM NAME='URL' VALUE='"+Param+"'>");
	document.writeln("<PARAM NAME='rate' VALUE='1'>");
	document.writeln("<PARAM NAME='balance' VALUE='0'>");
	document.writeln("<PARAM NAME='currentPosition' VALUE='0'>");
	document.writeln("<PARAM NAME='defaultFrame' VALUE=''>");
	document.writeln("<PARAM NAME='playCount' VALUE='1'>");
	document.writeln("<PARAM NAME='autoStart' VALUE='-1'>");
	document.writeln("<PARAM NAME='currentMarker' VALUE='0'>");
	document.writeln("<PARAM NAME='invokeURLs' VALUE='0'>");
	document.writeln("<PARAM NAME='baseURL' VALUE=''>");
	document.writeln("<PARAM NAME='volume' VALUE='100'>");
	document.writeln("<PARAM NAME='mute' VALUE='0'>");
	document.writeln("<PARAM NAME='uiMode' VALUE='full'>");
	document.writeln("<PARAM NAME='stretchToFit' VALUE='-1'>");
	document.writeln("<PARAM NAME='windowlessVideo' VALUE='0'>");
	document.writeln("<PARAM NAME='enabled' VALUE='-1'>");
	document.writeln("<PARAM NAME='fullScreen' VALUE='0'>");
	document.writeln("<PARAM NAME='AutoSize' VALUE='1'>");
	document.writeln("<PARAM NAME='AutoResize' VALUE='1'>");
	document.writeln("</OBJECT>");
}

function PlayerSize(nsize) {
	switch (nsize){
		case 0:					// Normal
			document.Player.width = PlayerWidth;
			document.Player.height = PlayerHeight;
			break;

		case 1:					// Double
			document.Player.width = PlayerWidth*2;
			document.Player.height = PlayerHeight*2;
			break;

		case 2:					// FULL ScreenMode
			if(Player.playState == 3)	//Àç»ýÁßÀÏ¶§¸¸
				document.Player.fullScreen = "true";
			break;
	}
}

/*ÇÃ·¡½Ã 9.1 ¹öÆ°Å¬¸¯ ÆÐÄ¡*/
function Embed1(flashfilename, flashwidth, flashheight, flashvars)
{
	document.write('<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="'+ flashwidth +'" height="'+ flashheight +'">');
	document.write('<param name="movie" value="'+ flashfilename +'">');
	document.write('<param name="flashVars" value="'+ flashvars +'">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<param name="allowScriptAccess" value="always" />');

	if(flashvars) document.write('<param name="flashVars" value="'+ flashvars +'">');

	document.write('<param name="wmode" value="transparent">');
	document.write('<embed');
	if(flashvars) document.write(' flashVars="'+ flashvars +'" ');
	document.write(' src="'+ flashfilename +'" width="'+ flashwidth +'" height="'+ flashheight +'" ');
	document.write(' quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" >');
	document.write('</embed>');
	document.write('</object>');
}

/*·¹ÀÌ¾î ¿­°í´Ý±â*/
function OpenDescription(strTitleId, strDescriptionId) {
 var objTitleData = document.getElementById(strTitleId);
 var objDescData = document.getElementById(strDescriptionId);

 if(objDescData.style.display == 'none') {
  objDescData.style.display = 'block';
  objTitleData.innerHTML = '<img src=/dom/list/images/public_11.gif>';
 } else {
  var ex_obj = document.getElementById('help');
  ex_obj.style.display = ex_obj.style.display='none';
  objDescData.style.display = 'none';
  objTitleData.innerHTML = '<img src=/dom/list/images/public_10.gif>';
 }
}

/*
var old_menu = '';
function Description(name)
{
var objTitleData = document.getElementById("day"+name);
submenu=eval("dayDescription"+name);
    if( old_menu != submenu ){
          if( old_menu !='' ) {
                old_menu.style.display = 'none';
				objTitleData.innerHTML = '<img src=/dom/list/images/public_10.gif>';
              }
          submenu.style.display='block';  
		  objTitleData.innerHTML = '<img src=/dom/list/images/public_11.gif>';
          old_menu = submenu;
    } else {
                submenu.style.display = 'none';
				objTitleData.innerHTML = '<img src=/dom/list/images/public_10.gif>';
                old_menu = '';
            }
}

*/
/*Help*/
function abspos(e){
    this.x = e.clientX + (document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);
    this.y = e.clientY + (document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);
    return this;
}
function itemClick(e){
    var ex_obj = document.getElementById('help');
	ex_obj.style.display = 'none';
    if(!e) e = window.Event;
    pos = abspos(e);
    ex_obj.style.left = pos.x+"px";
    ex_obj.style.top = (pos.y+10)+"px";
    ex_obj.style.display = ex_obj.style.display=='none'?'block':'none';
}


/*Help_Golf*/
function abspos(e){
    this.x = e.clientX + (document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);
    this.y = e.clientY + (document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);
    return this;
}
function itemClick_help_golf(e){
    var ex_obj = document.getElementById('help_golf');
	ex_obj.style.display = 'none';
    if(!e) e = window.Event;
    pos = abspos(e);
    ex_obj.style.left = pos.x+"px";
    ex_obj.style.top = (pos.y+10)+"px";
    ex_obj.style.display = ex_obj.style.display=='none'?'block':'none';
}


/*Reserv_Help*/
function abspos(e){
    this.x = e.clientX + (document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);
    this.y = e.clientY + (document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);
    return this;
}
function itemClick_reserv(e){
    var ex_obj = document.getElementById('reserv_help');
    if(!e) e = window.Event;
    pos = abspos(e);
    ex_obj.style.left = (pos.x-650)+"px";
    ex_obj.style.top = (pos.y+10)+"px";
    ex_obj.style.display = ex_obj.style.display=='none'?'block':'none';
}


/*Reserv_Date_Help*/
function abspos(e){
    this.x = e.clientX + (document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);
    this.y = e.clientY + (document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);
    return this;
}
function itemClick_reserv_date(e){
    var ex_obj = document.getElementById('reserv_date_help');
    if(!e) e = window.Event;
    pos = abspos(e);
    ex_obj.style.left = (pos.x-780)+"px";
    ex_obj.style.top = (pos.y+15)+"px";
    ex_obj.style.display = ex_obj.style.display=='none'?'block':'none';
}


/*Search_Help*/
function abspos(e){
    this.x = e.clientX + (document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);
    this.y = e.clientY + (document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);
    return this;
}
function itemClick_search(e){
    var ex_obj = document.getElementById('search_help');
    if(!e) e = window.Event;
    pos = abspos(e);
    ex_obj.style.left = (pos.x-650)+"px";
    ex_obj.style.top = (pos.y+10)+"px";
    ex_obj.style.display = ex_obj.style.display=='none'?'block':'none';
}


/*Ulleung_Submenu (¹¬È£)*/
function abspos(e){
    this.x = e.clientX + (document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);
    this.y = e.clientY + (document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);
    return this;
}
function itemClick_ulleung_mukho(e){
    var ex_obj = document.getElementById('ulleung_submenu_mukho');
    if(!e) e = window.Event;
    pos = abspos(e);
    ex_obj.style.left = (pos.x+30)+"px";
    ex_obj.style.top = (pos.y-80)+"px";
    ex_obj.style.display = ex_obj.style.display=='none'?'block':'none';
}


/*Ulleung_Submenu (°­¸ª)*/
function abspos(e){
    this.x = e.clientX + (document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);
    this.y = e.clientY + (document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);
    return this;
}
function itemClick_ulleung_gangneung(e){
    var ex_obj = document.getElementById('ulleung_submenu_gangneung');
    if(!e) e = window.Event;
    pos = abspos(e);
    ex_obj.style.left = (pos.x+30)+"px";
    ex_obj.style.top = (pos.y-80)+"px";
    ex_obj.style.display = ex_obj.style.display=='none'?'block':'none';
}


/*Ulleung_Submenu (Æ÷Ç×)*/
function abspos(e){
    this.x = e.clientX + (document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);
    this.y = e.clientY + (document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);
    return this;
}
function itemClick_ulleung_pohang(e){
    var ex_obj = document.getElementById('ulleung_submenu_pohang');
    if(!e) e = window.Event;
    pos = abspos(e);
    ex_obj.style.left = (pos.x+30)+"px";
    ex_obj.style.top = (pos.y-80)+"px";
    ex_obj.style.display = ex_obj.style.display=='none'?'block':'none';
}


/*Å¬¸¯Å×µÎ¸® ¾ø¾Ö±â*/
function autoBlur(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") 
document.body.focus(); 
} 
document.onfocusin=autoBlur; 


/*Æ¯Á¤¿µ¿ª ÀÎ¼âÇÏ±â*/
 var initBody 
 function beforePrint(){ 
  initBody = document.body.innerHTML; 
  document.body.innerHTML = idPrint.innerHTML; 
 } 
 function afterPrint(){ 
  document.body.innerHTML = initBody; 
 } 
 function printArea() { 
  window.print(); 
 } 
 window.onbeforeprint = beforePrint; 
 window.onafterprint = afterPrint; 
 
 
/*ÀÎÇ²¹Ú½ºÀ§Ä¡½Ã ±ÛÀÚ¾ø¾Ö±â*/
function reset_text(ele)
{
  if(ele.value == ele.defaultValue)
    ele.value = '';
}
function restore_text(ele)
{
  if(ele.value == '')
    ele.value = ele.defaultValue;
}


/*¿¹¾à·¹ÀÌ¾î ¶ç¿ì±â*/
function ViewLayer(){
	document.getElementById("Pop").style.display='inline'
}


/*SNS*/
function goMainTwitter(msg, url) {
	if (msg && url) {
		var href = "http://twitter.com/home?status=" + encodeURIComponent(msg) + " " + encodeURIComponent(url);
		var a = window.open(href, 'twitter', '');
		if (a) {
			a.focus();
		}
	}
}
function goMainMe2Day(msg, url, tag) {
	if (msg && url) {
		var href = "http://me2day.net/posts/new?new_post[body]=" + encodeURIComponent(msg) + " " + encodeURIComponent(url) + "&new_post[tags]=" + encodeURIComponent(tag);
		var a = window.open(href, 'me2Day', '');
		if (a) {
			a.focus();
		}
	}
}
function goMainFaceBook(msg, url) {
	if (msg && url) {
		var href = "http://www.facebook.com/sharer.php?u=" + url + "&t=" + encodeURIComponent(msg);
		var a = window.open(href, 'facebook', '');
		if (a) {
			a.focus();
		}
	}
}


//¸¶¿ì½º¿À¹ö ÇÒ¶§ ÀÌ¹ÌÁö º¯°æ ½ºÅ©¸³Æ® ½ÃÀÛ
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_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_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];}
}


/*Menu Total (Show-Hide Layer)*/
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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; }
}


/*Menu Total (Toggle Button)*/
function toggle_A(item_ma) {
if(item_ma.style.display =="none") item_ma.style.display = "";
else item_ma.style.display = "none";
}


/*Menu Total (Toggle Button)*/
function toggle_C(item_ma) {
if(item_ma.style.display =="none") item_ma.style.display = "";
else item_ma.style.display = "none";
}

