//플래시페이지 이동

function GoPage(code) {

	//INFO
	if ( !code )								{	window.location = "../main/index.html"; } 
	else if ( code == "main" )			{	window.location = "../main/main.php"; } //메인
	else if ( code == "sitemap" )		{	window.location = "../main/sitemap.php"; } //사이트맵
	else if ( code == "privacy" )		{	window.location = "../main/privacy.php"; } //개인정보보호정책
	else if ( code == "dontmail" )		{	window.location = "../main/dontmail.php"; } //이메일무단수집거부

	//MEMBER
	else if ( code == "login" )			{	window.location = "../cnMember/member_login.php"; } //로그인
	else if ( code == "logout" )		{	window.location = "../cnMember/logout.php"; }
	else if ( code == "searchid" )			{	window.open('../cnMember/idpass.php','idpass','scrollbars=no,width=484,height=310,top=0,left=0') } //아이디찾기
	else if ( code == "join" )			{	window.location = "../cnMember/member_join.php"; } //회원가입
	else if ( code == "leave" )			{	window.location = "../cnMember/member_out.php"; } //회원탈퇴
	else if ( code == "modify" )			{	window.location = "../cnMember/member_modify.php"; } //정보수정
	else if ( code == "privacy" )			{	window.location = "../cnMember/pageview.php?url=safeguard"; } //개인정보보호정책
	else if ( code == "agreement" )			{	window.location = "../cnMember/agreement.php"; } //이용약관
	else if ( code == "namecheck" )			{	window.location = "../cnMember/namecheck.php"; } //실명인증

	//COMPANY
	else if ( code == "1_1" )			{	window.location = "../main/sub1_1.php"; }
	else if ( code == "1_2" )			{	window.location = "../main/sub1_2.php"; }
	else if ( code == "1_3" )			{	window.location = "../main/sub1_3.php"; }
	else if ( code == "1_4" )			{	window.location = "../main/sub1_4.php"; }
	else if ( code == "1_5" )			{	window.location = "../main/sub1_5.php"; }
	else if ( code == "1_6" )			{	window.location = "../main/sub1_6.php"; }
	else if ( code == "1_7" )			{	window.location = "../main/sub1_7.php"; }

	//PRODUCT
	else if ( code == "2_1" )			{	window.location = "../main/sub2_1.php"; }
	else if ( code == "2_2" )			{	window.location = "../main/sub2_2.php"; }
	
	//SOLUTION
	else if ( code == "3_1" )			{	window.location = "../main/sub3_1.php"; }
	else if ( code == "3_2" )			{	window.location = "../main/sub3_2.php"; }
	else if ( code == "3_3" )			{	window.location = "../main/sub3_3.php"; }
	else if ( code == "3_4" )			{	window.location = "../main/sub3_4.php"; }
	else if ( code == "3_5" )			{	window.location = "../main/sub3_5.php"; }
	else if ( code == "3_6" )			{	window.location = "../main/sub3_6.php"; }
	else if ( code == "3_7" )			{	window.location = "../main/sub3_7.php"; }
	else if ( code == "3_8" )			{	window.location = "../main/sub3_8.php"; }
	else if ( code == "3_9" )			{	window.location = "../main/sub3_9.php"; }
	else if ( code == "3_10" )			{	window.location = "../main/sub3_10.php"; }
	else if ( code == "3_11" )			{	window.location = "../main/sub3_11.php"; }
	else if ( code == "3_12" )			{	window.location = "../main/sub3_12.php"; }
	else if ( code == "3_13" )			{	window.location = "../main/sub3_13.php"; }
	else if ( code == "3_14" )			{	window.location = "../main/sub3_14.php"; }
	
	//SERVICE
	else if ( code == "4_1" )			{	window.location = "../main/sub4_1.php"; }
	else if ( code == "4_2" )			{	window.location = "../main/sub4_2.php"; }
	else if ( code == "4_3" )			{	window.location = "../main/sub4_3.php"; }
	else if ( code == "4_4" )			{	window.location = "../main/sub4_4.php"; }

	//CUSTOMER
	else if ( code == "5_1" )			{	window.location = "../main/sub5_1.php"; }
	else if ( code == "5_2" )			{	window.location = "../main/sub5_2.php"; }
	else if ( code == "5_3" )			{	window.location = "../main/sub5_3.php"; }
	else if ( code == "5_4" )			{	window.location = "../main/sub5_4.php"; }
	else if ( code == "5_5" )			{	window.location = "../main/sub5_5.php"; }
	else if ( code == "5_6" )			{	window.location = "../main/sub5_6_1.php"; }
	else if ( code == "5_6_1" )			{	window.location = "../main/sub5_6_1.php"; }	
	else if ( code == "5_6_2" )			{	window.location = "../main/sub5_6_2.php"; }	
	else if ( code == "5_7" )			{	window.location = "../main/sub5_7.php"; }	

	//CUSTOMER
	else if ( code == "6_1" )			{	window.location = "../main/sub6_1.php"; }

	//INFO
	/*
	else if ( code == "7_1" )		{	window.location = "../dsbbs/sub7_1.php"; } //사이트맵
	*/
	
	//개인정보보호정책
	/*
	else if ( code == "law" )		{	window.location = "../dsbbs/sorry.php"; }
	*/
	
	//링크
	/*
	else if ( code == "link" )		{	window.location = "../dsbbs/sorry.php"; }

	else if ( code == "sitemap" )		{	window.location = "../dsbbs/sorry.php"; }
	*/
	
	
	//회원관리
	/*
	else if ( code == "0_1" )		{	window.location = "../member/sub1.htm?part=1"; } //회원가입
	else if ( code == "0_2" )		{	window.location = "../member/sub2.htm?part=2"; } //로그인
	else if ( code == "0_3" )		{	window.open('../member/pop_id.php','IDPASS','width=350,height=240,top=0,left=0') } //아이디찾기
	else if ( code == "0_4" )		{	window.open('../member/pop_pw.php','IDPASS','width=400,height=300,top=0,left=0') } //비밀번호찾기
	else if ( code == "0_5" )		{	window.open('../member/pop_kolas.php','IDPASS','width=350,height=280,top=0,left=0') } //대출회원등록
	else if ( code == "0_6" )		{	window.open('../member/pop_ad.php','IDPASS','width=350,height=300,top=0,left=0') } //우편번호검색
	else if ( code == "0_7" )		{	window.open('../member/pop_id1.php','IDPASS','width=350,height=240,top=0,left=0') } //아이디찾기
	*/
	
}

