	
	var sw=screen.availWidth;
	var sh=screen.availHeight;
	var cw= sw - 50;
	var ch= sh - 50;
	var px=(sw-cw)/2;
	var py=(sh-ch)/2;
	
	// 화면 확대 축소
	var zoomRate = 10;
	var curRate = 100;
	var minRate = 100;
	var maxRate = 200;

	function zoomInOut(value) {
		var browserEl = navigator.userAgent.toLowerCase();

		if(browserEl.indexOf('firefox')!=-1) { alert("익스플로러전용기능입니다. 보기메뉴 - 크기조정 - 확대/축소를 이용하세요."); }
		else if(browserEl.indexOf('opera')!=-1) { alert("익스플로러전용기능입니다. 보기메뉴 - zoom을 이용하세요."); }
		else if(browserEl.indexOf('safari')!=-1) { alert("익스플로러전용기능입니다. 보기메뉴 - 텍스트크게/작게를 이용하세요."); }
		if (((value == "plus")&&(curRate >= maxRate))||((value == "minus") && (curRate <= minRate))) {
		    return;
		}  
		if (value == "plus") {
			curRate = parseInt(curRate) + parseInt(zoomRate);
		} else if (value == "minus") {
			curRate = parseInt(curRate) - parseInt(zoomRate);
		} else {
			curRate = 100;
		}
		document.body.style.zoom = curRate + '%';
	}

function winOpen(URL,w,h,t,l){

	// 설문 팝업창에서 호출될 경우 위치 지정 가능
	if(t != null){
		py = t;
	}
	if(t != null){
		px = l;
	}
	
	window.open(URL, "","left="+px+",top="+py+",width="+w+", height="+h+", menubar=no, scrollbars=yes, resizable=yes, status=no, toolbar=no");
}

//팝업 쿠키 설정
function setCookie( name, value, expiredays ) {
	//alert("popup_"+name + "=" + escape( value ));
	var todayDate = new Date(); 
	todayDate.setDate( todayDate.getDate() + expiredays ); 
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";";
 
} 

// 팝업 쿠키값 가져오기
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 ""; 
}

// iframe 리사이징
function resizeFrame(iframeObj){
	var innerBody = iframeObj.contentWindow.document.body;
	
	var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
	var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
	
	iframeObj.style.height = innerHeight+30;
	iframeObj.style.width = innerWidth+10;
	
	// this.scrollTo(1,1);  ↑ 클릭시 화면 맨위로 가는 현상때문에 저는 주석처리
}

// iframe 높이만 리사이징
function resizeFrame2(iframeObj){
	var innerBody = iframeObj.contentWindow.document.body;
	
	var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
	
	iframeObj.style.height = innerHeight+30;
	
	// this.scrollTo(1,1);  ↑ 클릭시 화면 맨위로 가는 현상때문에 저는 주석처리
}

	function resizeImg(img){
	
	   // 원본 이미지 사이즈 저장
	   var width = img.width;
	   var height = img.height;

	   //alert("width= "+width+"@height= "+height);
	
	   // 가로, 세로 최대 사이즈 설정
	   var maxWidth = '640';   // 원하는대로 설정. 픽셀로 하려면 maxWidth = 100  이런 식으로 입력
	   var maxHeight = '400';   // 원래 사이즈 * 0.5 = 50%

	   // 가로나 세로의 길이가 최대 사이즈보다 크면 실행  
	   if(width > maxWidth || height > maxHeight){

	      // 가로가 세로보다 크면 가로는 최대사이즈로, 세로는 비율 맞춰 리사이즈
	      if(width > maxWidth){
	         resizeWidth = maxWidth;
	         resizeHeight = Math.round((height * resizeWidth) / width);
	      }
	      
	      // 세로가 가로보다 크면 세로는 최대사이즈로, 가로는 비율 맞춰 리사이즈
	      if(height > maxHeight){
	         resizeHeight = maxHeight;
	         resizeWidth = Math.round((width * resizeHeight) / height);
	      }

	   // 최대사이즈보다 작으면 원본 그대로
	   }else{
	      resizeWidth = width;
	      resizeHeight = height;
	   }

	   // 리사이즈한 크기로 이미지 크기 다시 지정
	   img.width = resizeWidth;
	   img.height = resizeHeight;
	   //alert("width= "+resizeWidth+"@height= "+resizeHeight);
	}

