/********************************************************************
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr"/>버전확인
*********************************************************************/
/***********************
플래시 자바스크트8.0버전
************************/
function flash8(argSRC,argWIDTH,argHEIGHT,argBGCOLOR,argVar,argID,argName,argWMODE){
var strTEMP;
strTEMP ='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ' ;
if(argID)
strTEMP = strTEMP + ' ID="' + argID + '" ' ;//ID
strTEMP = strTEMP + ' width="'+ argWIDTH + '" height="' + argHEIGHT + '">';//가로세로 값//
strTEMP = strTEMP + '<param name="allowScriptAccess" value="always" />';//통신방법//
strTEMP = strTEMP + '<param name="movie" value="' + argSRC + '">';//경로//
strTEMP = strTEMP + '<param name="FlashVars" value="'+argVar+'" />';//페이지 인식//
strTEMP = strTEMP + '<param name="bgcolor" value="'+argBGCOLOR+'" />';//플래시 배경색갈//
strTEMP = strTEMP + '<param name="quality" value="high" />';//플래시 퀄리티//
strTEMP = strTEMP + '<param name="memu" value="false" />';//이름값//
if(argWMODE)
strTEMP = strTEMP + '<param name="wmode" value="' + argWMODE + '">';
else
strTEMP = strTEMP + '<param name="wmode" value="transparent">';
strTEMP = strTEMP + '<embed src="'+ argSRC +'" FlashVars="'+ argVar +'" ';
if (argWMODE)
strTEMP = strTEMP + 'wmode="'+ argWMODE +'" ';
else
strTEMP = strTEMP + 'wmode="transparent" ';
strTEMP = strTEMP + 'menu="false" quality="high" bgcolor="'+ argBGCOLOR +'" width="'+ argWIDTH +'" height="'+ argHEIGHT +'" name="'+ argID +'" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
strTEMP = strTEMP + '</object>';
document.write(strTEMP);
}
/*사용방법<script>wa4b_flash8('Index.swf','100%','100%','#ffffff','','','','transparent')</script>
경로,가로,세로,bg컬러,플래시바,"아이디",이름,투명모드설정//wmode --> none, transparent, opaque*/

/***********************
플래시 자바스크트7.0버전
************************/
function flash7(argSRC,argWIDTH,argHEIGHT,argBGCOLOR,argVar,argID,argName,argWMODE){
var strTEMP;
strTEMP ='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" ' ;
if(argID)
strTEMP = strTEMP + ' ID="' + argID + '" ' ;//ID
strTEMP = strTEMP + ' width="'+ argWIDTH + '" height="' + argHEIGHT + '">';//가로세로 값//
strTEMP = strTEMP + '<param name="allowScriptAccess" value="always" />';//통신방법//
strTEMP = strTEMP + '<param name="movie" value="' + argSRC + '">';//경로//
strTEMP = strTEMP + '<param name="FlashVars" value="'+argVar+'" />';//페이지 인식//
strTEMP = strTEMP + '<param name="bgcolor" value="'+argBGCOLOR+'" />';//플래시 배경색갈//
strTEMP = strTEMP + '<param name="quality" value="high" />';//플래시 퀄리티//
strTEMP = strTEMP + '<param name="memu" value="false" />';//이름값//
if(argWMODE)
strTEMP = strTEMP + '<param name="wmode" value="' + argWMODE + '">';
else
strTEMP = strTEMP + '<param name="wmode" value="transparent">';
strTEMP = strTEMP + '<embed src="'+ argSRC +'" FlashVars="'+ argVar +'" ';
if (argWMODE)
strTEMP = strTEMP + 'wmode="'+ argWMODE +'" ';
else
strTEMP = strTEMP + 'wmode="transparent" ';
strTEMP = strTEMP + 'menu="false" quality="high" bgcolor="'+ argBGCOLOR +'" width="'+ argWIDTH +'" height="'+ argHEIGHT +'" name="'+ argID +'" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
strTEMP = strTEMP + '</object>';
document.write(strTEMP);
}
/*사용방법<script>wa4b_flash7('Index.swf','100%','100%','#ffffff','','','','transparent')</script>
경로,가로,세로,bg컬러,플래시바,"아이디",이름,투명모드설정//wmode --> none, transparent, opaque*/