function bluring()//익스 전용
{
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG")document.body.focus();
}
document.onfocusin=bluring

//메뉴 롤오버 START
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_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];}
}
//메뉴 롤오버 END

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//새창 링크 START
function GoLayer()
{ 
        var y;
        if ( top.frames.length )
        if ( bNetscape4plus ) {
                document["divMenu"].top = top.pageYOffset + 280;//웹에 띄웠을때 시작점
                document["divMenu"].visibility = "visible";
        }
        else if ( bExplorer4plus ) {
                divMenu.style.top = document.body.scrollTop + 280;//웹에 띄웠을때 시작점
                divMenu.style.visibility = "visible";
        }
        CheckUIElements();
        return true;
}

function open_win(val, wname, wopt, menu) {
	var newopt = "", wHeight = 0, wWidth = 0;
	if (wopt != undefined) {
		var woptlist = wopt.replace(/ /g, "").split(",");
		for (var i in woptlist) {
			if (woptlist[i].match(/^height=/i)) {
				wHeight = parseInt(woptlist[i].substr(7),10);
				if (!isNaN(wHeight)) newopt += "top=" + Math.floor((screen.availHeight - wHeight) / 2) + ",";
			}
			if (woptlist[i].match(/^width=/i)) {
				wWidth = parseInt(woptlist[i].substr(6),10);
				if (!isNaN(wWidth)) newopt += "left=" + Math.floor((screen.availWidth - wWidth) / 2) + ",";
			}
		}
	}

	url = val + "?" + menu;
	window.open(url, wname, newopt + wopt); 
} 
//새창 링크 END

