// JavaScript Document
<!--
  var IE = false ;

  if (/MSIE/.test(navigator.userAgent))
  {
	IE = true;
  }

//ifram »çÀÌÁî Á¶Á¤
function ResizeFrame(name)
	{  // IFRAME ³»ºÎÀÇ body °³Ã¼ 
		 var fBody  = document.frames(name).document.body;  
		// IFRAME °³Ã¼  
		var fName  = document.all(name);  
		// IFRAME ³»ºÎÀÇ body°³Ã¼ÀÇ ³ÐÀÌ¸¦ °è»êÇÏ¿© IFRAMEÀÇ ³ÐÀÌ¸¦ ¼³Á¤ÇØ ÁØ´Ù.  
		fName.style.width     = fBody.scrollWidth + (fBody.offsetWidth - fBody.clientWidth);  
		// IFRAME ³»ºÎÀÇ body°³Ã¼ÀÇ ³ôÀÌ¸¦ °è»êÇÏ¿© IFRAMEÀÇ ³ôÀÌ¸¦ ¼³Á¤ÇØ ÁØ´Ù.  
		fName.style.height     = fBody.scrollHeight + (fBody.offsetHeight - fBody.clientHeight);  
		// ¸¸¾à IFRAMEÀÇ Å©±â ¼³Á¤¿¡ ½ÇÆÐ ÇÏ¿´´Ù¸é ±âº»Å©±â·Î ¼³Á¤ÇÑ´Ù. 
		if (fName.style.height == "0px" || fName.style.width == "0px")  
			{ 
				fName.style.width = "700px";     //±âº» iframe ³Êºñ    
				fName.style.height = "300px";    //±âº» iframe ³ôÀÌ  
			}
	}

  function open_window(url, name, width, height, feature)
  {
    var oWnd;

    if (IE && width < window.screen.width && height < window.screen.height) 
    {
        var windowX = Math.ceil( (window.screen.width  - width) / 2 );
        var windowY = Math.ceil( (window.screen.height - height) / 2 );

        oWnd = window.open(url, name, feature+",width=" + width +",height=" + height+",left="+windowX+",top="+windowY + ",resizable=yes");
    }
    else 
    {
        oWnd = window.open(url, name, feature+",width=" + width +",height=" + height + ",resizable=yes");
    }

    return oWnd;
  }

  // ÂÊÁöº¸±â
  function viewMessage(seq, targetId, fromID, t_yp)
  {
    var url = "/message/message_View.asp?seq="+seq+"&targetUserId="+targetId+"&typ="+t_yp+"&fromID="+fromID;
    open_window(url,"messageView",350,380,"toolbar=no,scrollbars=no,status=no,resizable=false");
  }

  // ÂÊÁö º¸³»±â
  function sendMessage(targetId)
  {
    var url = "/message/send_message_Form.asp?targetUserId="+targetId+"&popup=1";
    open_window(url,"messageSendPopup",350,380,"toolbar=no,scrollbars=no,status=no");
  }

  // ´äÂÊÁö º¸³»±â
  function ReplyMessage(seq)
  {
    var url = "/message/reply_message_Form.asp?seq="+seq+"&popup=1";
    open_window(url,"messageReplyPopup",350,380,"toolbar=no,scrollbars=no,status=no");
  }
  
    // ÆË¾÷Ã¢ ¸®»çÀÌÁî
  function resizepopup(wid,minH) 	
  {
    if (IE) {
      var winW = wid, winH = 200;
      winW = wid;
      winH = document.body.scrollHeight;
      
      if(winH > 750)
      {
        winH = 750;
      }
      if(winH < minH)
      {
        winH = minH
      }

      var deltaW = 0;
      var deltaH = 0;
      if(document.body.clientHeight)
      {
        deltaW = winW - document.body.clientWidth;
        deltaH = winH - document.body.clientHeight;
      }else
      {
        deltaW = winW - window.innerWidth;
        deltaH = winH - window.innerHeight;
      }
      if(deltaH>=4) deltaH = deltaH-4;

      var windowX = Math.ceil( (window.screen.width  - winW) / 2 );
      var windowY = Math.ceil( (window.screen.height - winH) / 2 );

      window.moveTo(windowX, windowY);
      
      window.resizeBy(deltaW, deltaH);

    } else {
      var width_adjustment = 6;
      var height_adjustment = 32;
      
      var oW = window.document.body;
      var oW = oW.clip ? oW.clip.width : oW.offsetWidth;

      var oH = window.document.body;
      var oH = oH.clip ? oH.clip.height : oH.offsetHeight;
      
      var myW = 0, myH = 0, d = window.document.documentElement, b = window.document.body;

      if( window.innerWidth ) { 
        myW = window.innerWidth; myH = window.innerHeight; 
      }
      else if( b && b.clientWidth ) {
        myW = b.clientWidth; myH = b.clientHeight; 
      } 
      else if( d && d.clientWidth ) { 
        myW = d.clientWidth; myH = d.clientHeight; 
      } 

      //alert(oH+","+myH);

      if( window.opera && !document.childNodes ) { myW += 16; }
      var winW = parseInt(wid) + width_adjustment;
      var winH = oH+50 ;//+ ( (oH + 200 ) - myH ) + height_adjustment;
      
      if(winH > 750)
      {
        winH = 750;
      }
      if(winH<minH) winH = minH

      var windowX = Math.ceil( (window.screen.width  - wid) / 2 );
      var windowY = Math.ceil( (window.screen.height - winH) / 2 );

      window.moveTo(windowX, windowY);
      
      window.resizeTo( winW, winH );      
    }
  }

	function checkMessage() {
		if (SendMessage.targetUserID.value==""|| SendMessage.title.value==""|| SendMessage.contents.value=="") {
			if (SendMessage.targetUserID.value=="") {alert("\¹ÞÀ¸½Ç ºÐ ¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");document.SendMessage.targetUserID.focus(); return;}
			if (SendMessage.title.value=="") {alert("\Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä");document.SendMessage.title.focus(); return;}
			if (SendMessage.contents.value=="") {alert("\³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä");document.SendMessage.contents.focus(); return;}
			return; }
		else {
			SendMessage.action = "send_message_ok.asp"
			SendMessage.submit();
		     }
	}

  // checkbox ÀüÃ¼ ¼±ÅÃ
  function checkAll( checkObject )
  {
    if(!checkObject) return;

    if(checkObject.length)
    {
      for( var i=0; i<checkObject.length ; i++)
      {
        if(!checkObject[i].disabled)
        {
          checkObject[i].checked = true;
        }
      }
    }
    else
    {
      if(!checkObject.disabled)
      {
        checkObject.checked = true;
      }
    }
  }

  // checkbox ÀüÃ¼ ¼±ÅÃ ÇØÁ¦
  function uncheckAll( checkObject )
  {
    if(!checkObject) return;

    if(checkObject.length)
    {
      for( var i=0; i<checkObject.length ; i++)
      {          
        if(!checkObject[i].disabled)
        {
          checkObject[i].checked = false;
        }
      }
    }
    else
    {
      if(!checkObject.disabled)
      {
        checkObject.checked = false;
      }
    }
  }

  // checkbox Ã¼Å©µÈ °³¼ö ¹ÝÈ¯
  function getCheckCount( checkObject )
  {
    var cnt = 0;
    if(checkObject.length)
    {
      for( var i=0; i<checkObject.length ; i++)
      {
        if(checkObject[i].checked)
        {
          cnt++;
        }
      }
    }
    else
    {
      if(checkObject.checked)
      {
        cnt++
      }
    }
    return cnt;
  }


	function term_check()
	{
			if( document.getElementById('term_ok').checked)
			{
			document.check_term.action = "signup_03.asp";
			document.check_term.submit();
			}
			else
			{
			alert("ÀÌ¿ë¾à°ü¿¡ µ¿ÀÇ¸¦ ÇÏ¼Å¾ß¸¸ °¡ÀÔÀÌ °¡´ÉÇÕ´Ï´Ù.");
			term_ok.focus();
			return;
			}

	}

// ÅõÇ¥ °á°ú º¸±â
	function vote_result(vote_seq)
	{
		var url = "view_vote_result.asp?no="+vote_seq+"&popup=1";
		open_window(url,"voteResultPopup",500,300,"toolbar=no,scrollbars=auto,status=no");
	}

//-->