
/*
function swap_submenu(div_id) { // 메인 메뉴 하단 서브메뉴 영역 DIV를 열기/닫기
	var temp_display = document.getElementById(div_id).style.display;
	if(div_id == 'menu02_sub') {
		if(temp_display == 'block') {
			document.getElementById(div_id).style.display = 'none';
			try {
			document.getElementById('contents_view_about').style.height = "225px";
			} catch (e) {}
		} else {
			document.getElementById(div_id).style.display = 'block';
			document.getElementById('menu03_sub').style.display = 'none';
			try {
			document.getElementById('contents_view_about').style.height = "425px";
			} catch (e) {}
		}
	} else {
		if(temp_display == 'block') {
			document.getElementById(div_id).style.display = 'none';
			try {
			document.getElementById('contents_view_about').style.height = "225px";
			} catch (e) {}
		} else {
			document.getElementById(div_id).style.display = 'block';
			document.getElementById('menu02_sub').style.display = 'none';
			try {
			document.getElementById('contents_view_about').style.height = "425px";
			} catch (e) {}
		}
	}
}

function swap_submenu() {
	if (temp_menu == '1') { // 서브메뉴를 반드시 활성화함
		document.getElementById('menu02_sub').style.display = 'block';
	} if (temp_menu == '2') {
		document.getElementById('menu03_sub').style.display = 'block';
	}
}
*/



function swap_big_img(big_img) {
	document.getElementById('view_big_image_img').src = big_img;	
}














// 게시물 삭제시 예 아니오 확인한다. - /admin/list.html -> delete.php
function message_confirm(msg,url) {
	if(confirm(msg)) {
		location.href = url;
	} else {
		return false;
	}
}



//게시물 작성시 공백 확인
function checkIt(form) {

   if(!form.c_subject.value) {
      alert('제목을 입력하세요!');
      form.c_subject.focus();
      return;
   }

   form.submit();
}



















///// ZonnInOut ////////////////////////////////////////////////////////////////////////////// 
 var nowZoom = 100; // 현재비율
 var maxZoom = 200; // 최대비율
 var minZoom = 80; // 최소비율(현재와 같아야 함)
 var valueZoom = 10;

 // +, - 키를 입력하면 화면 확대, 축소를 한다.
 document.onkeypress = getKey;

 function getKey(keyStroke) {
  isNetscape = (document.layers);
  eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
  which = String.fromCharCode(eventChooser).toLowerCase();
  which2 = eventChooser;

  var el = event.srcElement;

  if ((el.tagName != "INPUT") && (el.tagName != "TEXTAREA")) {
   if (which == "+") {
    zoomIn();
   } else if (which == "-") {
    zoomOut();
   }
  }
 }

        //화면 키운다.
 function zoomIn() {
  if (nowZoom < maxZoom) {
   nowZoom += valueZoom; // 10%씩 커진다.
  } else {
   return;
  }

  document.body.style.zoom = nowZoom + "%";
 }
 
 //화면 줄인다.
 function zoomOut() {
  if (nowZoom > minZoom) {
   nowZoom -= valueZoom; // 10%씩 작아진다.
  } else {
   return;
  }

  document.body.style.zoom = nowZoom + "%";
 }


function basicZoom(){
	var currZoom = "100%" ;
	document.body.style.zoom = currZoom ;
}


function getBrowser() // 브라우져 체크 - 1 이 IE, 2가 FF
{
    var tempdocument = window.document;

    if (tempdocument.all && tempdocument.getelementbyid) // 인터넷 익스플로러 5.x
    { 
        return 1;
    }
    else if (tempdocument.all && !tempdocument.getelementbyid) // 인터넷 익스플로러 4.x
    { 
        return 1;
    }
    else if (tempdocument.getelementbyid && !tempdocument.all) // 넷스케이프 6
    { 
        return 2;
    }
    else if (tempdocument.layers) // 넷스케이프 4.x
    {     
        return 2;
    }
}
