/* TEXT박스 유효값체크 : 숫자만 가능  onkeyup="CheckOnlyNumber(this);"  */
function CheckOnlyNumber(TextBoxControl)
{ 
 inputValue = TextBoxControl.value.replace(/ /g, "") ;
 if(inputValue.replace(/\d/g,"").length!=0)
 {
  alert("숫자만 입력해주세요.");
  TextBoxControl.value = "";
  TextBoxControl.focus();
  return false ;
 } 
 return true ;
}

	/* 자바스크립트에서 POST방식으로 데이터 전송하기
	 * 	파라미터 : 주소, 액션폼이름, 인풋네임, 값
	 *   
	 *  사용페이지 : /crm/left.jsp 
	 */
	function goPageByPost(URL,formName,target,inputName1,param1,inputName2,param2,inputName3,param3){ 
		 
		// Form객체를 만들고 속성값들을 추가함
		
		//alert("\nURL = "+URL+"\nformName = "+formName+"\ntarget = "+target+"\nparam1 = "+param1+"\nparam2 = "+param2+"\nparam3 = "+param3);
		var oForm = document.createElement("<form name='"+formName+"'></form>");
		
		oForm.target = "target";
		oForm.method = "post";
		oForm.action = URL;
		
		// TextBox를 생성함
		var searchObj1 = document.createElement("<input type='hidden'  name='"+inputName1+"'>");
		searchObj1.value = param1;
		
		// Form안에 TextBox를 넣음
		oForm.appendChild(searchObj1);
		
		// TextBox를 생성함
		var searchObj2 = document.createElement("<input type='hidden'  name='"+inputName2+"'>");
		searchObj2.value = param2;
		
		// Form안에 TextBox를 넣음
		oForm.appendChild(searchObj2);
		
		// TextBox를 생성함
		var searchObj3 = document.createElement("<input type='hidden'  name='"+inputName3+"'>");
		searchObj3.value = param3;
		
		// Form안에 TextBox를 넣음
		oForm.appendChild(searchObj3);
		
		// Body안에 Form을 넣음
		document.body.appendChild(oForm);
		
		// 해당 Form을 Submit함
		oForm.submit();
	}	
	
// 통합검색 스타일
	
	function startCateScrollScroll() {
	    setTimeout("slideCateScroll()", 2);
	}
	function slideCateScroll() {
	    var Sel_Height=100; 
	        el = document.getElementById("scroll-list");
	    if (el.heightPos == null || (el.isDone && el.isOn == false)) {
	        el.isDone = false;
	        el.heightPos = 1;
	        el.heightTo = Sel_Height;
	    } else if (el.isDone && el.isOn){
	        el.isDone = false;
	        el.heightTo = 1; 
	    }
	    if (Math.abs(el.heightTo - el.heightPos) > 1) {
	        el.heightPos += (el.heightTo - el.heightPos) / 10;
	        el.style.height = el.heightPos + "px";
	        startCateScrollScroll();
	    } else {
	    if (el.heightTo == Sel_Height) {
	        el.isOn = true;
	    } else {
	        el.isOn = false;
	    }
	        el.heightPos = el.heightTo;
	        el.style.height = el.heightPos + "px";
	        el.isDone = true;
	    }
	}

	
	// 롤오버 이미지
	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];}
	}

// flashWrite(파일경로, 가로, 세로, 아이디, 배경색, 변수, 윈도우모드)
function acivate(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=10,0,32,18' 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+"' />"+
	"<param name='base' value='.'>"+

	"<embed base='.' 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);

}











//************************************** ************* **************************************//
//************************************** 새올 common.js **************************************//
//************************************** ************* **************************************//





//************************************** 날짜 출력방식 S **************************************//
function f_dispDate(full_date , mode){
	var year ;
	var month ;
	var date ;
	if(mode){
       year = full_date.toString().substring(0, 4) + "년 ";
       month = full_date.toString().substring(4, 6) + "월 ";
       date = full_date.toString().substring(6, 8) + "일 ";
    }else {
       year = full_date.toString().substring(0, 4) + "/";
       month = full_date.toString().substring(4, 6) + "/";
       date = full_date.toString().substring(6, 8) ;
    }
      document.write(year + month + date);

}

function ff(){document.write("출력");}
//************************************** 날짜 출력방식  E**************************************//
//************************************** 팝업창 **************************************//

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',noresize'
	win = window.open(mypage,myname,settings)
}

//************************************** left menu type b script **************************************//

var WM_BOTTOM = "bottom";
var WM_RIGHT = "right";

var MARGIN_BOTTOM = 1;
var MARGIN_RIGHT = 1;
var currentItem = null;
var menuTrail = new Array();
var currentStyleOff = null;