//검색 배경 START
function setClearSch() {
QLink	   = "";
var textbox = document.search.src_value;
textbox.style.backgroundImage="";
}
//검색 배경 END

//LOgin ID BG START
function setClearLgName() {
QLink	   = "";
var textbox = document.loginForm.user_id;
textbox.style.backgroundImage="";
}
//LOgin ID BG END

//LOgin PW BG START
function setClearLgPwd() {
QLink	   = "";
var textbox = document.loginForm.user_pw;
textbox.style.backgroundImage="";
}
//LOgin PW BG END

//댓글 이름 배경 START
function setClearCmName() {
QLink	   = "";
var textbox = document.comment_write.w_name;
textbox.style.backgroundImage="";
}
//댓글 이름 배경 END

//댓글 패스워드 배경 START
function setClearCmPwd() {
QLink	   = "";
var textbox = document.comment_write.w_pwd;
textbox.style.backgroundImage="";
}
//댓글 패스워드 배경 END

//숫자체크 START1
function Numberchk() {
    if (event.keyCode < 45 || event.keyCode > 57) event.returnValue = false;
}

function num_only( Ev ){
    var evCode = ( window.netscape ) ? Ev.which : event.keyCode ;
    /* FF일 경우 Ev.which 값을,
        IE을 경우 event.keyCode 값을 evCode에 대입 */
    if ( ! ( evCode == 0 || evCode == 8 || ( evCode > 47 && evCode < 58 ) ) ) {
    /* 눌러진 키 코드가 숫자가 아닌 경우
        ( '0'은 FF에서 Tab 키,
          '8'은 FF에서 BackSpace가 먹히지 않아 삽입)    */
        if ( window.netscape ) {        // FF일 경우
            Ev.preventDefault() ;        // 이벤트 무효화
        } else {                                // IE일 경우
            event.returnValue=false;    // 이벤트 무효화
        }
    }
}
//숫자체크 END

//숫자 가격표시 START
function vComma(obj) {
    var str    = "" + obj.value.replace(/,/gi,''); // 콤마 제거
    var regx    = new RegExp(/(-?\d+)(\d{3})/);
    var bExists = str.indexOf(".",0);
    var strArr  = str.split('.');
    while(regx.test(strArr[0])){
        strArr[0] = strArr[0].replace(regx,"$1,$2");
    }
    if (bExists > -1)
        obj.value = strArr[0] + "." + strArr[1];
    else
        obj.value = strArr[0];
}
//숫자 가격표시 END

//이미지 슬라이드 뷰어 START
var maxW,maxH,fromX,fromY,toX,toY,adjX,adjY,zBox,zStep=0,zLink,zNew;

function zoomBox(evt,zlink,maxw,maxh,tox,toy)
{
        if (arguments.length > 2)
        {
                zNew=1;
        }
        scrollH = (window.pageYOffset!=null)?window.pageYOffset:document.body.scrollTop;
        maxW = maxw?maxw:window.innerWidth?innerWidth:document.body.clientWidth;
        maxH = maxh?maxh:window.innerHeight?innerHeight:document.body.clientHeight;
        toX = tox?tox:0;
        toY = (toy?toy:0)+scrollH;
        fromX = evt.pageX?evt.pageX:evt.clientX;
        fromY = (evt.pageY?evt.pageY:evt.clientY)+(document.all?scrollH:0);
        adjX = toX+evt.screenX-fromX;
        adjY = toY+evt.screenY-fromY;

        if (document.createElement && document.body.appendChild && !zBox)
        {
                zBox=document.createElement("div");
                zBox.style.position = "absolute";
                document.body.appendChild(zBox);
        }
        else if (document.all && !zBox) 
        {
                document.all[document.all.length-1].outerHTML+='<div id="zBoxDiv" style="position:absolute"></div>';
                zBox=document.all.zBoxDiv;
        }
        else if (document.layers && !zBox)
        {
                zBox = new Layer(maxW);
                zBox.style=zBox;
        }

        zLink = zlink;
        doZoom();
}

