function setDefaultPage(obj)
{
	obj.style.behavior='url(#default#homepage)';
	obj.setHomePage(location.href);
	return false;
}

function addFavorite()
{
	window.external.AddFavorite(location.href, document.title);
	return false;
}

function menuOver(obj)
{
	obj.background = obj.background.substring(0, obj.background.lastIndexOf('/') + 1) + "new_link4.gif";
}

function menuOut(obj)
{
	obj.background = obj.background.substring(0, obj.background.lastIndexOf('/') + 1) + "new_link3.gif";
}
function goPage(no)
{
	document.forms.pagebar.pageno.value = no;
	document.forms.pagebar.submit();
}

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_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_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];}
}

function showPopup(obj)
{
	this.pop = function ()
	{
		if(this._Paused)
			return;
		
		this._X += this._Xs;
		this._Y += this._Ys;
		this._popObject.show(this._X, this._Y, this._Object.style.pixelWidth, this._Object.style.pixelHeight);
		if(this._X + this._Object.style.pixelWidth + 5 > screen.width)
			this._Xs *= -1;
		if(this._Y + this._Object.style.pixelHeight + 5 > screen.height)
			this._Ys *= -1;
		if(this._X < 0)
			this._Xs *= -1;
		if(this._Y < 0)
			this._Ys *= -1;

	}
	
	this.resume = function ()
	{
		this._Paused = false;
	}
	
	this.pause = function ()
	{
		this._Paused = true;
	}
	
	this.hide = function ()
	{
		this._popObject.hide();
	}

	if(typeof(obj) == typeof("string"))
		this._Object = $(obj);
	else
		this._Object = obj;
	
	if(this._Object == null)
		return;
	
	if(this._Object.innerText.replace(/^\s+|\s+$/img, "") == "")
		return;
	
	this._Object.popupObject = this;
	
	this._Paused = false; 
	this._X = 0;
	this._Y = 0;
	this._Xs = 3;
	this._Ys = 3;
	this._popObject = null;
	
	this._popObject = window.createPopup();
	this._popObject.document.body.style.margin = "0px";
	this._popObject.document.body.style.padding = "0px";
	this._popObject.document.body.style.fontSize = "12px";
	this._popObject.document.body.style.borderStyle = "solid";
	this._popObject.document.body.style.borderWidth = "2px";
	this._popObject.document.body.style.borderColor = "#A7D2E3";
	this._popObject.document.body.style.backgroundColor = "#F4F9FC";
	this._popObject.document.body.innerHTML = this._Object.innerHTML;
	this._popObject.document.body.title = "Ë«»÷¿É¹Ø±Õ£¡";
	this._popObject.document.body.popupObject = this;
	this._popObject.document.body.onmouseover = function ()
	{
		this.popupObject.pause();
	} 
	this._popObject.document.body.onmouseout = function ()
	{
		this.popupObject.resume();
	}
	this._popObject.document.body.ondblclick = function ()
	{
		this.popupObject.hide();
	}
	
	window.setInterval("$('" + this._Object.id + "').popupObject.pop();", 50);
}

function shObj(objID, returns)
{
	var obj = $(objID);
	if(obj == null)
		return returns;
	
	if(obj.style.display == "")
		obj.style.display = "none";
	else
		obj.style.display = "";
}