function wmItemOn(item, level, styleOn, styleOff, submenuId, submenuPosition) {

  debug("level:" + level + ", styleOn:" + styleOn + ", styleOff:" + styleOff + ", submenu:" + submenuId + "/" + submenuPosition);

  stopOffTimer();

  // turn off previous item
  if (currentItem != null) {
	if (styleOff != currentStyleOff && currentStyleOff != null) {
	  currentItem.className = currentStyleOff;
	} else {
	  currentItem.className = styleOff;
	}
  }

  // make this item new current item
  currentItem = item;
  item.className = styleOn;
  currentStyleOff = styleOff;


  if (submenuId != null) {

	// take care of attached submenu

	hide(level);

	var menu = document.getElementById(submenuId);

	// item dimensions: item.offsetHeight, item.offsetWidth
	if (submenuPosition == WM_BOTTOM) {
	  menu.style.top = findOffsetTop(item) + item.offsetHeight + MARGIN_BOTTOM;
	  menu.style.left = findOffsetLeft(item);
	}

	if (submenuPosition == WM_RIGHT) {
	  menu.style.top = findOffsetTop(item);
	  menu.style.left = findOffsetLeft(item) + item.offsetWidth + MARGIN_RIGHT;
	}

	menu.style.visibility = "visible";

	menuTrail[level] = menu;
  } else {
	hide(level);
  }

}

function hide(level) {
  for (var i = level; i < menuTrail.length; i++) {
	menuTrail[i].style.visibility = "hidden";
  }
}

var timerID = null;
var timerOn = false;
var timecount = 250;

function wmStartOffTimer() {
  if (timerOn == false) {
	timerID = setTimeout("offAll()", timecount);
	timerOn = true;
  }
}

function stopOffTimer() {
  if (timerOn) {
	clearTimeout(timerID);
	timerID = null;
	timerOn = false;
  }
}

function offAll() {
  hide(0);

  if (currentStyleOff != null) {
	currentItem.className = currentStyleOff;
  }

  debug("All off by timer.");
}

var debugId = "wmDebug";

function debug(text) {
  var debug = document.getElementById(debugId);
  if (debug != null) {
	 debug.innerHTML = "≫ " + text + "<br>" + debug.innerHTML;
  }
}

function findOffsetLeft(obj){
  var curleft = -30;
  if (obj.offsetParent){
	while (obj.offsetParent){
	  curleft += obj.offsetLeft
		obj = obj.offsetParent;
	}
  }else if (obj.x){
	curleft += obj.x;
  }

  return curleft;
}

// Find total top offset.
function findOffsetTop(obj){
  var curtop = 0;
  if (obj.offsetParent)    {
	while (obj.offsetParent){
	  curtop += obj.offsetTop
	  obj = obj.offsetParent;
	}
  }else if (obj.y){
	curtop += obj.y;
  }

  return curtop;
}

//************************************** Table Round Script **************************************//

function roundTable(objID) {
   var obj = document.getElementById(objID);
   var Parent, objTmp, Table, TBody, TR, TD;
   var bdcolor, bgcolor, Space;
   var trIDX, tdIDX, MAX;
   var styleWidth, styleHeight;

   Parent = obj.parentNode;
   objTmp = document.createElement('SPAN');
   Parent.insertBefore(objTmp, obj);
   Parent.removeChild(obj);

   bdcolor = obj.getAttribute('rborder');
   bgcolor = obj.getAttribute('rbgcolor');
   radius = parseInt(obj.getAttribute('radius'));
   if (radius == null || radius < 1) radius = 1;
   else if (radius > 6) radius = 6;

   MAX = radius * 2 + 1;

   Table = document.createElement('TABLE');
   TBody = document.createElement('TBODY');

   Table.cellSpacing = 0;
   Table.cellPadding = 0;

   for (trIDX=0; trIDX < MAX; trIDX++) {
		  TR = document.createElement('TR');
		  Space = Math.abs(trIDX - parseInt(radius));
		  for (tdIDX=0; tdIDX < MAX; tdIDX++) {
				 TD = document.createElement('TD');

				 styleWidth = '1px'; styleHeight = '1px';
				 if (tdIDX == 0 || tdIDX == MAX - 1) styleHeight = null;
				 else if (trIDX == 0 || trIDX == MAX - 1) styleWidth = null;
				 else if (radius > 2) {
						if (Math.abs(tdIDX - radius) == 1) styleWidth = '2px';
						if (Math.abs(trIDX - radius) == 1) styleHeight = '2px';
				 }

				 if (styleWidth != null) TD.style.width = styleWidth;
				 if (styleHeight != null) TD.style.height = styleHeight;

				 if (Space == tdIDX || Space == MAX - tdIDX - 1) TD.style.backgroundColor = bdcolor;
				 else if (tdIDX > Space && Space < MAX - tdIDX - 1)  TD.style.backgroundColor = bgcolor;

				 if (Space == 0 && tdIDX == radius) TD.appendChild(obj);
				 TR.appendChild(TD);
		  }
		  TBody.appendChild(TR);
   }
   Table.appendChild(TBody);
   Parent.insertBefore(Table, objTmp);
}


//************************************** 일정보기 기타간부 리스트박스 **************************************//

