///////////////////////// //////////////////////////////////////////


function main(){window.document.location.href="/";}

/////////////////////////////
function sub01(){window.document.location.href="/sub01/01.php?chk_on=m1";}
function sub0101(){window.document.location.href="/sub01/01_01.php?chk_on=m2";}
function sub0102(){window.document.location.href="/sub01/01_02_1.php?chk_on=m2";}
function sub0103(){window.document.location.href="/sub01/01_03.php?chk_on=m3";}
function sub0104(){window.document.location.href="/sub01/01_04.php?chk_on=m4";}
function sub0105(){window.document.location.href="/sub01/01_05.php?chk_on=m5";}

function sub0201(){window.document.location.href="/sub02/02_01.php?chk_on=m1";}
function sub0202(){window.document.location.href="/sub02/02_02.php?chk_on=m2";}
function sub0203(){window.document.location.href="/sub02/02_03.php?chk_on=m3";}

function sub0301(){window.document.location.href="/sub03/03_01.php?chk_on=m1";}
function sub0302(){window.document.location.href="/bj_board/bjbrd_list.htm?board_id=document";}
function sub0303(){window.document.location.href="/sub03/03_03.php?chk_on=m3";}
function sub0304(){window.document.location.href="/sub03/03_04.php?chk_on=m4";}

function sub0401(){window.document.location.href="/sub04/04_01.php?chk_on=m1";}
function sub0402(){window.document.location.href="/sub04/04_02.php?chk_on=m2";}
function sub0403(){window.document.location.href="/bj_board/bjbrd_list.htm?board_id=press";}
function sub0404(){window.document.location.href="/sub04/04_04.php?chk_on=m4";}

function sub0501(){window.document.location.href="/sub05/05_01.php?chk_on=m1";}
function sub0502(){window.document.location.href="/sub05/05_02.php?chk_on=m2";}
function sub0503(){window.document.location.href="/sub05/05_03.php?chk_on=m3";}
function sub0504(){window.document.location.href="/sub05/05_04.php?chk_on=m4";}


//½½¶óÀÌµù¸Þ´º
function slide(Id, interval, to) {
    var obj = document.getElementById(Id);
    var H, step = 5;

    if (obj == null) return;
    if (to == undefined) { // user clicking
        if (obj._slideStart == true) return;
        if (obj._expand == true) {
            to = 0;
            obj.style.overflow = "hidden";
        } else {
            slide.addId(Id);
            for(var i=0; i < slide.objects.length; i++) {
                if (slide.objects[i].id != Id && slide.objects[i]._expand == true) {
                    slide(slide.objects[i].id);
                }
            }

            obj.style.height = "";
            obj.style.overflow = "";
            obj.style.display = "block";
            to = obj.offsetHeight; // ÀÌ°ÅÀÌ°Å
            obj.style.overflow = "hidden";
            obj.style.height = "1px";
        }
        obj._slideStart = true;
    }
    
    step             = ((to > 0) ? 1:-1) * step;
    interval         = ((interval==undefined)?1:interval);

    obj.style.height = (H=((H=(isNaN(H=parseInt(obj.style.height))?0:H))+step<0)?0:H+step)+"px";
    
    
    if (H <= 0) {
        obj.style.display = "none";
        obj.style.overflow = "hidden";
        obj._expand = false;
        obj._slideStart = false;
    } else if (to > 0 && H >= to) {
        obj.style.display = "block";
        obj.style.overflow = "visible";
        obj.style.height = H + "px";
        obj._expand = true;
        obj._slideStart = false;
    } else {
        setTimeout("slide('"+Id+"' , "+interval+", "+to+");", interval);
    }
}
slide.objects = new Array();
slide.addId = function(Id)
{
    for (var i=0; i < slide.objects.length; i++) {
        if (slide.objects[i].id == Id) return true;
    }
    slide.objects[slide.objects.length] = document.getElementById(Id);
}




//Window Open
function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