/***********************
플래시 자바스크트6.0버전
************************/
function flash6(argSRC,argWIDTH,argHEIGHT,argBGCOLOR,argVar,argID,argName,argWMODE){
var strTEMP;
strTEMP ='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ' ;
if(argID)
strTEMP = strTEMP + ' ID="' + argID + '" ' ;//ID
strTEMP = strTEMP + ' width="'+ argWIDTH + '" height="' + argHEIGHT + '">';//가로세로 값//
strTEMP = strTEMP + '<param name="allowScriptAccess" value="always" />';//통신방법//
strTEMP = strTEMP + '<param name="movie" value="' + argSRC + '">';//경로//
strTEMP = strTEMP + '<param name="FlashVars" value="'+argVar+'" />';//페이지 인식//
strTEMP = strTEMP + '<param name="bgcolor" value="'+argBGCOLOR+'" />';//플래시 배경색갈//
strTEMP = strTEMP + '<param name="quality" value="high" />';//플래시 퀄리티//
strTEMP = strTEMP + '<param name="memu" value="false" />';//이름값//
if(argWMODE)
strTEMP = strTEMP + '<param name="wmode" value="' + argWMODE + '">';
else
strTEMP = strTEMP + '<param name="wmode" value="transparent">';
strTEMP = strTEMP + '<embed src="'+ argSRC +'" FlashVars="'+ argVar +'" ';
if (argWMODE)
strTEMP = strTEMP + 'wmode="'+ argWMODE +'" ';
else
strTEMP = strTEMP + 'wmode="transparent" ';
strTEMP = strTEMP + 'menu="false" quality="high" bgcolor="'+ argBGCOLOR +'" width="'+ argWIDTH +'" height="'+ argHEIGHT +'" name="'+ argID +'" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
strTEMP = strTEMP + '</object>';
document.write(strTEMP);
}
/*사용방법<script>wa4b_flash6('Index.swf','100%','100%','#ffffff','','','','transparent')</script>
경로,가로,세로,bg컬러,플래시바,"아이디",이름,투명모드설정//wmode --> none, transparent, opaque*/


/*****************************************
이미지 링크할때 테두리 숨기기 자바스크립트
******************************************/
function bluring(){
	if (event.srcElement!=null) {
		if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
	}
}
document.onfocusin=bluring;




function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;


/*****************************************
접었다펴기
******************************************/
function haksaInfo(id){
		var item = document.getElementById(id);
		if(item.style.display == "none"){
			item.style.display = "";
		}else{
			item.style.display = "none";
		}
	}



/*******************
퀵메뉴 자바스크립트1
********************/
function initMoving(target) {
	if (!target)
		return false;
	var obj = target;
	obj.initTop = 278;
    //obj.initLeft = 900;
	obj.bottomLimit = document.documentElement.scrollHeight - 20;
	obj.topLimit = 150;

	obj.style.position = "absolute";
	obj.top = obj.initTop;
    //obj.left = obj.initLeft;
	obj.style.top = obj.top + "px";
   //obj.style.left = obj.left + "px";
	obj.getTop = function() {
		if (document.documentElement.scrollTop) {
			return document.documentElement.scrollTop;
		} else if (window.pageYOffset) {
			return window.pageYOffset;
		} else {
			return 0;
		}
	}
	obj.getHeight = function() {
		if (self.innerHeight) {
			return self.innerHeight;
		} else if(document.documentElement.clientHeight) {
			return document.documentElement.clientHeight;
		} else {
			return 500;
		}
	}
	obj.move = setInterval(function() {
		pos = obj.getTop() + obj.getHeight() / 2 - 300;
		if (pos > obj.bottomLimit)
			pos = obj.bottomLimit
		if (pos < obj.topLimit)
			pos = obj.topLimit
		interval = obj.top - pos;
		obj.top = obj.top - interval / 3;
		obj.style.top = obj.top + "px";
	}, 40)
}
/*사용방법
<div id="target">
<div id="quickmenu"></div>
</div>
<script type="text/javascript">initMoving(document.getElementById("target"));</script>
레이어 안에 이미지나 플래시를 삽입후 스크립트를 <body>안에 넣어준다.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">버전실행*/