//SELECT -> LAYER변환
function getSelectToLayer(obj,lwidth,href)
{
	if(navigator.userAgent.indexOf('Opera') != -1 || navigator.userAgent.indexOf('MSIE') == -1) { return false; }

	obj.style.display = 'none';
	var newsb = obj.id + "_sbj";
	var newid = obj.id + "_tmp";
	var newim = obj.id + "_img";
	var LayerTag = "";

	LayerTag += "<TABLE WIDTH='"+lwidth+"' CELLSPACING=0 CELLPADDING=0 STYLE='position:absolute;cursor:default;'>";
	LayerTag += "<TR HEIGHT=1><TD>";
	LayerTag += "<TABLE BGCOLOR='#FFFFFF' HEIGHT=1px WIDTH=100% CELLSPACING=1 CELLPADDING=0 STYLE='border:1 solid #C0C0C0;line-height:117%;' onmouseover=\"getSelectLayerOver(this,document.getElementById('"+newim+"'),document.getElementById('"+newid+"'));\" onmouseout=\"getSelectLayerOut(this,document.getElementById('"+newim+"'),document.getElementById('"+newid+"'));\">";

	LayerTag += "<TR WIDTH=100% onclick=\"getSelectSubLayer(document.getElementById('"+newid+"'),document.getElementById('"+newsb+"'));\">";
	LayerTag += "<TD ID='"+newsb+"' WIDTH=95% onblur='getSelectLayerBlur(this);'>?" + obj.options[obj.selectedIndex].text + "</TD>";
	LayerTag += "<TD ALIGN=RIGHT><IMG ID='"+newim+"' SRC='../img/common/select.gif' ALIGN=absmiddle STYLE='filter:gray();'></TD></TR>";

	LayerTag += "</TABLE>";

	LayerTag += "<TABLE onblur='getSubLayerClose(this);' ID='"+newid+"' WIDTH=100% CELLSPACING=0 CELLPADDING=0 STYLE='display:none;border:1 solid #C0C0C0;' BGCOLOR='#FFFFFF'>";
	for (var i = 0 ; i < obj.length; i++)
	{
		LayerTag += "<TR onmouseover='getSelectMoveLayer(this);' onmouseout='getSelectMoveLayer1(this);' onclick=\"getSelectChangeLayer(document.getElementById('"+obj.id+"'),document.getElementById('"+newid+"'),document.getElementById('"+newsb+"'),'"+obj.options[i].text+"','"+obj.options[i].value+"','"+href+"');\" ";

		if (obj.value == obj.options[i].value)
		{
			LayerTag += "STYLE='background:#225588;color:#FFFFFF;'><TD>&nbsp;";
		}
		else {
			LayerTag += "STYLE='background:#FFFFFF;color:#000000;'><TD>&nbsp;";
		}

		LayerTag += obj.options[i].text;
		LayerTag += "</TD></TR>";
	}
	LayerTag += "</TABLE>";
	LayerTag += "</TD></TR></TABLE><IMG SRC='' WIDTH='"+lwidth+"' HEIGHT=0>";

	document.write(LayerTag);
}

//서브레이어보이기
function getSelectSubLayer(obj,sobj)
{
	if(obj.style.display == 'none')
	{
		sobj.style.background = '#FFFFFF';
		sobj.style.color = '#000000';
		obj.style.display = 'block';
		NowSelectedLayer = obj;
		obj.focus();
	}
	else {
		sobj.style.background = '#225588';
		sobj.style.color = '#FFFFFF';
		obj.style.display = 'none';
	}
}

//서브레이어체크
function getSelectSubLayer1(obj)
{
	if(obj.style.display != 'none')
	{
		obj.style.display = 'none';
	}
}

//타이틀레이어 MouseOver
function getSelectLayerOver(obj,img,nobj)
{
	if (nobj.style.display == 'none')
	{
		obj.style.border = '1 solid #225588';
		img.style.filter = '';
	}
}

//타이틀레이어 MouseOut
function getSelectLayerOut(obj,img)
{
	obj.style.border = '1 solid #C0C0C0';
	img.style.filter = 'gray()';
}


//서브레이어 MouseOver
function getSelectMoveLayer(obj)
{
	if (obj.style.color == '#000000')
	{
		obj.style.background = '#225588';
		obj.style.color = '#FFFFFF';
	}
}
//서브레이어 MouseOut
function getSelectMoveLayer1(obj)
{
	obj.style.background = '#FFFFFF';
	obj.style.color = '#000000';
}

//새레이어선택
function getSelectChangeLayer(obj,fobj,sobj,text,value,href)
{
	if (href)
	{
		eval("document.DataForm." + href).value = value;
		location.href = getThisUrl();
		return false;
	}
	else {
		fobj.style.display = 'none';
		sobj.innerHTML = '?' + text;
		sobj.style.background = '#225588';
		sobj.style.color = '#FFFFFF';
		sobj.focus();
		obj.value = value;
	}
}

