///////////////////////// //////////////////////////////////////////


function main(){window.document.location.href="/index.php";}

 

/////////////////////////////
function sub0100(){window.document.location.href="/sub01/01_00.php";}
function sub0101(){window.document.location.href="/sub01/01_01.php";}
function sub0102(){window.document.location.href="/sub01/01_02.php";}
function sub0103(){window.document.location.href="/sub01/01_03.php";}
function sub0104(){window.document.location.href="/sub01/01_04.php";}
function sub0105(){window.document.location.href="/sub01/01_05.php";}
function sub0106(){window.document.location.href="/sub01/01_06.php";}

/////////////////////////////
function sub0200(){window.document.location.href="/sub02/02_00.php";}
function sub0201(){window.document.location.href="/sub02/02_01.php";}
function sub0202(){window.document.location.href="/sub02/02_02.php";}
function sub0203(){window.document.location.href="/sub02/02_03.php";}
function sub020302(){window.document.location.href="/sub02/02_03_02.php";}
function sub0204(){window.document.location.href="/sub02/02_04.php";}
function sub0205(){window.document.location.href="/sub02/02_05.php";}
function sub0206(){window.document.location.href="/bbs/board.php?bo_table=sub02";}



/////////////////////////////
function sub0300(){window.document.location.href="/sub03/03_00.php";}
function sub0301(){window.document.location.href="/sub03/03_01.php";}
function sub0302(){window.document.location.href="/sub03/03_02.php";}
function sub030202(){window.document.location.href="/sub03/03_02_02.php";}
function sub030203(){window.document.location.href="/sub03/03_02_03.php";}
function sub030204(){window.document.location.href="/sub03/03_02_04.php";}
function sub030205(){window.document.location.href="/sub03/03_02_05.php";}
function sub030206(){window.document.location.href="/sub03/03_02_06.php";}

function sub0303(){window.document.location.href="/bbs/board.php?bo_table=sub03";}



/////////////////////////////
function sub0400(){window.document.location.href="/sub04/04_00.php";}
function sub0401(){window.document.location.href="/sub04/04_01.php";}
function sub0402(){window.document.location.href="/sub04/04_02.php";}
function sub040202(){window.document.location.href="/sub04/04_02_02.php";}
function sub040203(){window.document.location.href="/sub04/04_02_03.php";}

function sub0403(){window.document.location.href="/sub04/04_03.php";}
function sub040302(){window.document.location.href="/sub04/04_03_02.php";}
function sub040303(){window.document.location.href="/sub04/04_03_03.php";}
function sub040304(){window.document.location.href="/sub04/04_03_04.php";}
function sub040305(){window.document.location.href="/sub04/04_03_05.php";}
function sub040306(){window.document.location.href="/sub04/04_03_06.php";}
function sub040307(){window.document.location.href="/sub04/04_03_07.php";}
function sub040308(){window.document.location.href="/sub04/04_03_08.php";}
function sub040309(){window.document.location.href="/sub04/04_03_09.php";}


function sub0404(){window.document.location.href="/bbs/board.php?bo_table=sub04";}



/////////////////////////////
function sub0500(){window.document.location.href="/sub05/05_00.php";}
function sub0501(){window.document.location.href="/sub05/05_01.php";}
function sub0502(){window.document.location.href="/sub05/05_02.php";}
function sub0503(){window.document.location.href="/sub05/05_03.php";}
function sub050302(){window.document.location.href="/sub05/05_03_02.php";}
function sub050303(){window.document.location.href="/sub05/05_03_03.php";}



function sub0504(){window.document.location.href="/bbs/board.php?bo_table=sub05";}



/////////////////////////////
function sub0600(){window.document.location.href="/sub06/06_00.php";}
function sub0601(){window.document.location.href="/bbs/board.php?bo_table=notice";}
function sub0602(){window.document.location.href="/bbs/board.php?bo_table=qna";}
function sub0603(){window.document.location.href="/bbs/board.php?bo_table=news";}
function sub0604(){window.document.location.href="/bbs/board.php?bo_table=diet";}
function sub0605(){window.document.location.href="/sub06/06_05.php";}