/*******************
퀵메뉴 자바스크립트2
********************/
var scroll_pixel,div_pixel,gtpos,gbpos,loop,moving_spd;
var top_margin = 95;		/// 창의 맨위와의 여백 내려올때
var top_margin2 =130;		/// 창의 맨위와의 여백 올라올때
var speed = 20;				/// 점차 줄어드는 속도를 위한 설정
var speed2 = 15;			/// setTimeout을 위한 속도 설정
var moving_stat = 1;		/// 메뉴의 스크롤을 로딩시 on/off설정 1=움직임 0은 멈춤
 
function check_scrollmove()
{
  scroll_pixel = document.body.scrollTop;
        gtpos = document.body.scrollTop+top_margin;
        gbpos = document.body.scrollTop+top_margin2;
  if(div_id.style.pixelTop < gtpos)
        {
         moving_spd = (gbpos-div_id.style.pixelTop)/speed;
         div_id.style.pixelTop += moving_spd;
        }
        if(div_id.style.pixelTop > gtpos)
        {
         moving_spd = (div_id.style.pixelTop-gtpos)/speed;
         div_id.style.pixelTop -= moving_spd;
        }
        loop = setTimeout("check_scrollmove()",speed2);
}
function moving_control()
{
  if(!moving_stat){ check_scrollmove(); moving_stat = 1;}
        else{ clearTimeout(loop); moving_stat = 0; div_id.style.pixelTop = top_margin;}
}
/*사용법<body onLoad="check_scrollmove()">
<div id="div_id" style="position:absolute; left:807; top:95;">
  <table width="133" height="373" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="133" height="373"></td>
    </tr>
  </table>
</div>*/