//타이틀레이어 blur
function getSelectLayerBlur(obj)
{
	obj.style.background = '#FFFFFF';
	obj.style.color = '#000000';
}

//서브레이어 닫기
function getSubLayerClose(obj)
{
	if (obj.style.display != 'none')
	{
		setTimeout("document.getElementById('" + obj.id + "').style.display = 'none';" , 150);
	}
}






//************************************** 일정 상세보기 레이어 **************************************//




function getposOffset(overlay, offsettype){
	var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
	var parentEl=overlay.offsetParent;
	while (parentEl!=null){
		totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
		parentEl=parentEl.offsetParent;
	}
	return totaloffset;
}

var subcontent_idx = 0;
function overlay(curobj, subobjstr, opt_position, d){

	
	if(subobjstr != "subcontent"+subcontent_idx && subobjstr != "preuser"){
		if(subcontent_idx != 0){
			var subcontent_obj = document.getElementById("subcontent"+subcontent_idx);
			subcontent_obj.style.display="none";
		}
	}
	subcontent_idx = subobjstr.substring(10);
	if (document.getElementById){
		var subobj=document.getElementById(subobjstr);
			subobj.style.display=(subobj.style.display!="block")? "block" : "none";
			
			
		var xpos=0;
	    var ypos=0;
	    
	 	var overlay=d;
 	
		if(overlay==null || overlay=="") overlay='right'; 
	    
	  
	    if(overlay=="left"){										// 2008-12-02# 사원진 # 설문조사결과의 사용자 정보 레이어 좌측으로 뜨기 
//	     xpos=getposOffset(curobj, "left")-subobj.offsetWidth;
		
		 xpos=getposOffset(curobj, "left")-subobj.offsetWidth +curobj.offsetWidth;
	     ypos=getposOffset(curobj, "top")+curobj.offsetHeight;
		}else{
		
	     xpos=getposOffset(curobj, "left")+((typeof opt_position!="undefined" && opt_position.indexOf("right")!=-1)? -(subobj.offsetWidth-curobj.offsetWidth) : 0)
	     ypos=getposOffset(curobj, "top")+((typeof opt_position!="undefined" && opt_position.indexOf("bottom")!=-1)? curobj.offsetHeight : 0)
		}	
			
			subobj.style.left=xpos+"px";
			subobj.style.top=ypos+"px";
			
		// 20080523# 이승환# layer와 list 우선순위 에서 숨긴걸 다시 보여기위해 추가, 메뉴 토글시
        if(subobj.style.display  == "none"){
        	selectbox_visible();
        }
        // 20080523# 이승환#  /////////////////////////////////////////////
		return false;
	}
	else
		return true;
}

function overlayView(curobj, subobjstr, opt_position){
	if (document.getElementById){
		var subobj = document.getElementById(subobjstr);
			//subobj.style.display=(subobj.style.display!="block")? "block" : "none";
			//위의 코드 대신에 아래 if, else 추가 : 양성무 080320
		if (subobj.style.display != "block"){
			subobj.style.display = "block";}
		else{
			overlayclose(subobjstr);
			selectbox_visible();
			}

		var xpos=getposOffset(curobj, "left")+((typeof opt_position!="undefined" && opt_position.indexOf("right")!=-1)? -(subobj.offsetWidth-curobj.offsetWidth) : 0);
		var ypos=getposOffset(curobj, "top")+((typeof opt_position!="undefined" && opt_position.indexOf("bottom")!=-1)? curobj.offsetHeight : 0);
			subobj.style.left=xpos+"px";
			subobj.style.top=ypos+"px";
			//alert(subobj.style.left,subobj.style.top);
						
		return false;
	}
	else
		return true
;
}

function overlayclose(subobj){
	document.getElementById(subobj).style.display="none";
    selectbox_visible();  // 20080523# 이승환# layer와 list 우선순위 에서 숨긴걸 다시 보여기위해 추가, x버튼 클릭시
	
}