/*-------------------------------------------------------------------------------------------------------------
	DDDDD    EEEEEE  SSSSSS   IIIIII   GGGGG   NN   NN
	DD   D   EE      SS         II    GG       N N  NN
	DD    D  EEEEEE   SSSSS     II    GG  GGG  NN N NN
	DD   D   EE           SS    II    GG   GG  NN  N N
	DDDDD    EEEEEE  SSSSSS   IIIIII   GGGGG   NN   NN
-------------------------------------------------------------------------------------------------------------*/


// 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";
	}
}



//Window Open
function 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+',menubar='+menubar+',status='+statusbar+',scrollbars='+scrollbar+',resizable='+resizable);
}

//ºñ¹Ð¹øÈ£Ã£±â
function find(){
	window.open("http://main.eandong.net/program/member/find.asp","find","scrollbars=yes,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width=410,height=412'");
}

//À©µµ¿ì ¿ÀÇÂ2
function open_window2(name, url, left, top, width, height){
	window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',scrollbars=yes,toolbar=no,directories=no,menubar=no,resizable=no,status=no');
}


function go_url2(url){

	if(url  != ""){
	top.location.href=url;
	}
}





//ÀÌ¹ÌÁö Á¡¼±¾øÀÌ

//Å¬¸¯½Ã Á¡¼± ¾È»ý±â°Ô (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;

/*
===============================================================================
* Koons Common JS Style
===============================================================================
*/

// Image Bluring

function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;


// FloatMenu

var stmnGAP1 = 100;
var stmnGAP2 = 100;
//var stmnGAP3 = 300;
//var stmnGAP4= 50;
var stmnBASE = 400;
var stmnActivateSpeed = 200; 
var stmnScrollSpeed = 10; 

        function RefreshStaticMenu()
        {
                var stmnStartPoint, stmnEndPoint, stmnRefreshTimer;

                stmnStartPoint = parseInt(STATICMENU.style.top, 10);
                stmnEndPoint = document.body.scrollTop + stmnGAP2;
                if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1;

                if ( stmnStartPoint != stmnEndPoint ) {
                        stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 );
                        STATICMENU.style.top = parseInt(STATICMENU.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount );
                        stmnRefreshTimer = stmnScrollSpeed;
                }
                                         else {
                        stmnRefreshTimer = stmnActivateSpeed;
                }

                setTimeout ("RefreshStaticMenu();", stmnRefreshTimer);
        }




        function InitializeStaticMenu()
        {
                STATICMENU.style.top = document.body.scrollTop + stmnBASE;
                RefreshStaticMenu();
                }


// Dreamweaver 

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 MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
	
function MM_showHideLayers() { //v3.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;
	}
}
	
function MM_findObj(n, d) { //v3.0
	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); return x;
}

// Popup

function winOpen (doc, wname, top, left, width, height) {
  window.open(doc, wname, 'scrollbars=no,resizable=no,top='+top+',left='+left+',width='+width+',height='+height);
}

function winOpen2 (doc, wname, top, left, width, height) {
  window.open(doc, wname, 'scrollbars=yes,resizable=no,top='+top+',left='+left+',width='+width+',height='+height);
}

function winOpen3 (UrId,ER_Year,ER_CH1,width,height){
 window.open("/lib/bimg.asp?UrId="+UrId+"&ER_Year="+ER_Year+"&ER_CH1="+ER_CH1, "view", 'scrollbars=no,resizable=no,width='+width+',height='+height);

}

// Layer

function layerdisplay(name,no,total) {
	for(var i = 0; i < total+1; i++) {
	  posi = name+i;
	  div1 = document.getElementById(posi);
		if ( no == i ) {
		 if(div1.style.display == 'block'){
			 div1.style.display = 'none';
		 }else{
			 div1.style.display = 'block';
		 }
		} else {
		 div1.style.display = 'none';
	  }
	}
}