function doZoom() {
        zStep+=1;
        zPct=(10-zStep)/10
        if (document.layers)
        {
                zBox.moveTo(toX+zPct*(fromX-toX),toY+zPct*(fromY-toY));
                zBox.document.open();
                zBox.document.write("<table width='"+maxW*(1-zPct)+"' height="+maxH*(1-zPct)+" border=2 cellspacing=0><tr><td></td></tr></table>");
                zBox.document.close();
        }
        else 
        {
                zBox.style.border = "2px solid #999999"; // 테두리 굵기px solid 테두리 색 
                zBox.style.left = toX+zPct*(fromX-toX);
                zBox.style.top = toY+zPct*(fromY-toY);
                zBox.style.width = maxW*(1-zPct);
                zBox.style.height = maxH*(1-zPct);
        }

        zBox.style.visibility = "visible";
        
        if (zStep < 10)
        {
                setTimeout("doZoom("+fromX+","+fromY+","+toX+","+toY+")",30);
        }
        else
        {
                zBox.style.visibility='hidden';
                zStep=0;
                if (zLink && !zNew)
                {
                        location.href=zLink.href;
                }
                else if (zLink && zNew)
                {
                        var w=window.open(zLink.href,'book_mdf','width='+maxW+',height='+maxH+',left='+adjX+',top='+adjY+',scrollbars=yes');
                        zNew=null;
                }
        }
}
//이미지 슬라이드 END

//이미지 원본 오픈 START
function openImageLayerCenter(title,source){
    var imgElm=new Image();imgElm.src=source;
    var imageLayer=document.createElement("div");
    imageLayer.innerHTML="&nbsp;"+title;

    if(imgElm.complete){
        imageLayer.style.cssText="z-index;99999;position:absolute;top:"+(document.body.clientHeight-imgElm.height)/2+";left:"+(document.body.clientWidth-imgElm.width)/2+";width:"+imgElm.width+";height:"+imgElm.height+";cursor:hand;border:1px solid #555555;padding:4 4 4 4;font:normal 12px lucida console;color:white;background-color:555555;";
    }else{
        imageLayer.style.cssText="z-index;99999;position:absolute;top:-4000;left:-4000;cursor:hand;border:1px solid deeppink;padding:0 0 0 0;font:normal 12px lucida console;color:white;background-color:555555;";
    }

    with(imageLayer.appendChild(document.createElement("div")))
    {
        style.cssText="padding:1 1 1 1;background-color:888888;";
        with(appendChild(document.createElement("div")))
        {
            style.cssText="padding:5;background-color:white;";
            with(appendChild(document.createElement("img")))
            {
                src=source;
                if(!imgElm.complete){
                    onload=function(){//resize
                        with(this.parentNode.parentNode.parentNode.style){
                            left=(document.body.clientWidth-this.width)/2;
                            top=(document.body.clientHeight-this.height)/2;
                            width=this.width;
                            height=this.height;
                        }
                    };//onload
                }

                onclick=function(){//remove
                    var win=this.parentNode.parentNode.parentNode;
                    win.parentNode.removeChild(win);
                };//onclick
            }//with
        }//with
    }//with
    document.body.appendChild(imageLayer);
}
//이미지 원본 오픈 END

