//flash
function swfprint(furl,fwidth,fheight,transoption)	{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+ fwidth +'" height="' + fheight +'" align="middle">');
	document.write('<param name="movie" value="'+ furl +'"/>');
	if (transoption == "t")	{
		document.write('<param name="wmode" value="transparent"/>');
	} else if	(transoption == "o")	{
		document.write('<param name="wmode" value="opaque"/>');
	}
	document.write('<!-- Hixie method -->');
	document.write('<!--[if !IE]> <-->');
	document.write('<object type="application/x-shockwave-flash" data="'+ furl +'" width="'+ fwidth +'" height="' + fheight +'"');
	if (transoption == "t")	{
		document.write(' wmode="transparent"');
	} else if	(transoption == "o")	{
		document.write(' wmode="opaque"');
	}
	document.write('></object>');
	document.write('<!--> <![endif]-->');
	document.write('</object>');
}

//wmvÇÃ·¹ÀÌ¾î
function mplayerprint(id,src,width,height) {
		document.write('<object id="'+id+'" width="'+width+'" height="'+height+'" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">');
		document.write('<param name="src" value="'+src+'" />');
		document.write('<param name="autoplay" value="true" />');
		document.write('<param name="showcontrols" value="false"/>');
		document.write(' <!--[if !IE]>  <--> ');
		document.write(' <object data="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" type="application/x-mplayer2" id="'+id+'" width="'+width+'" height="'+height+'">');
		document.write(' <param name="src" value="'+src+'" />');
		document.write(' <param name="autoplay" value="true" />');
		document.write(' <param name="showcontrols" value="1"/>');
		document.write(' </object> ');
		document.write(' <!--> <![endif]-->');
		document.write('</object>');
	}

//input click
function sizeTo(w,h) {
	var divBox = document.getElementById("testDiv");
	divBox.style.width = w + "px";
}

//tab
function contChange(obj,num,total) {
 if ( document.getElementById(obj+num).style.display == '' ) {
   document.getElementById(obj+num).style.display = 'none';
   return;
  }
 for (i=1; i<=total; i++) {
  if (i==num) {
   document.getElementById(obj+i).style.display = '';
  }
  else {
   document.getElementById(obj+i).style.display = 'none';
  }
 }
}

//rollover
function imageOver(imgs) {
	imgs.src = imgs.src.replace("off.gif", "on.gif");
}
function imageOut(imgs) {
	imgs.src = imgs.src.replace("on.gif", "off.gif");
}

// quick
function getPosition(){
	var start, end, scale, term;
	start = parseInt (document.getElementById('dvquick').style.top, 10);
	end = document.documentElement.scrollTop + 311;
	term = 5;

	if ( start != end ) {
	scale = Math.ceil( Math.abs( end - start ) / 20 );
		if ( end < start )	scale = -scale;
		document.getElementById('dvquick').style.top = parseInt (document.getElementById('dvquick').style.top, 10)+ scale + "px";
		term = 1;
	}
	setTimeout ("getPosition()", term);
}
function moveBanner() {
	document.getElementById('dvquick').style.top = document.documentElement.scrollTop + 100 + "px"; //¼ýÀÚ°¡ °°À¸¸é ½½¶óÀÌµå ¾ø´Ù.
	getPosition();00
	return true;
}

//radio Ã¼Å©½Ã show hidden
function numshow( icnt ) {
	document.getElementById("Num"+icnt).style.display = "block";
}
function numhidden( icnt ) {
	document.getElementById("Num"+icnt).style.display = "none";
}

function num1() {
	document.getElementById("Num01").style.display = "block";
	document.getElementById("Num02").style.display = "none";
	document.GetElementById("Num03").style.display = "none";
	document.GetElementById("Num04").style.display = "none";
}
function num2() {
	document.getElementById("Num01").style.display = "none";
	document.getElementById("Num02").style.display = "block";
	document.getElementById("Num03").style.display = "none";
	document.getElementById("Num04").style.display = "none";
}
function num3() {
	document.getElementById("Num01").style.display = "none";
	document.getElementById("Num02").style.display = "none";
	document.getElementById("Num03").style.display = "block";
	document.getElementById("Num04").style.display = "none";
}
function num4() {
	document.getElementById("Num01").style.display = "none";
	document.getElementById("Num02").style.display = "none";
	document.getElementById("Num03").style.display = "none";
	document.getElementById("Num04").style.display = "block";
}

// quick_center
function initMoving(target) {
	if (!target)
		return false;

	var obj = target;
	obj.initTop = 0;
	obj.initLeft = 592;
	obj.bottomLimit = document.documentElement.scrollHeight - 0;
	obj.topLimit = 100;

	obj.style.position = "absolute";
	obj.top = obj.initTop;
	obj.left = obj.initLeft;
	obj.style.top = obj.top + "px";
	obj.style.left = obj.left + "px";

	obj.getTop = function() {
		if (document.documentElement.scrollTop) {
			return document.documentElement.scrollTop;
		} else if (window.pageYOffset) {
			return window.pageYOffset;
		} else {
			return 0;
		}
	}
	obj.getHeight = function() {
		if (self.innerHeight) {
			return self.innerHeight;
		} else if(document.documentElement.clientHeight) {
			return document.documentElement.clientHeight;
		} else {
			return 500;
		}
	}
	obj.move = setInterval(function() {
		pos = obj.getTop() + obj.getHeight() / 2 - 165;

		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";
	}, 40)
}	
/* ¿ìÃø¸Þ´º */
function btnshow( icnt ) {
		document.getElementById("Btn"+icnt).style.display = "block";	
}
function btnhidden( icnt ) {
	document.getElementById("Btn"+icnt).style.display = "none";
}

/* image »çÀÌÁîÁ¶Àý auto */
var imgObj = new Image();
function showImgWin(imgName) {
  imgObj.src = imgName;
  setTimeout("createImgWin(imgObj)", 100);
}
function createImgWin(imgObj) {
  if (! imgObj.complete) {
    setTimeout("createImgWin(imgObj)", 100);
    return;
  }
  imageWin = window.open("", "imageWin",
    "width=" + imgObj.width + ",height=" + imgObj.height);
  imageWin.document.write("<html><body style='margin:0'>");
  imageWin.document.write("<a href=javascript:window.close()><img src='" + imgObj.src + "' border=0></a>");
  imageWin.document.write("</body><html>");
  imageWin.document.title = imgObj.src;
}

/* ÆÊÇÃ·§ */


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}