function DisplayMenu(menu,tabNum,num) {
     for (i=1; i<=tabNum; i++){
		if (num == i) {
			thisMenu = eval(menu + num + ".style");
			thisMenu.display = "";
		}else{
			otherMenu = eval(menu + i + ".style"); 
			otherMenu.display = "none"; 
		}
	}
}

function layerhide( name ) {
  div1 = document.getElementById( name );
  div1.style.display = 'none';
}

// Location

function center(doc, wname, top, left, width, height){ 
    var x,y; 
    if (self.innerHeight) { 
        x = (screen.availWidth - self.innerWidth) / 2; 
        y = (screen.availHeight - self.innerHeight) / 2; 
    }else if (document.documentElement && document.documentElement.clientHeight) { 
        x = (screen.availWidth - document.documentElement.clientWidth) / 2; 
        y = (screen.availHeight - document.documentElement.clientHeight) / 2; 
    }else if (document.body) { 
        x = (screen.availWidth - document.body.clientWidth) / 2; 
        y = (screen.availHeight - document.body.clientHeight) / 2; 
    } 
    window.moveTo(x,y); 
} 


/*
===============================================================================
*  i.e patch
===============================================================================
*/

function flashWrite(url,w,h,id,bg,vars,win){ 

var flashStr= 
 "<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='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+ 
 "<param name='allowScriptAccess' value='always' />"+ 
 "<param name='movie' value='"+url+"' />"+ 
 "<param name='FlashVars' value='"+vars+"' />"+ 
 "<param name='wmode' value='"+win+"' />"+ 
 "<param name='menu' value='false' />"+ 
 "<param name='quality' value='high' />"+ 
 "<param name='bgcolor' value='"+bg+"' />"+ 
 "<embed src='"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+ 
 "</object>"; 

 document.write(flashStr); 

} 
function aviPlay(src,w,h) { 
document.write('<embed src="'+src+'" width='+w+' height='+h+'>') 
} 

function SWFLoader(width, height, dir, num1, num2, num3, url1, url2, url3, url4, url5) {
	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='"+width+"' height='"+height+"'>");
	document.write("<param name='allowScriptAccess' value='always'>");
	document.write("<param name='allowFullScreen' value='false'>");
	document.write("<param name='movie' value='"+dir+"'>");
	document.write("<param name='quality' value='high'>");
	document.write("<param name='wmode' value='transparent'>");
	document.write("<param name='base' value='.'>");
	document.write("<param name=FlashVars value='mmenu="+num1+"&smenu="+num2+"&tmenu="+num3+"&url1="+url1+"&url2="+url2+"&url3="+url3+"&url4="+url4+"&url5="+url5+"' />");
	document.write("<embed base='.' src='"+dir+"' name='wmode' value='transparent' FlashVars='mmenu="+num1+"&smenu="+num2+"&tmenu="+num3+"url1="+url1+"&url2="+url2+"&url3="+url3+"&url4="+url4+"&url5="+url5+"' quality='high' width='"+width+"' height='"+height+"' align='middle' allowScriptAccess='sameDomain' allowFullScreen='false' name='wmode' value='transparent' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'>");
	document.write("</object>");
}


//#########################################################################################################


//ÇÏ·çµ¿¾È ¿­Áö¾ÊÀ½

function setCookie( name, value, expiredays )
{
    var todayDate = new Date();
    todayDate.setDate( todayDate.getDate() + expiredays );
    document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function closeWin()
{
    if ( document.forms[0].Notice.checked )
        setCookie( "popup", "ok" ,1);
    self.close();
}

function notice_getCookie( name ) 
{ 
        var nameOfCookie = name + "="; 
        var x = 0; 
        while ( x <= document.cookie.length ) 
        { 
                var y = (x+nameOfCookie.length); 
                if ( document.cookie.substring( x, y ) == nameOfCookie ) { 
                        if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) 
                                endOfCookie = document.cookie.length; 
                        return unescape( document.cookie.substring( y, endOfCookie ) ); 
                } 
                x = document.cookie.indexOf( " ", x ) + 1; 
                if ( x == 0 ) 
                        break; 
        } 
        return ""; 
} 