//팝업창 정중앙 오픈 START
function newWindow(a_str_windowURL, a_str_windowName, a_int_windowWidth, a_int_windowHeight, a_bool_scrollbars, a_bool_resizable, a_bool_menubar, a_bool_toolbar, a_bool_addressbar, a_bool_statusbar, a_bool_fullscreen) {
  var int_windowLeft = (screen.width - a_int_windowWidth) / 2;
  var int_windowTop = (screen.height - a_int_windowHeight) / 2;
  var str_windowProperties = 'height=' + a_int_windowHeight + ',width=' + a_int_windowWidth + ',top=' + int_windowTop + ',left=' + int_windowLeft + ',scrollbars=' + a_bool_scrollbars + ',resizable=' + a_bool_resizable + ',menubar=' + a_bool_menubar + ',toolbar=' + a_bool_toolbar + ',location=' + a_bool_addressbar + ',statusbar=' + a_bool_statusbar + ',fullscreen=' + a_bool_fullscreen + '';
  var obj_window = window.open(a_str_windowURL, a_str_windowName, str_windowProperties)
    if (parseInt(navigator.appVersion) >= 4) {
      obj_window.window.focus();
    }
}
//팝업창 정중앙 오픈 END

function showCalendar(y, m) {
    var text = '<table>\n<tr><td colspan=7 style="text-align:center">';
    text += '<span onclick="showCalendar('+(y-1)+','+m+')"> Y- </span>';
    text += '<span onclick="showCalendar('+(m==1?(y-1)+','+12:y+','+(m-1))+')"> M- </span>';
    text += '[' + y + '/' + ((m < 10) ? ('0' + m) : m) + ']';
    text += '<span onclick="showCalendar('+(m==12?(y+1)+','+1:y+','+(m+1))+')"> M+ </span>';
    text += '<span onclick="showCalendar('+(y+1)+','+m+')"> Y+ </span>';
    text += '</td>';

    var d1 = (y+(y-y%4)/4-(y-y%100)/100+(y-y%400)/400
          +m*2+(m*5-m*5%9)/9-(m<3?y%4||y%100==0&&y%400?2:3:4))%7;
    for (i = 0; i < 42; i++) {
        if (i%7==0) text += '</tr>\n<tr>';
        if (i < d1 || i >= d1+(m*9-m*9%8)/8%2+(m==2?y%4||y%100==0&&y%400?28:29:30))
            text += '<td> </td>';
        else
            text += '<td' + (i%7 ? '' : ' style="color:red;"') + '>' + (i+1-d1) + '</td>';
    }
    document.getElementById('calendarDiv').innerHTML = text + '</tr>\n</table>';
} 


<!--
var bNetscape4plus = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4");
var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");
function CheckUIElements(){
	var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;
	
	if ( bNetscape4plus ) { 
		yMenuFrom = document["divMenu"].top;
		yMenuTo = top.pageYOffset + 62;
	} else if ( bExplorer4plus ) {
		yMenuFrom = parseInt (divMenu.style.top, 10);
		yMenuTo = document.body.scrollTop+300;

		
		// 2006-10-30 9:41오후 현태 추가
		var yMaxTo = document.body.scrollHeight - parseInt(divMenu.offsetHeight) - 1;
		if(yMaxTo < yMenuTo) yMenuTo = yMaxTo;
		// 현태추가 끝
	}
	
	timeoutNextCheck = 500;

	if ( Math.abs (yButtonFrom - (yMenuTo + 152)) < 6 && yButtonTo < yButtonFrom ) {
		setTimeout ("CheckUIElements()", timeoutNextCheck);
		return;
	}


	if ( yButtonFrom != yButtonTo ) {
		yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 10 );
		if ( yButtonTo < yButtonFrom ) yOffset = -yOffset;
		
		if ( bNetscape4plus ) 		document["divLinkButton"].top += yOffset;
		else if ( bExplorer4plus ) divLinkButton.style.top = parseInt (divLinkButton.style.top, 10) + yOffset;
		
		timeoutNextCheck = 10;
	}
	if ( yMenuFrom != yMenuTo ) {
		yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
		
		if ( yMenuTo < yMenuFrom ) yOffset = -yOffset;
		
		if ( bNetscape4plus ) 		document["divMenu"].top += yOffset;
		else if ( bExplorer4plus ) divMenu.style.top = parseInt (divMenu.style.top, 10) + yOffset;
		
		timeoutNextCheck = 10;
	}

	setTimeout ("CheckUIElements()", timeoutNextCheck);
}

