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];}
}



//function $(id){
//  return document.getElementById(id)
//}



  // ÇÃ·¡½Ã Á¡¼± ¾ø¾Ö±â
function swf(src, width, height) {
 html = '<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 + '">';
 html += '<param name="movie" value="' + src + '" />';
 html += '<param name="quality" value="high" />';
 html += '<param name="menu" value="false" />';
 html += '<param name="wmode" value="transparent" />';

 html += '<embed src="' + src + '" quality="high"' +
  ' pluginspage="http://www.macromedia.com/go/getflashplayer"' +
  ' type="application/x-shockwave-flash"' +
  ' width="' + width + '" height="' + height + '" wmode="transparent"></embed>';
 html += '</object>';
 document.write(html);
}


//ÀÌ¹ÌÁö ·Ñ¸µ°ü¸®-¼öÁ¤
function mModify(no){
	makeWin("/main/mainContents.asp?num="+no, 'mainImage', 400, 160);
}


function mov(src, width, height, id){
  if(id!="") id = "id="+id;

	 html = '<object '+id+' codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95  width='+width+' height='+height+' type=application/x-oleobject  standby="Loading icrosoft?Windows?Media Player components...">';
	 html += '<param name="FileName" value="' + src + '" />';
	 html += '<param name="ShowStatusBar" value="0" />';
	 html += '<param name="AutoStart" value="1" />';
	 html += '<param name="ShowControls" value="0" />';
	 html += '<param name="AllowChangeDisplaySize" value="0" />';
	 html += '<param name="DisplaySize" value="0" />';


 html += '</object>';
 document.write(html);
}

function flashSmallProcess(){
		document.getElementById("bottom").style.marginTop = '0px';
		document.getElementById('floot_menu_').style.height = '30px';
}
function flashSmall(){
//	setTimeout("flashSmallProcess()", 500);
//  if($('floot_menu_2'))$('floot_menu_2').style.display="none";
//  $('floot_menu_').style.display="block";
	setTimeout("flashSmallProcess()", 500);
  if(document.getElementById('floot_menu_2'))document.getElementById('floot_menu_2').style.display="none";
  document.getElementById('floot_menu_').style.display="block";
}

function flashLarge(){
		document.getElementById('bottom').style.marginTop = '-140px';
		document.getElementById('floot_menu_').style.height = '170px';
}


//ÈÄº¸½Å»óÁ¤º¸°ø°³ ÆË¾÷

function OpenWindow(mypage, w, h) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=0,resizable=0,menubar=no,status=no,directories=no,location=no,titlebar=no,toolbar=no'
	win = window.open(mypage, "_pop", winprops)
	
	if (parseInt(navigator.appVersion) >= 4) { 
		win.window.focus(); }
	}




//±×·¡ÇÁ ·¹ÀÌ¾î
function showHideGraphLayer(id){
  layer = document.getElementById(id).style.display;

  if(layer=='none'){
    document.getElementById(id).style.display = 'block';
  }else{
    document.getElementById(id).style.display = 'none';
  }
}

// ºí·Î±× °ü¸®
  function fn_writeIssue(){
    makeWin("/main/issueWrite.asp", "ºí·Î±×°ü¸®", 500, 360);
  }

// ¹æ¼Û±¹ °ü¸®
  function fn_writeBroadcast(){
    makeWin("/main/broadCastWrite.asp", "¹æ¼Û±¹°ü¸®", 500, 360);
  }


// Daily °ü¸®
  function fn_writeDailyDY(){
    makeWin("/main/dailyWrite.asp", "Daily°ü¸®", 500, 360);
  }

// MEDIA µî·Ï
function fn_mediaWrite(mode, num) {
    makeWin("/media/write.asp?mode="+mode+"&num="+num, "media", 500, 360);
}

// MEDIA »èÁ¦
function fn_mediaDelete(num) {
    if (!confirm('ÇØ´ç±ÛÀ» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?')) return;

    makeWin("/media/delete.asp?mode=del&num="+num, "media", 500, 360);
}

// °Ë»ö Æû Ã¼Å©
function checkForm(form){
  document.getElementsByName("s_word")[0].value = document.getElementsByName("inputKeyword")[0].value;
  form.submit();

}