function actionOverlay(curobj, subobjstr, opt_position, actionUrl, d){
	if (document.getElementById){
		var subobj=document.getElementById(subobjstr);

//		var direct="right";	
//		if(d!=null && d!="") direct=d;
		var direct="left";						//2008-12-23# 사원진 # 사용자 레이어 좌측방향으로 뜨도록 변경 
		
		if(actionUrl == ""){
			return false;
		}
	
		var xmlHttpRequest = false;

		if(window.ActiveXObject) {
			xmlHttpRequest = new ActiveXObject('Microsoft.XMLHTTP');
		} else {
			xmlHttpReq = new XMLHttpRequest();
			xmlHttpReq.overrideMimeType('text/xml');
		}

		
		xmlHttpRequest.open('GET', actionUrl, true);
		xmlHttpRequest.onreadystatechange = function() {
			if(xmlHttpRequest.readyState == 4) {
				switch (xmlHttpRequest.status) {
					case 404:
						alert('오류: ' + actionUrl + '이 존재하지 않음');
						break;
					case 500:
						alert('오류: ' + xmlHttpRequest.responseText);
						break;
					default:
						subobj.innerHTML=xmlHttpRequest.responseText;
						overlay(curobj, subobjstr, opt_position, direct);
						break;
				}
			}
		}

		xmlHttpRequest.send(null);
	}
	else
		return true
}
function actionMeomOverlay(curobj, subobjstr, opt_position, actionUrl,div){

//		alert(actionUrl);
		if (document.getElementById){
		var subobj=document.getElementById(subobjstr)

		if(actionUrl == ""){
			return false;
		}

		var xmlHttpRequest = false;

		if(window.ActiveXObject) {
			xmlHttpRequest = new ActiveXObject('Microsoft.XMLHTTP');
		} else {
			xmlHttpReq = new XMLHttpRequest();
			xmlHttpReq.overrideMimeType('text/xml');
		}

		xmlHttpRequest.open('GET', actionUrl, true);
		xmlHttpRequest.onreadystatechange = function() {
			if(xmlHttpRequest.readyState == 4) {
				switch (xmlHttpRequest.status) {
					case 404:
						alert('오류: ' + actionUrl + '이 존재하지 않음');
						break;
					case 500:
						alert('오류: ' + xmlHttpRequest.responseText);
						break;
					default:
						subobj.innerHTML=xmlHttpRequest.responseText;
						//alert(subobj.innerHTML);
						if(div ==1) overlay(curobj, subobjstr, opt_position);
						else overlay2(curobj, subobjstr, opt_position);
						break;
				}
			}
		}

		xmlHttpRequest.send(null);
	}
	else
		return true
}

function actionUserList(actionUrl,obj){
	if (document.getElementById){
		var objList=document.getElementById(obj);

		if(actionUrl == ""){
			return false;
		}

		var xmlHttpRequest = false;

		if(window.ActiveXObject) {
			xmlHttpRequest = new ActiveXObject('Microsoft.XMLHTTP');
		} else {
			xmlHttpReq = new XMLHttpRequest();
			xmlHttpReq.overrideMimeType('text/xml');
		}

		xmlHttpRequest.open('GET', actionUrl, true);
		xmlHttpRequest.onreadystatechange = function() {
			if(xmlHttpRequest.readyState == 4) {
				switch (xmlHttpRequest.status) {
					case 404:
						alert('오류: ' + actionUrl + '이 존재하지 않음');
						break;
					case 500:
						alert('오류: ' + xmlHttpRequest.responseText);
						break;
					default:
						objList.innerHTML = xmlHttpRequest.responseText;

						break;
				}
			}
		}

		xmlHttpRequest.send(null);
	}
	else
		return true
}



//************************************** 텝메뉴 스크립트 **************************************//




var enabletabpersistence=1 //메뉴활성화기억 1
var tabcontentIDs=new Object()

function expandcontent(linkobj){
var ulid=linkobj.parentNode.parentNode.id 							//id of UL element


var ullist=document.getElementById(ulid).getElementsByTagName("li") //get list of LIs corresponding to the tab contents
	for (var i=0; i<ullist.length; i++){
		ullist[i].className=""  	
										//deselect all tabs
		if (typeof tabcontentIDs[ulid][i]!="undefined") 				//if tab content within this array index exists (exception: More tabs than there are tab contents)
			document.getElementById(tabcontentIDs[ulid][i]).style.display="none" //hide all tab contents
		}
		
		linkobj.parentNode.className="selected"  									//highlight currently clicked on tab
		document.getElementById(linkobj.getAttribute("rel")).style.display="none" //expand corresponding tab content	#20080701#사원진# 상단메뉴 계속 한줄띄우기 유지위해   ,  block->none으로 변경
		saveselectedtabcontentid(ulid, linkobj.getAttribute("rel"))
	}

function savetabcontentids(ulid, relattribute){// save ids of tab content divs
	if (typeof tabcontentIDs[ulid]=="undefined") //if this array doesn't exist yet
		tabcontentIDs[ulid]=new Array()
		tabcontentIDs[ulid][tabcontentIDs[ulid].length]=relattribute
}

function saveselectedtabcontentid(ulid, selectedtabid){ //set id of clicked on tab as selected tab id & enter into cookie
	if (enabletabpersistence==1) //if persistence feature turned on
		setCookie(ulid, selectedtabid)
}