function OnLoad() {
	var y;
	if ( top.frames.length ) {
		if ( bNetscape4plus ) {
		document["divMenu"].top = top.pageYOffset + 500;
		document["divMenu"].visibility = "visible";
		}
	} else if ( bExplorer4plus ) {
		divMenu.style.top = document.body.scrollTop + 500;
		divMenu.style.visibility = "visible";
	}
	
	CheckUIElements();
	return true;
}

//스크롤바 따라다니는 메뉴
function IEZN_quick_menu_simple(input_obj,move_top){
    this.timeId     = new Array();
    this.div_obj = new Array();
    try{
        this.input_obj = input_obj;
        this.input_obj.style.display = 'none';
    }catch(e){}
    var IEZN_quick_menu_counter;
    IEZN_quick_menu_counter = (typeof(IEZN_quick_menu_counter)=='undefined')? 0:IEZN_quick_menu_counter++;
    this.counter = IEZN_quick_menu_counter;
    this.div_obj_top = parseInt(this.input_obj.style.top);
    this.div_obj_left = parseInt(this.input_obj.style.left);    
    this.div_obj_max_move_top = (move_top)? move_top:this.div_obj_top;//browser top offset 
    this.move();
}

IEZN_quick_menu_simple.prototype = {    
    move : function(){
        this.div_obj = document.createElement("div");
        this.div_obj.id='izqm1'+this.counter;
        this.div_obj.style.position = 'absolute';
        this.div_obj.style.top=this.div_obj_top+'px';
        this.div_obj.style.padding='0px';
        this.div_obj.style.left=this.div_obj_left+'px';
        this.div_obj.style.backgroundColor=(this.input_obj.style.backgroundColor)? this.input_obj.style.backgroundColor:'transparent';
        this.div_obj.style.overflow='hidden';
        this.div_obj.style.textOverflow='ellipsis';
        this.div_obj.style.width=this.input_obj.style.width;
        this.div_obj.style.border=this.input_obj.style.border;
        this.div_obj.style.padding=this.input_obj.style.padding;
        try{
            document.body.appendChild(this.div_obj);            
            this.div_obj.innerHTML = this.input_obj.innerHTML;
            this.move_menu();
        }catch(e){alert(e)}
    },
    move_menu : function (){
        var obj = this;
        this.div_obj_start = parseInt(this.div_obj.style.top,10);
        this.div_obj_end = parseInt(this.scrollTop()) + parseInt(this.div_obj_max_move_top,10);
        if (this.div_obj_end < parseInt(this.div_obj_top,10)) this.div_obj_end = parseInt(this.div_obj_top,10);
        if (this.div_obj_start != this.div_obj_end ) {
            this.div_obj_offset = Math.ceil(Math.abs( this.div_obj_end - this.div_obj_start ) / 15 );
            t = parseInt(this.div_obj.style.top, 10) + ((this.div_obj_end<this.div_obj_start)? this.div_obj_offset*-1:this.div_obj_offset);
            this.div_obj.style.top = t+'px';
            this.slide_time = 10;
        }
        this.timeId[this.div_obj.id] = window.setTimeout(function(){obj.move_menu()},this.slide_time);
    },
    scrollTop : function (){//xhtml doctype patch
        if (window.pageYOffset){
            scroll_top = window.pageYOffset
        }else if (document.documentElement && document.documentElement.scrollTop){
            scroll_top = document.documentElement.scrollTop
        }else if (document.body){
            scroll_top = document.body.scrollTop
        }
        return scroll_top;
    }
}


