function swf(src,w,h){
 html = '';
 html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="param" width="'+w+'" height="'+h+'">';
 html += '<param name="movie" value="'+src+'">';
 html += '<param name="quality" value="high">';
 html += '<param name="wmode" value="transparent">';
 html += '<param name="bgcolor" value="#ffffff">';
 html += '<param name="menu" value="false">';
 html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" menu="false" width="'+w+'" height="'+h+'" swliveconnect="true" id="param" name="param" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';
 html += '<\/object>';
 document.write(html);
}

// TOP ¹öÆ° ½ÃÀÛ -----------------------------------------------------------------------------------------------------------------------------------------
var Xpos         = 960;    // ¹öÆ° ·¹ÀÌ¾î xÁÂÇ¥°ª(·¹ÀÌ¾î °ª°ú ÀÏÄ¡ ½ÃÅ´)
var Ypos         = -13;    // ¹öÆ° ·¹ÀÌ¾î yÁÂÇ¥°ª(·¹ÀÌ¾î °ª°ú ÀÏÄ¡ ½ÃÅ´, '-'¸¦ ÇÏ´Â ÀÌÀ¯´Â Ã³À½·Îµù½Ã ¹öÆ°ÀÌ º¸ÀÌÁö ¾Ê°Ô ÇÏ±âÀ§ÇÔ.)
var Ygravity     = 0.9;    // ¼Óµµ
var ScrollPos    = 0;      // ½ºÅ©·Ñ À§Ä¡
var ScrollSpeed  = 1;      // ¿òÁ÷ÀÓ °¨Áö Å¸ÀÓ
var MarginTop    = 560;    // »ó´Ü ¿©¹é

function FloatTopButton()
{
	docWidth  = (document.documentElement.clientWidth  == 0) ? document.body.clientWidth  : document.documentElement.clientWidth;
	docHeight = (document.documentElement.clientHeight == 0) ? document.body.clientHeight : document.documentElement.clientHeight;
	ScrollPos = (document.documentElement.scrollTop    == 0) ? document.body.scrollTop    : document.documentElement.scrollTop;

	//Xpos = (docWidth - TopButton.offsetWidth) - 10; //¿À¸¥ÂÊ ¿©¹é ¹è³Ê°¡ ¿À¸¥ÂÊ¿¡ ºÙÀ»°æ¿ì
	//Xpos = (docWidth / 2) + 410;                  // Áß¾ÓÁ¤·ÄÀÏ°æ¿ì. " + 410 Àº Å×ÀÌºí Å©±â / 2 "
	
	Yboundary = ScrollPos + MarginTop;

	if(document.getElementById("TopButton").offsetTop < Yboundary - 1)
	{
		Ypos += 2;
	}

	if(document.getElementById("TopButton").offsetTop > Yboundary + 1)
	{
		Ypos -= 1;
	}

	Ypos *= Ygravity;

	document.getElementById("TopButton").style.pixelLeft = Xpos;
	document.getElementById("TopButton").style.pixelTop += Ypos;

	setTimeout("FloatTopButton();", ScrollSpeed);
}

function gotop()
{
	window.scrollTo(0,0);
}
// TOP ¹öÆ° ³¡ ------------------------------------------------------------------------------------------------------------------------------------------

function insertMovie(url, w, h, tp) {
    var m_width  = w;
    var m_height = h;
    var id = "mplayer";
    
	mediaContent = '<object id="' + id + '" type="video/x-ms-wmv" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="'+m_width+'" height="'+m_height+'">';
    mediaContent += '<param name="URL" value="' + url + '">';
    mediaContent += '<param name="autoStart" value="true">';
	mediaContent += '<param name="uiMode" value="' + tp + '">';
    mediaContent += '<param name="enablecontextmenu" value="0">';
    mediaContent += '<embed id="' + id + '" width="'+m_width+'" height="'+m_height+'" showcontrols=1 showstatusbar=1 autostart=1 playcount=0 src="' + url +'"></embed>';
    mediaContent += '</object>';

    //alert(mediaContent);
    document.write(mediaContent);
}

function popupMovie()
{
	var cWidth    = parseInt(window.screen.availWidth);
	var cHeight   = parseInt(window.screen.availHeight);
	var winWidth  = 772;
	var winHeight = 733;
	var winLeft, winTop;	

	winLeft = (cWidth - winWidth) / 2;
	winTop  = (cHeight - winHeight) / 2;

	window.open("/inc/popup-movie.asp","popupMovie","width="+winWidth+",height="+winHeight+",left="+winLeft+",top="+winTop+",toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=no,copyhistory=no");
}