//Flash
function setEmbed() 
{ 
  var obj = new String; 
  var parameter = new String;
  var embed = new String; 
  var html = new String; 
  var allParameter = new String; 
  var clsid = new String; 
  var codebase = new String; 
  var pluginspace = new String; 
  var embedType = new String; 
  var src = new String; 
  var width = new String; 
  var height = new String; 

    
  this.init = function( getType , s ,w , h ) { 
      
      if ( getType == "flash") 
      { 

        clsid = "D27CDB6E-AE6D-11cf-96B8-444553540000";        
        codebase = "http://downlocd.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"; 
        pluginspage = "http://www.macromedia.com/go/getflashplayer"; 
        embedType = "application/x-shockwave-flash"; 
      } 
      /* type Ãß°¡ 
      else if ( ) 
      { 
      } 
      */ 
            
      parameter += "<param name='movie' value='"+ s + "'>\n";  
      parameter += "<param name='quality' value='high'>\n";    
      
      src = s; 
      width = w; 
      height = h; 
  } 
  
  this.parameter = function( parm , value ) {      
      parameter += "<param name='"+parm +"' value='"+ value + "'>\n";        
      allParameter += " "+parm + "='"+ value+"'"; 
  }  
  
  this.show = function() { 
      if ( clsid ) 
      { 
        obj = "<object classid=\"clsid:"+ clsid +"\" codebase=\""+ codebase +"\" width='"+ width +"' height='"+ height +"'>\n"; 
      } 
      
      embed = "<embed src='" + src + "' pluginspage='"+ pluginspage + "' type='"+ embedType + "' width='"+ width + "' height='"+ height +"'"+ allParameter +" ></embed>\n"; 
      
      if ( obj ) 
      { 
        embed += "</object>\n"; 
      } 
      
      html = obj + parameter + embed; 
      
      document.write( html );  
  } 
  
} 




 
//µå¸²À§¹ö·Ñ¿À¹ö
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];}
}


 
// Image rollover
//var changedImg;
//function EImgChg(flag)
//{	
//	source=event.srcElement;
//	if (source.name == "")
//	{ return false;	}
//
//	if(changedImg == source.name)
//	return;

//	else if (document.images && source.tagName=="IMG")	{
//			imgElement = source.name;
//			imgPath = source.src;

//			imgPathLen = imgPath.length;
//			imgPathFlag = imgPath.lastIndexOf("/");
//			imgName = imgPath.substring(0,imgPathFlag+1);

//			document.images[imgElement].src = imgName + imgElement + "_" + flag + ".gif";
//	}
//}





//ÀÌ¹ÌÁö Á¡¼±¾øÀÌ

//Å¬¸¯½Ã Á¡¼± ¾È»ý±â°Ô (A ÅÂ±× ¸ù¶¥)¢Â
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
anchors[i].onfocus = anchors[i].blur;
}

// Å¬¸¯ Á¡¼±2 (IMGÀÇ AÅÂ±×)¢Â
function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;



//·¹ÀÌ¾î
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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


//ÀÛÀº ÆË¾÷
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


// ¸¶¿ì½º ¿À¸¥ÂÊ ¸·±â
var message="¿À¸¥ÂÊ ¸¶¿ì½º´Â »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.";

function clickIE4(){
    //if (event.button==2){
    //    alert(message);
    //return false;
    //}
}

function clickNS4(e){
    if (document.layers||document.getElementById&&!document.all){
    if (e.which==2||e.which==3){
        alert(message);
        return false;
        }
    }
}
/*
if (document.layers){
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
    document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")
*/
////ÀÌ¹ÌÁö ÆË¾÷
function popimage(imagesrc,winwidth,winheight){
    var look='width='+winwidth+',height='+winheight+','
        popwin=window.open("","",look)
        popwin.document.open()
        popwin.document.write('<title>Image Window</title><body topmargin=0 leftmargin=0><img style=cursor:hand; onclick="self.close()" src="'+imagesrc+'"></body>')
        popwin.document.close()
}