function getullistlinkbyId(ulid, tabcontentid){ //returns a tab link based on the ID of the associated tab content
	var ullist=document.getElementById(ulid).getElementsByTagName("li")
	for (var i=0; i<ullist.length; i++){
	if (ullist[i].getElementsByTagName("a")[0].getAttribute("rel")==tabcontentid){
		return ullist[i].getElementsByTagName("a")[0]
		break
		}
	}
}

function initializetabcontent(){
	
	for (var i=0; i<arguments.length; i++){ 
		
		if (enabletabpersistence==0 && getCookie(arguments[i])!="") 			//clean up cookie if persist=off
			setCookie(arguments[i], "")
			
		var clickedontab=getCookie(arguments[i]) 								//retrieve ID of last clicked on tab from cookie, if any

		var ulobj=document.getElementById(arguments[i])
		var ulist=ulobj.getElementsByTagName("li") 								//array containing the LI elements within UL
		
		for (var x=0; x<ulist.length; x++){ 									//loop through each LI element
		var ulistlink=ulist[x].getElementsByTagName("a")[0]
		
			if (ulistlink.getAttribute("rel")){
				savetabcontentids(arguments[i], ulistlink.getAttribute("rel")) 	//save id of each tab content as loop runs
			//20080625#사원진	# 상단메뉴 표시부분 mouseover->click 로 변경

			ulistlink.onclick=function(){
										expandcontent(this)

									}
			if (ulist[x].className=="selected" && clickedontab=="") 			//if a tab is set to be selected by default				
				expandcontent(ulistlink) 										//auto load currenly selected tab content
			}
		}//end outer inner loop

		if (clickedontab!=""){ 												//if a tab has been previously clicked on per the cookie value
			var culistlink=getullistlinkbyId(arguments[i], clickedontab)
			if (typeof culistlink!="undefined") 							//if match found between tabcontent id and rel attribute value
				expandcontent(culistlink) 									//auto load currenly selected tab content
			else 															//else if no match found between tabcontent id and rel attribute value (cookie mis-association)
				expandcontent(ulist[0].getElementsByTagName("a")[0]) 		//just auto load first tab instead
		}
	} //end outer for loop
}


/*
function getCookie(Name){
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
	if (document.cookie.match(re)) //if cookie found
		return document.cookie.match(re)[0].split("=")[1] //return its value
	return ""
}

function setCookie(name, value){
	document.cookie = name+"="+value //cookie value is domain wide (path=/)
}
*/
function fnImgErr(obj)
{
	obj.src = "../img/common/board_writer_pre_12.gif";
}

function f_chkUserALL1(){
	var form = document.forms[0];
	for (i=0; i<form.elements.length; i++) {
		if (form.elements[i].name == "chkUser") {
			if (form.chkUserALL1.checked == true) {
				form.elements[i].checked = true;
			}
			else{
				form.elements[i].checked = false;
			}
		}
	}
}
function f_chkUserALL2(){
	var form = document.forms[0];
	for (i=0; i<form.elements.length; i++) {
		if (form.elements[i].name == "chkUser2") {
			if (form.chkUserALL2.checked == true) {
				form.elements[i].checked = true;
			}
			else{
				form.elements[i].checked = false;
			}
		}
	}
}

function page_print(width,height){
	var option = "location=center, toolbar=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes";
	option = option+",width="+width+",height="+height;
	var url = "./print.jsp";
	var winObj=window.open(url,"print",option);
	winObj.focus();
}

// 20080520#사원진# 한페이지에 프린트구간이 여러개일 경우를 위해, 구간div명을 받아와서 get방식으로 넘김
function page_print2(area){
	var option = "location=center, toolbar=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes";
	var url = "./print.jsp?area="+area;
	var winObj=window.open(url,"print",option);
	winObj.focus();
}
// 20080520#사원진# ////////////////////////////////////////////////////////////////////////



// 20080528#사원진# 구분 미선택시  값을 못넣게 하기 
function ch_sel(){
 var form = document.all;
	if(form.selSearchField.value){
		form.txtSearchValue.value="";
		form.txtSearchValue.disabled="";
	}
	else{
		form.txtSearchValue.value="선택을 해주세요";
		form.txtSearchValue.disabled="true";
	}

}


/* 본문은 이런식으로 onchange()삽입. 
	<html:select name="congratuForm" property="selSearchField" onchange="ch_sel()" >
		......
		
	<logic:empty name="congratuForm" property="txtSearchValue">
    	            <html:text name="congratuForm" property="txtSearchValue" size="20" disabled="true" value="선택을 해주세요"></html:text>
    </logic:empty>
	<logic:notEmpty name="congratuForm" property="txtSearchValue">
                	<html:text name="congratuForm" property="txtSearchValue" size="20" ></html:text>
    </logic:notEmpty>
*/

