// JScript File

    
	var targFrm = ( typeof(self.top) == "object" ? self.top : self );	

	/*-------------------------------------------------------------------------
        Select Option 선택 값
	  -------------------------------------------------------------------------*/
	function f_GetSelValue(theForm,ElementName) {
		var strSelValue='';
		var idxSelect;
		var bSelected=false;
		var Element = theForm.elements[ElementName]
		var ElementLen = Element.length;
		if(typeof(ElementLen)=='undefined') {
			if(Element.checked) {
				strSelValue = Element.value;
				bSelected = true;
			}
		} else {
			for(var idxLoop=0;idxLoop<ElementLen;idxLoop++) {
				if(Element[idxLoop].checked) {
					idxSelect = idxLoop;
					strSelValue = Element[idxSelect].value;
					bSelected = true;
				}
			}
		}
		var arrReturnValue = new Array(3)
		arrReturnValue[0] = bSelected;
		arrReturnValue[1] = strSelValue;
		arrReturnValue[2] = idxSelect;
		return arrReturnValue;
	}


    /*-------------------------------------------------------------------------
        Select Option 항목 추가
	  -------------------------------------------------------------------------*/
	function f_setSelect(Element,Val) {
		var nEleLen = Element.length;
		for( var idxLoop = 0; idxLoop < nEleLen; idxLoop++) {
			if(Element[idxLoop].value == Val) {
				Element[idxLoop].selected = true;
			}
		}
	}


    /*-------------------------------------------------------------------------
        Select Option 항목 체크여부
	  -------------------------------------------------------------------------*/
	function f_setChkVal(strVal,objEle) {
		var nEleLen = objEle.length;
		for(var i=0; i<nEleLen; i++) {
			if (objEle[i].value.toString() == strVal.toString()) {
				objEle[i].checked = true;
			}
		}
	}
	
    /*-------------------------------------------------------------------------
        Select 항목 자동 선택  (파라메터 hidden 값 설정요구)
	  -------------------------------------------------------------------------*/
	function getSelectValue(p1,p2) {
	 for (i=0; i<p1.options.length; i++ ) { 
	 if( p1.options[i].value == p2 ) 
	 p1.options[i].selected = true;
	 }
	}

    /*-------------------------------------------------------------------------
        라디오 버튼 체크
	  -------------------------------------------------------------------------*/
	 function radiochk(radioValue)
	 { 
		var check = "";
		var num = radioValue;
		for(i=0;i<=num.length-1;i++)
		{
		    if(num[i].checked)
		    {
			    check  = "yes"; 
		    }
		}
		if( check == "yes")
		{
		    return true;
		}
		else 
		{
		    return false;
		}
	}

    /*-------------------------------------------------------------------------
        체크박스 갯수 #1
	  -------------------------------------------------------------------------*/
	function check_cnt(form,strName) {
		var checkcnt = 0;

		for (var i = 0;i<form.length;i++) {
				if(form.elements[i].name==strName && form.elements[i].checked){

				checkcnt++;
				}
  		}
  		return checkcnt;
	}


    /*-------------------------------------------------------------------------
        체크박스 갯수  #3
	  -------------------------------------------------------------------------*/
	function chkBoxCnt(chkValue, cntValue){

		var count;
		var chkValue, cntValue;
		cntValue = 3;

		count = 0;

		for (i = 0; i < chkValue.length; i++)
		{
		if (chkValue[i].checked)
		count++;
		}

		if(count > cntValue){
		alert(cntValue + "개 이하를 선택하세요.");
		return;
		}

	}


    /*-------------------------------------------------------------------------
        체크박스 모두 선택
	  -------------------------------------------------------------------------*/
	function f_chk_all(theForm,bChked,strName) {
		var strSet='';
		if(bChked) {
			strSet = true;
		} else {
			strSet = false;
		}
		for( var i=0; i<theForm.elements.length; i++) {
			var objElm = theForm.elements[i];
			if(objElm.name == strName)
				objElm.checked = strSet;
		}
		return;
	}
	

    /*-------------------------------------------------------------------------
        체크박스 반전 선택
	  -------------------------------------------------------------------------*/
	function revcheck(theForm,strName) {
		for( var i=0; i<theForm.elements.length; i++) {
			var select = theForm.elements[i];
			if(select.name == strName)
				select.checked = !select.checked;
		}
		return;
	}
	

    /*-------------------------------------------------------------------------
        이미지 관련 함수
	  -------------------------------------------------------------------------*/

	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.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);
	  if(!x && document.getElementById) x=document.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 openWin(url, w, h) {
		var PopWin = window.open(url, '_blank', "toolbar=0, channelmode=0, location=0, directories=0, resizable=0, menubar=0, scrollbars=0"
																						+", width=" + w + ", height=" + h
																						+", top="+(screen.height-h)/2+", left="+(screen.width-w)/2);
		if(PopWin == null){
			alert('팝업이 차단되어 있습니다.\n\n화면 상단의 차단메세지를 클릭하여 팝업을 허용해주세요.');
			return;
		}
		PopWin.focus();
	}

    /*-------------------------------------------------------------------------
        윈도우 팝업 (scroll : y)
	  -------------------------------------------------------------------------*/
	function openWinY(url, w, h) {
		var nSW = screen.width;
		var nSH = screen.height;
		var nPointW = 0, nPointH = 0;
		if(w < nSW) {
			nPointW = (nSW - w) / 2;
		}
		if(h < nSH) {
			nPointH = (nSH - h) / 2;
		}
		var PopWin = window.open(url, '_blank', "toolbar=0, channelmode=0, location=0, directories=0, resizable=1, menubar=0, scrollbars=yes"
																						+", width=" + w + ", height=" + h
																						+", top="+nPointH+", left="+nPointW);
		if(PopWin == null){
			alert('팝업이 차단되어 있습니다.\n\n화면 상단의 차단메세지를 클릭하여 팝업을 허용해주세요.');
			return;
		}
		PopWin.focus();
	}


    /*-------------------------------------------------------------------------
        윈도우 팝업
	  -------------------------------------------------------------------------*/
	function openWinN(url,wName, w, h, bScroll) {
		var sOption = "";
		var strScroll;
		var nSW = screen.width;
		var nSH = screen.height;
		var nPointW = 0, nPointH = 0;
		if(w < nSW) {
			nPointW = (nSW - w) / 2;
		}
		if(h < nSH) {
			nPointH = (nSH - h) / 2;
		}
		if (bScroll == 0) {
			strScroll = " scrollbars=no";
		} else {
			strScroll = " scrollbars=yes";
		}
		sOption = sOption + "toolbar=no, channelmode=no, location=no, directories=no, resizable=no, menubar=no," + strScroll;
		sOption = sOption + ", width=" + w + ", height=" + h + ", top=" + nPointH + ", left=" + nPointW;
		var PopWin = window.open(url, wName, sOption);
		if(PopWin == null){
			alert('팝업이 차단되어 있습니다.\n\n화면 상단의 차단메세지를 클릭하여 팝업을 허용해주세요.');
			return;
		}
		PopWin.focus();
	}


    /*-------------------------------------------------------------------------
        팝업창 TOP : 0
	  -------------------------------------------------------------------------*/
	function NewWindowTop(mypage,myname,w,h,scroll){ 
	  var winl = (screen.width-w)/2;
	  var wint = 0;
	  var settings  ='height='+h+',';
		  settings +='width='+w+',';
		  settings +='top='+wint+',';
		  settings +='left='+winl+',';
		  settings +='scrollbars='+scroll+',';
		  settings +='resizable=no';
		  settings +='directories=no';
		  settings +='titlebar=no';
		  settings +='toolbar=no';
		  settings +='location=no';
		  settings +='menubar=no';
	  var win = window.open(mypage,myname,settings);
      if(win == null){
			alert('팝업이 차단되어 있습니다.\n\n화면 상단의 차단메세지를 클릭하여 팝업을 허용해주세요.');
			return;
	  }
	  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
	}


    /*-------------------------------------------------------------------------
        팝업종료 
	  -------------------------------------------------------------------------*/
	function WinClose() {
	   window.close();
	}

    /*-------------------------------------------------------------------------
        Opener 이동후 팝업창 종료 
	  -------------------------------------------------------------------------*/
	function CloseNgoURL(URL) {
		opener.location = URL;
		self.close();
	}

    /*-------------------------------------------------------------------------
        Opener 이동후 팝업창 종료 
	  -------------------------------------------------------------------------*/
	function CloseNgoURL2(URL) {
		var targ_Win = self.opener;
		if ( typeof(targ_Win) == "object" ) {
			targ_Win = ( typeof(targ_Win.top.main) == "object" ? targ_Win.top.main : targ_Win.top );
			targ_Win.location.href = URL;
		}
		self.close();
	}

    /*-------------------------------------------------------------------------
        팝업창 텍스트만 출력
	  -------------------------------------------------------------------------*/
	function f_MakeWin(strBody,nW,nH,bS) {
		var popWIn=window.open('about:blank','','toolbar=0, channelmode=0, location=0, directories=0, resizable=1, menubar=0, scrollbars='+bS+',width='+nW+',height='+nH);
		if(PopWin == null){
			alert('팝업이 차단되어 있습니다.\n\n화면 상단의 차단메세지를 클릭하여 팝업을 허용해주세요.');
			return;
		}
		popWIn.document.write(strBody);
	}

    /*-------------------------------------------------------------------------
        화면 리로드
	  -------------------------------------------------------------------------*/
	function ReLoad() {
	 window.location.reload();
	}

    /*-------------------------------------------------------------------------
       쿠키 가져오기
	  -------------------------------------------------------------------------*/
	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 setCookie( name, value, expiredays ) { 
	        var todayDate = new Date(); 
	        todayDate.setDate( todayDate.getDate() + expiredays ); 
	        document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" ;
	} 

    /*-------------------------------------------------------------------------
       쿠키 삭제
	  -------------------------------------------------------------------------*/
	function delCookie (name) {  
			var exp = new Date();  
			exp.setTime (exp.getTime() - 1);  
			var cval = getCookie (name);  
			document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
	}
    /*-------------------------------------------------------------------------
       알파벳이나 숫자가 아닌 문자가 포함되어 있으면 false 리턴
	  -------------------------------------------------------------------------*/
	function AlpaNumber(string) {

		valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
		for (var i=0; i< string.length; i++) {
			if (valid.indexOf(string.charAt(i)) == -1) {
			return false;
			}
		}
		return true;
	}


    /*-------------------------------------------------------------------------
       숫자가 포함되어 있으면 false 리턴 메세지 출력
	  -------------------------------------------------------------------------*/
	function NoNumber(string) {
		if (!f_chkNoNum(string)) {
			alert("숫자는 포함될 수 없습니다.");
			return false;
		}
		return true;
	}


    /*-------------------------------------------------------------------------
       숫자가 포함되어 있으면 false 리턴
	  -------------------------------------------------------------------------*/
	function f_chkNoNum(string) {

		valid = "0123456789";
		for (var i=0; i< string.length; i++) {
			if (valid.indexOf(string.charAt(i)) != -1) {
				return false;
			return false;
			}
		}
		return true;
	}


    /*-------------------------------------------------------------------------
       숫자 외의 문자가 포함되어 있으면 메세지 출력
	  -------------------------------------------------------------------------*/
	function OnlyNumber(string) {
		if (!f_chkOnlyNum(string)) {
			return false;
		}
		return true;
	}


    /*-------------------------------------------------------------------------
       숫자 외의 문자가 포함되어 있으면 false 리턴
	  -------------------------------------------------------------------------*/
	function f_chkOnlyNum(string) {

		valid = "0123456789";
		for (var i=0; i< string.length; i++) {
			if (valid.indexOf(string.charAt(i)) == -1) {
				return false;
			}
		}
		return true;
	}


    /*-------------------------------------------------------------------------
       문자 공백을 제거하고 입력 여부 체크
	  -------------------------------------------------------------------------*/
	function check_space(str) {

		if (str.search(/\S/)<0) {
			return false;
		}
		var temp=str.replace(' ','');
		if (temp.length == 0) {
			return false;
		}
		return true;
	}


    /*-------------------------------------------------------------------------
       입력 받은 문자의 공백을 전부 지우고 리턴
	  -------------------------------------------------------------------------*/
	function removeSpace(str){

		var num;

		num = str.length;

		for(i=0;i<num;i++){
			str = str.replace(" ", "");
		}

		return str;

	}


    /*-------------------------------------------------------------------------
       공백여부 체크
	  -------------------------------------------------------------------------*/
    function isEmpty( data ){
     for ( var i = 0 ; i < data.length ; i++ ){
        if ( data.substring( i, i+1 ) != " " )
            return false;
     }
     return true;
    }
  
    /*-------------------------------------------------------------------------
       바이트 수 계산 계산할 스트링
	  -------------------------------------------------------------------------*/
	function calbyte(aquery) {

		var tmpStr;
		var temp=0;
		var onechar;
		var tcount;
		tcount = 0;
			 
		tmpStr = new String(aquery);
		temp = tmpStr.length;

		for (k=0;k<temp;k++) {
			onechar = tmpStr.charAt(k);
			onechar_1 = escape(onechar);
			if ( onechar_1.charAt(0) == "%" ) {
				onechar_1 = onechar_1.substring(1,2);
				switch ( onechar_1 ) {
				case "0":
				case "1":
				case "2":
				case "3":
				case "4":
				case "5":
				case "6":
				case "7":
					tcount++;
					break;
				default:
					tcount += 2;
					break;
				}
			}
			else if (onechar!='\r') {
				tcount++;
			}
		}
		return tcount;
	}
	
	
    /*-------------------------------------------------------------------------
      유니코드만 바이트 수 계산 계산할 스트링
	  -------------------------------------------------------------------------*/	
       function getByteHanGulLength(s){ 

       var len = 0; 
       if ( s == null ) return 0; 
       for(var i=0;i<s.length;i++){ 
          var c = escape(s.charAt(i)); 
          if ( c.indexOf("%u") != -1 ) len += 2; 
       } 
       return len/2; 

       } 	


    /*-------------------------------------------------------------------------
       좌측 공백제거
	  -------------------------------------------------------------------------*/
	function ltrim(str) 
	{ 
	        var s = new String(str); 

	        if (s.substr(0,1) == " ") 
	                return ltrim(s.substr(1)); 
	        else 
	                return s; 
	} 

    /*-------------------------------------------------------------------------
       우측 공백제거
	  -------------------------------------------------------------------------*/
	function rtrim(str) 
	{ 
	        var s = new String(str); 
	        if(s.substr(s.length-1,1) == " ") 
	                return rtrim(s.substring(0, s.length-1)); 
	        else 
	                return s; 
	} 


    /*-------------------------------------------------------------------------
       좌우측 공백제거 
	  -------------------------------------------------------------------------*/
	function trim(str) 
	{ 
	        return ltrim(rtrim(str)); 
	}

	function ISObject(objA) {
		return ( typeof(objA) == "object" ); 
	}

	function getOpenerWin(orgWin) {
		var retWin;
		if ( !ISObject(orgWin) || !ISObject(orgWin = orgWin.top) );
		else if ( ISObject(retWin = orgWin.dialogArguments) );
		else if ( ISObject(retWin = orgWin.opener) );
		return retWin;
	}


    /*-------------------------------------------------------------------------
       URL 인코딩
	  -------------------------------------------------------------------------*/
	function encode_url_para(org_para) {
		var i, ret = "", tmp_char, tmp_one_char;
		for(i=0;i<org_para.length;i++) {
			tmp_one_char = org_para.charAt(i);
			tmp_char = escape(tmp_one_char);
			if ( tmp_char.length == 3 && tmp_char.charAt(0) == "%" && !isNaN(tmp_char.charAt(1)) && tmp_char.charAt(1) < 8 )
				ret += tmp_char;
			else
				ret += tmp_one_char;	
		}
		return ret;
	}
	

    /*-------------------------------------------------------------------------
       문자열 비교 함수
	  -------------------------------------------------------------------------*/
	function strcmp(strA, strB) {
		return ( strA > strB ? 1 : ( strA == strB ? 0 : -1));
	}
	function streql(strA, strB) {
		return ( strcmp(strA, strB) == 0 );
	}
	function stricmp(strA, strB) {
		if ( typeof(strA) == "string" && typeof(strB) == "string" )
			return strcmp(strA.toUpperCase(),strB.toUpperCase());
		else
			return -1;
	}
	function strieql(strA, strB) {
		return ( stricmp(strA, strB) == 0 );
	}

	
	/*-------------------------------------------------------------------------
				이메일 검증
	-------------------------------------------------------------------------*/      
    function emailCheck(Email){
       var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
       return emailPattern.test(Email);
     }


    /*-------------------------------------------------------------------------
       레이어 노출,숨김.
	  -------------------------------------------------------------------------*/
	function show_hide(a,s) {

		if ( a == "show" ) {
			field1 = "block";
			field2 = "static";
		} else if (a == "hide") {
			field1 = "none";
			field2 = "absolute";
		}
		/*
		for (i=0;i<document.all[s].length;i++) {
			document.all[s][i].style.display = field1;		
			document.all[s][i].style.position = field2;	
		}
		*/
		document.all[s].style.display = field1;		
		document.all[s].style.position = field2;	
	}

    /*-------------------------------------------------------------------------
       이미지 버튼에 마우스 Over 되고, Out 될 때 쓰이는 함수..
	  -------------------------------------------------------------------------*/
    function onButtonRollover(obj, action)
    {
        // 이미지 위치 관련 정보 획득 및 수정
        var strImageFullPath = new String(obj.src);
        var strImagePath;
        var strImageExt = obj.src.substring(strImageFullPath.length - 4, strImageFullPath.length);

        // 대상 이미지 변경
        if (action=='over')
        {
            strImagePath = obj.src.substring(0, strImageFullPath.length - 4);
            obj.src = strImagePath + '_over' + strImageExt;
        }
        else
        {
            strImagePath = obj.src.substring(0, strImageFullPath.length - 9);
            obj.src = strImagePath + strImageExt;
         }
    }


    /*-------------------------------------------------------------------------
       리스트에 마우스 Over 되고, Out 될 때 쓰이는 함수
	  -------------------------------------------------------------------------*/
	function goListRollover(obj, color)
	{
		var strColor = color;

		obj.style.background = strColor;			
	}


    /*-------------------------------------------------------------------------
       체크박스 모두 체크,해제
	  -------------------------------------------------------------------------*/
	var AllCheckFlag = 0; 
	function selectAll(form) {
		var f = form; //document.form
		
		for ( var i = 0; i < f.elements.length; i++) {
			var element = f.elements[i];
			
			if ( AllCheckFlag == 1) {
				element.checked = 0;
			} 
			else {
			    if(element.disabled == false)
				   element.checked = 1;
			}
		}

		if ( AllCheckFlag == 1 ) {
			AllCheckFlag = 0;
		} else {
			AllCheckFlag = 1;
		}
	}
	
	function selectAll(form, obj, obj2) {				
		var f = form; 
		var CheckFlag;
		
		if(obj2.checked == true)
		   CheckFlag = 0;
		else
		   CheckFlag = 1;		   				
		
		
		for ( var i = 0; i < f.elements.length; i++) {
			var element = f.elements[i];
			
			if ( (CheckFlag == 1) && (element.name == obj)) {
				element.checked = 0;
			} 
			else {
			    if((element.disabled == false) && (element.name == obj) )
				   element.checked = 1;
			}
		}
		
	}

    /*-------------------------------------------------------------------------
       체크박스 1개이상 유무 체크
	  -------------------------------------------------------------------------*/
 	function chkBox(chkValue){
		var count;
		var chkValue;

		count = 0;

		for (i = 0; i < chkValue.length; i++)
		{
		if (chkValue[i].checked)
		count++;
		}
		if(count < 1){
		alert("1개 이상을 선택하세요.");
		return false;
		}
	}


    /*-------------------------------------------------------------------------
       커서 자동이동 
	  -------------------------------------------------------------------------*/
	function moveFocus(sForm, sNow, sNext)
	{
		var vForm = 'document.' + sForm + '.';
		var oNow = eval(vForm + sNow);

		if (typeof oNow == 'object')
		{
			if ( oNow.value.length == oNow.maxLength)
			{
				var oNext = eval(vForm + sNext);

				if ((typeof oNext) == 'object')
					oNext.focus();
			}
		}
	}

	/*-------------------------------------------------------------------------
       팝업
	 -------------------------------------------------------------------------*/
	function MM_openBrWindow(theURL,winName,features) { //v2.0
	  window.open(theURL,winName,features);
	}
	

	 /*-------------------------------------------------------------------------
       태그 입력 방지
	 -------------------------------------------------------------------------*/
	 function checkString(){
		var objEv = event.srcElement;
		var strPattern = "<";
		strPattern = objEv.value.match(strPattern);
		
		 if(strPattern != null){
			alert("태그는 사용하실 수 없습니다!");
			objEv.value="";
			objEv.focus();
			return false;
		}
	}
	
	
	 /*-------------------------------------------------------------------------
       새창띄우기 페이지경로, 창이름, 가로, 세로, 스크롤유무
	 -------------------------------------------------------------------------*/
	function NewWindow(mypage,myname,w,h,scroll){ 
	  
	  var winl = (screen.width-w)/2;
	  var wint = (screen.height-h)/2;
	  var settings  ='height='+h+',';
		  settings +='width='+w+',';
		  settings +='top='+wint+',';
		  settings +='left='+winl+',';
		  settings +='scrollbars='+scroll+',';
		  settings +='resizable=no';
		  settings +='directories=no';
		  settings +='titlebar=no';
		  settings +='toolbar=no';
		  settings +='location=no';
		  settings +='menubar=no';
	  				  	  
	  win=window.open(mypage,myname,settings);
	  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
	}
	
	

	/*-------------------------------------------------------------------------
       객체 반환
	 -------------------------------------------------------------------------*/
	function $(id) {
       return document.getElementById(id);
    }     


	/*-------------------------------------------------------------------------
       iFRAME AUTO RESIZE
	 -------------------------------------------------------------------------*/
    function ResizeFrame(frame)  
    {
      var Frame_Body  = document.frames(frame).document.body;
      var Frame_name  = document.all(frame);
      
      Frame_name.style.width = "100%"; 
      Frame_name.style.height = Frame_Body.scrollHeight + (Frame_Body.offsetHeight-Frame_Body.clientHeight);

      if (Frame_name.style.height == "0px" || Frame_name.style.width == "0px")
      {
       Frame_name.style.width = "100%";
       Frame_name.style.height = "300px";
      }
    }  
    
    //document.write("<div id='MyWs' style=behavior:url('WebService.htc') />");
    
 
    /*-------------------------------------------------------------------------
       게시판 이미지로딩 실패시 nodate 이미지 보여주기 
	 -------------------------------------------------------------------------*/
	function BoardImgErr (objImg) { 
		
		var img = objImg; 
		var altSrc = 'images/people/nodata.gif'; 

		img.src = altSrc; 
	}
    

	function mpOpen(conID)
	{
		window.open("http://stmx.iple.com/Player/mediaPlay.asp?id='" + conID + "'","prgMP","width=512, height=418");
		return ;
	}


	/*-------------------------------------------------------------------------
       플래시 파일 보여주기
	 -------------------------------------------------------------------------*/
	function loadFlash(filename,width,height,oMenu,oWmode)
	{	
		
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+ width +'" height="'+ height +'">'); 
		document.write('<param name="movie" value="'+ filename +'"><param name="quality" value="high">');

		if(oMenu)
			document.write('<param name="menu" value="false">');
		if(oWmode)
		{
			document.write('<PARAM NAME=wmode VALUE=transparent>'); 
			document.write('<embed src="'+ filename +'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ width +'" height="'+ height +'"></embed></object>');
		}
	}
	
		function loadFlash2(filename,width,height,oMenu,oWmode,objName)
	{	
		
		document.write('<object id="'+ objName + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+ width +'" height="'+ height +'">'); 
		document.write('<param name="movie" value="'+ filename +'"><param name="quality" value="high">');

		if(oMenu)
			document.write('<param name="menu" value="false">');
		if(oWmode)
		{
			document.write('<PARAM NAME=wmode VALUE=transparent>'); 
			document.write('<embed id="'+ objName + '" src="'+ filename +'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ width +'" height="'+ height +'"></embed></object>');
		}
	}

	/*-------------------------------------------------------------------------
       PODONAMU 공통
	 -------------------------------------------------------------------------*/

	function MM_reloadPage(init) {  //reloads the window if Nav4 resized
    if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
    else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
    }
    MM_reloadPage(true);
    var Url = "gallery/Gallery_TVXQ00/01.jpg";
    function chg_img(ImageSRC,goUrl) {
    gallery.filters.blendTrans.apply(); 
    document.images.gallery.src = ImageSRC; 
    gallery.filters.blendTrans.play();
    Url = goUrl
	}
    function slidelink(){
    window.open(Url)
    }




/*-------------------------------------------------------------------------
            비밀번호 검증
-------------------------------------------------------------------------*/   
function pass_valid_check(pwd) {
    var txtPassword = document.getElementById('txtPassword');
    p_pass = txtPassword.value;

                if (txtPassword.value.length < 4 || txtPassword.value.length > 13 ){
                    alert("暗証番号は４～１３字以内に入力してください。");

                        pwd.value ="";
                        txtPassword.focus();
                        return false;
                }

                if(/^[a-zA-Z!@#$%^&*()]{4,13}$/.test(p_pass) == true ){
                    alert("ハングル、特殊文字、文字間スペースは使ってはいけません。");
                        pwd.value ="";
                        txtPassword.focus();
                        return false;
                }

                var cnt=0,cnt2=1,cnt3=1;
                var temp="";

                for(i=0;i < p_pass.length;i++){
                        temp_pass1 = p_pass.charAt(i);

                        //alert("temp_pass1="+temp_pass1);
                        //ttt = temp_pass1.charCodeAt(0);
                        next_pass = (parseInt(temp_pass1.charCodeAt(0)))+1;
                        //alert("next_pass="+next_pass);
                        temp_p = p_pass.charAt(i+1);
                        temp_pass2 = (parseInt(temp_p.charCodeAt(0)));
                        //alert("temp_pass2="+temp_pass2);
                        if (temp_pass2 == next_pass)
                            cnt2 = cnt2 + 1;
                        else
                            cnt2 = 1;
                        if (temp_pass1 == temp_p)
                            cnt3 = cnt3 + 1;
                        else
                            cnt3 = 1;
                        //alert("cnt2="+cnt2);
                        //alert("cnt3="+cnt3);
                        if (cnt2 > 3) break;
                        if (cnt3 > 3) break;
                }
                if (cnt2 > 3){

                    alert("暗証番号は文字の連続（例：abcd）あるいは数字の連続（例：1234）を４つ以上使用してはいけません。");
                        pwd.value ="";
                        txtPassword.focus();
                        return false;
                }
                if (cnt3 > 3){
                    alert("暗証番号は同じ文字の綴り（例：aaaa）あるいは数字（例：1111）を４つ以上使用してはいけません。");
                        pwd.value ="";
                        txtPassword.focus();
                        return false;
                }

                return pwd;
        }