function chng_bg(obj){
obj.bgColor='#FFFFFF'; 
}

function chng_back(n_obj){
n_obj.bgColor='#DBE9F6'; 
}
/*
/////////// ÆË¾÷ html ¿¡ »ðÀÔºÎºÐ :
<form>
<table cellpadding="0" cellspacing="0" width="415">
 <tr>
  <td><img src="/popup/popup_box.jpg"></td>
 </tr>
   <tr>
  <td bgcolor="#EDEDED" height="40" valign="top">
  <table cellpadding="0" cellspacing="0" width="415" align="center">
   <tr>
    <td height="40" align="right" align="center">
     <input type="checkbox" name="Notice" onClick="closeWin();">
     <font face="µ¸¿ò" size="2" color="#343434">ÇÏ·ç µ¿¾È ¿­Áö ¾ÊÀ½</font>
             <a href="#" onClick="javascript:history.onclick=closeWin()"
                                         style="font-family:±¼¸²Ã¼;font-size:9pt;background-color:#ffffff;color:#3300cc;">[´Ý±â]</a>
     </td>    
   </tr>
  </table></td>
   </tr>
</table>
</form>

/////////// ÆË¾÷¶ç¿ì´Â html ¿¡ »ðÀÔºÎºÐ :
<script language="JavaScript"> 
<!-- JavaScript 
if ( notice_getCookie( "popup" ) != "ok" ) 
{ 
 window.open('/popup/popup.html','_blank','toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable=no,width=460,height=580');
} 
// - JavaScript - --> 
*/

/*
===============================================================================
*  ¾ÆÀÌÇÁ·¹ÀÓ ÀÚµ¿Å©±â ½ÇÇà
===============================================================================
*/

function IFrameResize(na) {
	eval("var PF = "+na+".document.body");
	var CF = document.all[na];
	CF.style.height = PF.scrollHeight + (PF.offsetHeight - PF.clientHeight)+20;
	CF.style.width = PF.scrollWidth + (PF.offsetWidth - PF.clientWidth);
	//alert(CF.style.width);
}

function setColor(obj) {
	for(i=1; i<10; i++) {
		if(i==8) continue;
		if(i==obj) {	
			document.all['menu0'+i].src = "/image/topmenu00"+i+".gif";
			//document.all['menu0'+i].style.backgroundColor="#e8e8e8";
			//if(obj<6)
				//document.all['Layer'+i].style.backgroundColor="#E6E6E6";
		}
		else {
			document.all['menu0'+i].src = "/image/topmenu0"+i+".gif";
			//document.all['menu0'+i].style.backgroundColor="#ffffff";
		}
	}
}
function setBGColor(obj) {
	var id = document.getElementById("List_"+obj).style.backgroundColor="#ECEAC6";
}
function comebackBGColor(obj) {
	var id = document.getElementById("List_"+obj).style.backgroundColor="#FFFFFF";
}

function change_img(sub01) {	
	hey();
	eval(popup).src = "/image/arrow2.gif";
	//document.all[change_img.arguments[0]].src = "/image/arrow2.gif";
}






//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);
}


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 );  
  } 
  
} 




 
// 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";
	}
}

function flashObject(file_name,flashVar,width,height){
  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="' + width + '" height="' + height + '">');
  document.write('<param name="movie" value="' + file_name + '">');
  document.write('<param name=FlashVars value="' + flashVar + '">');
  document.write('<param name="quality" value="high">');
  document.write('<param name="wmode" value="transparent">');
  document.write('<param name="allowScriptAccess" value="always">');
  document.write('<param name="allowNetworking" value="all">');
  document.write('<embed src="' + file_name +'" FlashVars="' + flashVar +'" width="' + width + '" height="' + height + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" allowScriptAccess="always" allowNetworking="all"></embed>');
  document.write('</object>');
}


