/***************************************
* ÇÃ·¡½¬ Å×µÎ¸® ¾ø¾Ö¹ö¸®±â~
* FF¿¡¼­ embed wmode=\"transparent\" Ãß°¡
* FlashVarsÃß°¡ º¯¼öÆ÷ÇÔ¹®ÀÚ º¸³»ÁÖ»ï
***************************************/
	function MakeFlash(Url,Width,Height,FlashVars)
	{
		if(FlashVars!="") {
			var AddVar_1	=	"<param name=\"FlashVars\" value=\""+FlashVars+"\">";
			var AddVar_2	=	"FlashVars=\""+FlashVars+"\"";
		}
		  document.writeln("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + Width + "\" height=\"" + Height + "\">");
		  document.writeln("<param name=\"movie\" value=\"" + Url + "\">");
		  document.writeln(AddVar_1);
		  document.writeln("<param name=\"quality\" value=\"high\" />");
		  document.writeln("<param name=\"wmode\" value=\"transparent\">");
		  document.writeln("<embed src=\"" + Url + "\" "+ AddVar_2 +" quality=\"high\" wmode=\"transparent\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + Width + "\"  height=\"" + Height + "\">");
		  document.writeln("</object>");
	}


//----------------------------------------------
//Floating v1.0 Source By Bermann
//dobermann75@gmail.com
//----------------------------------------------

//new Floating(Àû¿ëÇÒ°³Ã¼ , XÃà¿©¹é , YÃà¿©¹é , ¹Ì²ô·¯Áö´Â¼Óµµ:ÀÛÀ»¼ö·Ïºü¸§..±âº»20 , ºü¸£±â:ÀÛÀ»¼ö·ÏºÎµå·¯¿ò..±âº»10);

function Floating(FloatingObj,MarginX,MarginY,Percentage,setTime) {

	this.FloatingObj = FloatingObj;
	this.FloatingObj.style.position = "absolute";
	this.MarginX = (MarginX) ? MarginX : 0;
	this.MarginY = (MarginY) ? MarginY : 0;
	this.Percentage = (Percentage) ? Percentage : 20;
	this.setTime = (setTime) ? setTime : 10;
	this.Run();
}


Floating.prototype.Run = function () {
	var This = this;
	var FloatingObjLeft = (this.FloatingObj.style.left) ? parseInt(this.FloatingObj.style.left,10) : this.FloatingObj.offsetLeft;
	var FloatingObjTop = (this.FloatingObj.style.top) ? parseInt(this.FloatingObj.style.top,10) : this.FloatingObj.offsetTop;

	if(window.document.body.offsetWidth >= 1280)
	{
		var DocLeft = document.body.scrollLeft + this.MarginX;
	}else{
		var DocLeft = Math.ceil((window.document.body.offsetWidth / 2)) + 350;	// 410 Àº °¡ÁßÄ¡ ÇÊ¿ä¿¡ µû¶ó ¼öÁ¤
	}//	end if

	var DocTop = document.body.scrollTop + this.MarginY;

//	var DocLeft = document.documentElement.scrollLeft + this.MarginX;
//	var DocTop = document.documentElement.scrollTop + this.MarginY

	var MoveX = Math.abs(FloatingObjLeft - DocLeft);
	MoveX = Math.ceil(MoveX / this.Percentage);
	var MoveY = Math.abs(FloatingObjTop - DocTop);
	MoveY = Math.ceil(MoveY / this.Percentage);

	if (FloatingObjLeft < DocLeft) {
		this.FloatingObj.style.left = FloatingObjLeft + MoveX + "px";
	} else {
		this.FloatingObj.style.left = FloatingObjLeft - MoveX + "px";
	}

	if (FloatingObjTop < DocTop) {
		this.FloatingObj.style.top = FloatingObjTop + MoveY + "px";
	} else {
		this.FloatingObj.style.top = FloatingObjTop - MoveY + "px";
	}

	//window.status = FloatingObjTop + " : " + DocTop + " --- " + FloatingObjLeft + " : " + DocLeft;

	setTimeout(function () { This.Run(); },This.setTime);
}