/******************
롤오버알파값 자바스크립트
*******************/
function high(which2)
{
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2)
{
clearInterval(highlighting)
which2.filters.alpha.opacity=70
}
function highlightit(cur2)
{
if(cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=5
else if(window.highlighting)
clearInterval(highlighting)
}


/******************
텝메뉴 자바스크립트
*******************/
function chgTab(idx,size){
	for(var i=1; i<size+1; i++){
		document.getElementById("content"+i).style.display="none";
	}
	document.getElementById("content"+idx).style.display="block";
}
/*사용법
//첫번째 레이어 <html에 처음보일때 보여지는 레이어> 레이어로 하나씩 style="display:none" 값을 적용하고 롤오버이지만 순차적으로
바꿔준다. 자세한건 블로그참조//
<div id="content1">
<table width="359" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="359" height="39" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="96" height="39"></td>
          <td width="86" valign="top"><img src="tab_manage03_off.gif" onclick="javascript:chgTab(2,4)" style="cursor:hand"/></td>
          <td width="85" valign="top"><img src="tab_manage02_off.gif" onclick="javascript:chgTab(3,4)" style="cursor:hand"/></td>
          <td width="92" valign="top"><img src="tab_manage01_off.gif" onclick="javascript:chgTab(2,4)" style="cursor:hand"/></td>
        </tr>
    </table></td>
  </tr>
</table>
</div>*/


/***********************
쿠키값 알기 자바스크립트
************************/
function 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 loginAlert(){
    	if (getCookie('BNCK') == '') {
            alert('로그인 후 이용해 주세요');
            window.location.href="";
            return;
    	}
        return true;
    }
/*사용법<input name="a" type="image" id="a" onclick="loginAlert()" src="as.jpg" width="200" height="300"/>*/


/***************************
숫자만 입력제어 자바스크립트
****************************/
function checkNumber(el) {
        if (isNaN(el.value)) {
            alert("숫자만 입력할 수 있습니다.");
            el.value = el.value.replace(/\D/g,'');
            return "";
        }
        el.value = el.value.replace(/(^\s*)|(\s*$)/g, "");
    }
/*사용법<input name="answer4" type="text" id="answer4" onkeydown="checkNumber(this)"/>/>*/	


/*************************
글자순서 알림 자바스크립트
**************************/
function InputCheck(){
        if(!loginAlert()){ return false; } 
       form = document.event;
        if(form.answer1.value == ''){ alert('첫번째 글자를 입력해 주세요.'); form.answer1.focus(); return false; }
        if(form.answer2.value == ''){ alert('두번째 글자를 입력해 주세요.'); form.answer2.focus(); return false; }
        if(form.answer3.value == ''){ alert('세번째 글자를 입력해 주세요.'); form.answer3.focus(); return false; }
        if(form.answer4.value == ''){ alert('네번째 글자를 입력해 주세요.'); form.answer4.focus(); return false; }
        if(form.answer5.value == ''){ alert('다섯번째 글자를 입력해 주세요.'); form.answer5.focus(); return false; }
        return true;
    }
/*사용법<form id="ssd" name="ssd" method="post" action="" onSubmit="return InputCheck()">*/


/*****************
 팝업 자바스크립트
******************/
function chkPop(url,name,w,h,s)	{
	if ( getCookie(name) != "disable" )  {
		if(s!==0)	{
			sOp = ",scrollbars=yes";
		} else	{
			sOp = "";
		}
		winOptions = 'width='+w+',height='+h+',top=50,left=100' + sOp;
		window.open(url,name,winOptions);
	}
}
/*사용법<body onload="chkPop('a.html','popup01',400,290,0);">
<onClick="chkPop('a.html','popup01',400,290,0)">스크롤바는 0,1 값을 조절*/


function win(){ 
window.open("a.html","","width=400,height=300,left=100,top=100");
}


/*******************************
 팝업 중앙에 뛰우기 자바스크립트
********************************/
function Win_pop(url, winname, w, h, s) {
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  winprops = 'width='+w+',height='+h+',top='+wint+',left='+winl+',resizable=no,scrollbars='+s+',toolbars=no,status=no,menu=no';
  win = window.open(url, winname, winprops)
  if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
/*사용법<img src="aaa.gif" onClick="Win_pop('a.html','popup01',400,290,1)" />*/


/*******************
 롤오버 자바스크립트
********************/
function menuOver(obj) {	obj.src = obj.src.replace("off.gif", "on.gif");
}
function menuOut(obj) {	obj.src = obj.src.replace("on.gif", "off.gif");
}
/*사용법<img src="tabmanage01off.gif" onmouseover="menuOver(this)" onmouseout="menuOut(this)">파일명을 off,on으로 하여 제어*/


/*******************
 부드러운 이미지교체
********************/
var img1 = new Image(); 
img1.src = "../../image/main/quickmenu_01.jpg"; 
var img2 = new Image(); 
img2.src = "../../image/main/quickmenu_02.jpg"; 
var img3 = new Image(); 
img3.src = "../../image/main/quickmenu_03.jpg"; 
var maxLoops = 3; // 그림2개만 할 꺼면 2로 바꾸세요
var bInterval = 10; // 전환시 잠깐 멈춰있는 시간수치입니다
var count = 2; 
var url = new Array(
 '../../content/sub/sub_information_06.php',//링크경로
 '../../content/sub/sub_information_03.php',
 '../../content/sub/sub_information_05.php'
);
function move(){location.href=url[count-1];
}
function init() { blendtrjs.filters.blendTrans.apply(); document.images.blendtrjs.src = eval("img"+count+".src"); blendtrjs.filters.blendTrans.play(); 
if (count < maxLoops) { count++; 
 } 
 else { count = 1; 
 } 
setTimeout("init()", bInterval*700+2000); 
} 
/*사용법<a href='#' onClick='javascript:move()'><img src="경로" name="blendtrjs" width="123" height="65" border="0" style="filter: blendTrans(duration=2)"></a>*/


/*************
  탑으로 이동
**************/
function gotop() {
		document.body.scrollTop=0;
	}


/*********************
로그인박스 글자 사라짐
**********************/
function a(){
    myform.iid.value="";
}
function b(){myform.pwd.value="";
}
/*사용법<input type="password"name="pwd" value="비밀번호" onClick="b();"  class="input_box01">*/ 