// 20080528#사원진# ////////////////////////////////////


// 20080605#사원진# 내용크기에 맞게 창크기 조절 s
function re_size(){

	var bodyh=document.body.scrollHeight+100;
	var bodyw=document.body.scrollWidth+50;
	self.resizeTo(bodyw, bodyh);
}
// 20080605#사원진# 내용크기에 맞게 창크기 조절 e



/*
	2008/04/28/17/03/Bin
	커스터마이징한 미리보기/출력 페이지 호출
 */
function page_print_c(width,height,page)
{
	var option = " left=200 , top=0, toolbar=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes";
	option = option+",width="+width+",height="+height;
	var url = "./"+page+".jsp";
	var winObj=window.open(url,"print",option);
	winObj.focus();
}

function page_print_eventWeek(width,height,tmp1)
{
	var option = "location=center, toolbar=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes";
	option = option+",width="+width+",height="+height;
	var url = "./print_eventWeek.jsp?date="+tmp1;
	var winObj=window.open(url,"print",option);
	winObj.focus();
}


//******************** 레이어가 셀렉트 박스를 침범하면 셀렉트 박스를 hidden 시킴 ***********************//
// Internet Explorer에서 셀렉트박스와 레이어가 겹칠시 레이어가 셀렉트 박스 뒤로 숨는 현상을 해결하는 함수
// selectbox_hidden(), selectbox_visible() 추가 : 양성무 080320

function selectbox_hidden(layer_id)
{
	var ly = eval(layer_id);

	// 레이어 좌표
	var ly_left  = ly.offsetLeft;
	var ly_top    = ly.offsetTop;
	var ly_right  = ly.offsetLeft + ly.offsetWidth;
	var ly_bottom = ly.offsetTop + ly.offsetHeight;

	// 셀렉트박스의 좌표
	var el;

	for (i=0; i<document.forms.length; i++) {
		for (k=0; k<document.forms[i].length; k++) {
			el = document.forms[i].elements[k];
			if (el.type == "select-one") {
				var el_left = el_top = 0;
				var obj = el;
				if (obj.offsetParent) {
					while (obj.offsetParent) {
						el_left += obj.offsetLeft;
						el_top  += obj.offsetTop;
						obj = obj.offsetParent;
					}
				}
				el_left  += el.clientLeft;
				el_top    += el.clientTop;
				el_right  = el_left + el.clientWidth;
				el_bottom = el_top + el.clientHeight;

				// 좌표를 따져 레이어가 셀렉트 박스를 침범했으면 셀렉트 박스를 hidden 시킴
				if ( (el_left >= ly_left && el_top >= ly_top && el_left <= ly_right && el_top <= ly_bottom) ||
					(el_right >= ly_left && el_right <= ly_right && el_top >= ly_top && el_top <= ly_bottom) ||
					(el_left >= ly_left && el_bottom >= ly_top && el_right <= ly_right && el_bottom <= ly_bottom) ||
					(el_left >= ly_left && el_left <= ly_right && el_bottom >= ly_top && el_bottom <= ly_bottom) )
					el.style.visibility = 'hidden';
			}
		}
	}
}

    // 감추어진 셀렉트 박스를 모두 보이게 함
function selectbox_visible()
{
	for (i=0; i<document.forms.length; i++) {
		for (k=0; k<document.forms[i].length; k++) {
			el = document.forms[i].elements[k];
			if (el.type == "select-one" && el.style.visibility == 'hidden')
				el.style.visibility = 'visible';
		}
	}
}

function getNavigatorInfoStr()
{
    var name = navigator.appName;
    
    return name;    
}

function getOSInfoStr()
{
    var ua = navigator.userAgent;
    if(ua.indexOf("NT 6.0") != -1) return "Windows Vista/Server 2008";
    else if(ua.indexOf("NT 5.2") != -1) return "Windows Server 2003";
    else if(ua.indexOf("NT 5.1") != -1) return "Windows XP";
    else if(ua.indexOf("NT 5.0") != -1) return "Windows 2000";
    else if(ua.indexOf("NT") != -1) return "Windows NT";
    else if(ua.indexOf("9x 4.90") != -1) return "Windows Me";
    else if(ua.indexOf("98") != -1) return "Windows 98";
    else if(ua.indexOf("95") != -1) return "Windows 95";
    else if(ua.indexOf("Win16") != -1) return "Windows 3.x";
    else if(ua.indexOf("Windows") != -1) return "Windows";
    else if(ua.indexOf("Linux") != -1) return "Linux";
    else if(ua.indexOf("Macintosh") != -1) return "Macintosh";
    else return "";
}


function logout(val){
	window.location.href="/member/DtpLogin.dtp?method=logout&m_mode="+val;
	return false;
}
