/*** IE6 PNG IMAGE SET ********************/
function setPng24(obj) {
    obj.width=obj.height=1;
    obj.className=obj.className.replace(/\bpng24\b/i,'');
    obj.style.filter ="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
    obj.src='';
    return '';
}

/*********************
name : ÇÃ·¡½Ã.swf ÀÌÇÏ
w : width, h :  height
poth : ´ëÃ¼ÅØ½ºÆ®
id   : ÇÃ·¡½Ã id
*********************/
function getSWF(name,w,h,poth,id){
	var swfobj = "";
	swfobj = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"'>";
	swfobj += "<param name='movie' value='/images/swf/"+name+".swf' />";
	swfobj += "<param name='wmode' value='transparent' />";
	swfobj += "<param name='allowscriptAccess' value='sameDomain' />";
	swfobj += "<!--[if !IE]> <-->";
	swfobj += "<p>"+poth+"</p>";
	swfobj += "<!--> <![endif]-->";
	swfobj += "<embed src='/images/swf/"+name+".swf' bgcolor='transparent' quality='high' width='"+w+"' height='"+h+"' wmode='transparent' allowScriptAccess='sameDomain' id='"+id+"' name='"+id+"' align=middle type=application/x-shockwave-flash pluginspage=http://www.adobe.com/go/getflashplayer /></object>";
	document.write(swfobj);
}

/*********************
name : ÇÃ·¡½Ã.swf ÀÌÇÏ
w : width, h :  height
poth : ´ëÃ¼ÅØ½ºÆ®
id   : ÇÃ·¡½Ã id
*********************/
function setSWF(name,w,h,xmlURL,pageCode,poth,id){
	var swfobj = "";
	swfobj = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"'>";
	swfobj += "<param name='movie' value='/images/" + name + ".swf?xmlURL=" + xmlURL + "&pageCode=" + pageCode + "' />";
	swfobj += "<param name='wmode' value='transparent' />";
	swfobj += "<param name='allowscriptAccess' value='sameDomain' />";
	swfobj += "<!--[if !IE]> <-->";
	swfobj += "<p>"+poth+"</p>";
	swfobj += "<!--> <![endif]-->";
	swfobj += "<embed src='/images/" + name + ".swf?xmlURL=" + xmlURL + "&pageCode=" + pageCode + "' bgcolor='transparent' quality='high' width='" + w + "' height='" + h + "' wmode='transparent' allowScriptAccess='sameDomain' id='" + id + "' name='" + id + "' align=middle type=application/x-shockwave-flash pluginspage=http://www.adobe.com/go/getflashplayer /></object>";
	document.write(swfobj);
}


// tab img over
function tabOver(obj){
	$(obj).hover(
		function(){
			$(this).attr("src",$(this).attr('src').replace('off.gif','on.gif'));
		},
		function(){
			$(this).attr("src",$(this).attr('src').replace('on.gif','off.gif'));
		}
	)
}

/*** Quickmenu moving ****************/
function initMoving(target, position, topLimit, btmLimit) {
	if (!target)
		return false;

	var obj = target;
	obj.initTop = position;
	obj.topLimit = topLimit;
	obj.bottomLimit = document.documentElement.scrollHeight - btmLimit;

	obj.style.position = "absolute";
	obj.top = obj.initTop;
	obj.left = obj.initLeft;

	if (typeof(window.pageYOffset) == "number") {
		obj.getTop = function() {
			return window.pageYOffset;
		}
	} else if (typeof(document.documentElement.scrollTop) == "number") {
		obj.getTop = function() {
			return document.documentElement.scrollTop;
		}
	} else {
		obj.getTop = function() {
			return 0;
		}
	}

	if (self.innerHeight) {
		obj.getHeight = function() {
			return self.innerHeight;
		}
	} else if(document.documentElement.clientHeight) {
		obj.getHeight = function() {
			return document.documentElement.clientHeight;
		}
	} else {
		obj.getHeight = function() {
			return 500;
		}
	}

	obj.move = setInterval(function() {
		if (obj.initTop > 0) {
			pos = obj.getTop() + obj.initTop;
		} else {
			pos = obj.getTop() + obj.getHeight() + obj.initTop;
		}

		if (pos > obj.bottomLimit)
			pos = obj.bottomLimit;
		if (pos < obj.topLimit)
			pos = obj.topLimit;

		interval = obj.top - pos;
		obj.top = obj.top - interval / 3;
		obj.style.top = obj.top + "px";
	}, 30)
}



// img over & out : s
function imgRover(imgBoxID){
var MenuCounts = document.getElementById(imgBoxID).getElementsByTagName("img");
for (i=0;i<MenuCounts.length;i++) {
	var numImg=MenuCounts.item(i);
	var ImgCheck = numImg.src.substring(numImg.src.length-6,numImg.src.length);
	if (ImgCheck!="on.gif") {
			numImg.onmouseover = function () {
				this.src = this.src.replace("off.gif", "on.gif");
			}
			numImg.onmouseout = function () {
				this.src = this.src.replace("on.gif", "off.gif");
			}
		}
	}
}
// img over & out : e

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];}
}

/*** Quickmenu moving ****************/
function initMoving(target, position, topLimit, btmLimit) {
	if (!target)
		return false;

	var obj = target;
	obj.initTop = position;
	obj.topLimit = topLimit;
	obj.bottomLimit = document.documentElement.scrollHeight - btmLimit;

	obj.style.position = "absolute";
	obj.top = obj.initTop;
	obj.left = obj.initLeft;

	if (typeof(window.pageYOffset) == "number") {
		obj.getTop = function() {
			return window.pageYOffset;
		}
	} else if (typeof(document.documentElement.scrollTop) == "number") {
		obj.getTop = function() {
			return document.documentElement.scrollTop;
		}
	} else {
		obj.getTop = function() {
			return 0;
		}
	}

	if (self.innerHeight) {
		obj.getHeight = function() {
			return self.innerHeight;
		}
	} else if(document.documentElement.clientHeight) {
		obj.getHeight = function() {
			return document.documentElement.clientHeight;
		}
	} else {
		obj.getHeight = function() {
			return 500;
		}
	}

	obj.move = setInterval(function() {
		if (obj.initTop > 0) {
			pos = obj.getTop() + obj.initTop;
		} else {
			pos = obj.getTop() + obj.getHeight() + obj.initTop;
		}

		if (pos > obj.bottomLimit)
			pos = obj.bottomLimit;
		if (pos < obj.topLimit)
			pos = obj.topLimit;

		interval = obj.top - pos;
		obj.top = obj.top - interval / 3;
		obj.style.top = obj.top + "px";
	}, 30)
}


	/*** ¹«´ë±â¼úÀÚ·á Big ÀÌ¹ÌÁö Over:s  ***/
function viewBig(type,_num){
	document.getElementById("bigs").src="/images/intro/"+type+"_"+_num+"_big.jpg";
}
/*** ¹«´ë±â¼úÀÚ·á Big ÀÌ¹ÌÁö Over:s  ***/