//이미지롤오버
function imgRollover(imgBoxID){
 var MenuCounts = dEI(imgBoxID).getElementsByTagName("img");
 for (i=0;i<MenuCounts.length;i++) {
  var numImg=MenuCounts.item(i);
  var ImgCheck = numImg.src.substring(numImg.src.length-6,numImg.src.length);
  if (ImgCheck!="on.gif") {
    numImg.onmouseover = function () {
     this.src = this.src.replace(".gif", "on.gif");
    }
    numImg.onmouseout = function () {
     this.src = this.src.replace("on.gif", ".gif");
    }
   }
 }
}

/*
PageNum : 페이지에 지정해준 $subnum 과 같은 번호를 지정한다. 그냥 변수를 써주면 된다. 아래처럼..
OverNum : 이미지에 오버했을때 이미지의 번호이다. 아래처럼 sub1_menu1.gif 라면 menu1 의 1이 OverNum이 된다.
                이 번호와PageNum이 같을때 롤오버된 이미지를 출력한다.
ImagePath : 이미지의 경로
OverImage : 롤오버시 출력할 이미지의 파일명
OutImage : 롤아웃시 출력할 이미지의 파일명
LinkUrl : 메뉴를 클릭했을때 이동할 링크 주소
Target : 새창으로 열시 현재창으로 열지.. (_self,_blank 등)
ImgMenuCode : 코드명 페이지 이동
*/
function ImgMenuClass(PageNum,OverNum,ImagePath,OverImage,OutImage,LinkUrl,Target){
	if(PageNum==OverNum) {
	  var ImageName=OverImage;
	  var OverImg=OverImage;
	  var OutImg=OverImage;
	}else{
		var OverImg=OverImage;
		var OutImg=OutImage;
		var ImageName=OutImage;
	}
	var ImageAreaID="ImgClass_"+OverNum;
	var ImageURL=ImagePath+"/"+ImageName;
	var HTML="<a href="+LinkUrl+" ";
	HTML+="target="+Target+" ";
	HTML+="onmouseover=ImgMenu('"+OverNum+"','"+ImagePath+"','"+OverImg+"') ";
	HTML+="onmouseout=ImgMenu('"+OverNum+"','"+ImagePath+"','"+OutImg+"') ";
	HTML+=">";
	HTML+="<img src='"+ImageURL+"' align=absmiddle id="+ImageAreaID+">";
	HTML+="</a>";
	document.getElementById("ImgMenuArea_"+OverNum).innerHTML=HTML;
}

function ImgMenu(OverNum, ImagePath, ImageName){
	var ImageID="ImgClass_"+OverNum;
	var ImageURL=ImagePath+"/"+ImageName;
	document.getElementById(ImageID).src=ImageURL;
}

function ImgMenuCode(PageNum,OverNum,ImagePath,OverImage,OutImage,LinkUrl,Target){
	if(PageNum==OverNum) {
	  var ImageName=OverImage;
	  var OverImg=OverImage;
	  var OutImg=OverImage;
	}else{
		var OverImg=OverImage;
		var OutImg=OutImage;
		var ImageName=OutImage;
	}
	var ImageAreaID="ImgClass_"+OverNum;
	var ImageURL=ImagePath+"/"+ImageName;
	//var HTML="<a href="+LinkUrl+" ";
	var HTML="<a href=javascript:GoPage('"+LinkUrl+"') ";
	//HTML+="target="+Target+" ";
	HTML+="onmouseover=ImgMenu('"+OverNum+"','"+ImagePath+"','"+OverImg+"') ";
	HTML+="onmouseout=ImgMenu('"+OverNum+"','"+ImagePath+"','"+OutImg+"') ";
	HTML+=">";
	HTML+="<img src='"+ImageURL+"' align=absmiddle id="+ImageAreaID+">";
	HTML+="</a>";
	document.getElementById("ImgMenuArea_"+OverNum).innerHTML=HTML;
}

