//¾Ù¹ü ³Ñ°Üº¸±â
  function Change(draw)
    {
     var URL = "";
     var A = navigator.userAgent;
     if(A.indexOf("Netscape") >= 0) URL = draw.f1.go.value;
     else {
        URL = draw.go.options.value;
     }
     window.location.href = URL;
    }

//¸ÞÀÎ¼­ºê¸Þ´º(2Â÷) Å×ÀÌºí »ö»óº¯È¯
function chg_bgcolor1(bg) 
  {
    bg.style.backgroundColor = '#e5e5e5';
  }

function chg_bgcolor2(bg) 
  {
    bg.style.backgroundColor = '#ffffff';
  }
  

// ·¹ÀÌ¾î Ç®´Ù¿î ¸Þ´º 

function MM_findObj(n, d) { //v3.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); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}


/* Board Link */ 
	function gotoBoard( seq_no ){
		var _goUrl, _param;
		/*
		if(seq_no == 4){
			openWindow('http://user.chollian.net/cgi-bin/ics/ics.cgi?id=oisoo&db=owner','OisooBoard',100,30,670,530,1);
		}
		else if(seq_no==9){
			document.location.href = "/oisoobbs/NoticeLV.asp";
		}
		*/
		if(seq_no==9){
			document.location.href = "/oisoobbs/NoticeLV.asp";
		}
		else{
			if(seq_no == 3)	_goUrl = "/Theme/Theme_L.asp"; 		
			else _goUrl = "/oisoobbs/bbsLV.asp";
			if(seq_no == 4) {
				_param = "?t_class=0&sub_class=oisoo";
			} else {
				if(seq_no == 10) {
					_param = "?t_class=0&sub_class=goodtxt";
				} else {
					_param = "?t_class=" + seq_no;
				}
			}
			document.location.href = _goUrl + _param; 
		}
		return; 
	}	
	
	/* Open Window Function */
	function openWindow( _url, _name, _top, _left, _width, _height, _scroll ){
		var remote; 
		var feature; 

		feature = "width="+_width+", height=" +_height+",top=" + _top +",left=" + _left+",scrollbars=" + _scroll+ ",resizable=0,menubar=0,status=0"; 
		window.open(_url, _name, feature); 		
	} 

/* iFrame ³ôÀÌ ÀÚµ¿ Á¶Á¤ */ 
 function resizeiFrame(iframeObj){
  var innerBody = iframeObj.contentWindow.document.body;
  oldEvent = innerBody.onclick;
  innerBody.onclick = function(){ resizeiFrame(iframeObj, 1);oldEvent; };
  var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
  iframeObj.style.height = innerHeight+30;
  //var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
  //iframeObj.style.width = innerWidth;     
  //if( !arguments[1] )        /* Æ¯Á¤ ÀÌº¥Æ®·Î ÀÎÇÑ È£Ãâ½Ã ½ºÅ©·ÑÀ» ±×³É µÐ´Ù. */
  //  this.scrollTo(0,0);
 }


//  ¿À¸¥ÂÊ Quick Menu 

var menuTopMargin = -132; // ¸Þ´º½ºÅ©·Ñ ½ÃÀÛ ¿©¹é
var menuSpeed = 1;
var timerSpeed = 100;
var timerSpeed2 = 1;
var timer;
var heightLimit = 0;

function checkMenu() {
	if(document.body.offsetHeight > heightLimit) {
		var reTimer = timerSpeed;
		var startPoint = parseInt(document.all.sMenu.style.top,10);
		var endPoint = document.body.scrollTop;
		endPoint = (menuTopMargin <= endPoint ) ? endPoint - menuTopMargin : 0;
		if(startPoint != endPoint) {
			moveAmount = Math.ceil(Math.abs(endPoint - startPoint) / 15);
			document.all.sMenu.style.top = parseInt(document.all.sMenu.style.top,10) + ((endPoint<startPoint) ? -moveAmount : moveAmount);
			reTimer = timerSpeed2;
		}
	} else document.all.sMenu.style.top = 0;
	timer = setTimeout("checkMenu();",reTimer);
}

function initMenu() {
	if(document.body.offsetHeight > heightLimit) document.all.sMenu.style.top = document.body.scrollTop;
	checkMenu();
}

// ´õºíÅ¬¸¯ È­¸éÀÌµ¿

function totopbottom() {
	if (document.body.scrollTop == 0) {
		window.scrollTo(0,document.body.scrollHeight);
	} else {
		window.scrollTo(0,0);
	}
}
function topbottom() {
	document.body.ondblclick = totopbottom;
}
