/* ++++++++++++++++++++++++++++++++++++++++++ *\
	ÀÛ¼ºÀÚ		: ±èÁø±Ô(idea72@daulsoft.com , p7227kjg@dreamwiz.com)
	ÀÛ¼ºÀÏÀÚ		: 2006-02-13
	±â´É			: IE Patch·Î ÀÎÇÑ Flash ÀÌ¹ÌÁö ¿ìÈ¸ ½ºÅ©¸³Æ®
\* ++++++++++++++++++++++++++++++++++++++++++ */

//------------------------------------------------------------------------------------------
// ¼öÁ¤ÀÚ : (ÁÖ)´Ù¿ï¼ÒÇÁÆ® - ÃÖÁØ±¸
// ¼öÁ¤ÀÏ : 2006-02-16
// ¼öÁ¤»çÇ× : ÁÖ¼®Ã·ºÎ? -_-
//------------------------------------------------------------------------------------------


// Object ÅÂ±× (ÇÃ·¡½Ã ÆÄÀÏ°æ·Î¿Í ÆÄÀÏ¸íÀÇ º¯¼ö¸¦ °°ÀÌ ÀÔ·Â)
function fnc_Return_Flash(str_Url, int_W, int_H)
{
	var str_Flash_Obj;

	var str_Url; // ÇÃ·¡½Ã ÆÄÀÏ°æ·Î & ÆÄÀÏ¸í
	var int_W; // ÇÃ·¡½Ã °¡·Î»çÀÌÁî
	var int_H; // ÇÃ·¡½Ã ¼¼·Î»çÀÌÁî

	str_Url		= str_Url;
	int_W		= int_W;
	int_H		= int_H;

	str_Flash_Obj = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0" \
						width="'+int_W+'" height="'+int_H+'">\n\
						<param name="movie" value="'+str_Url+'">\n\
						<param name="play" value="true">\n\
						<param name="loop" value="true">\n\
						<param name="quality" value="high">\n\
						<embed src="'+str_Url+'" play="true" loop="true" quality="high" \
						pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="'+int_W+'" height="'+int_H+'"></embed>\n\
					</object>';

	document.write(str_Flash_Obj);
}

// Object ÅÂ±× (ÇÃ·¡½Ã ÆÄÀÏ°æ·Î¿Í ÆÄÀÏ¸íÀÇ º¯¼ö¸¦ °°ÀÌ ÀÔ·Â)
function fnc_Return_Embed()
{
	var str_Embed_Obj;

	str_Embed_Obj = '<embed src="mms://edudream.vod.nefficient.co.kr/edudream/daulsoft/20060720.wmv" width="320" height="285" autostart="true" loop="false" hidden="false"></embed>';

	document.write(str_Embed_Obj);
}

//---------- Äü¸Þ´º¿ë ÀÚ¹Ù ½ºÅ©¸®Æ® S ----------/
var isDOM = (document.getElementById ? true : false);
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
var isNS = navigator.appName == "Netscape";

function getRef(id) {
  if (isDOM) return document.getElementById(id);
  if (isIE4) return document.all[id];
  if (isNS4) return document.layers[id];
}

function getSty(id) {
  x = getRef(id);
  return (isNS4 ? getRef(id) : getRef(id).style);
}

var scrollerHeight = 88;
var puaseBetweenImages = 3000;
var imageIdx = 0;

function moveRightEdge() {
  var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;

  if (document.body.clientHeight) yTop=210; // À§ÂÊ À§Ä¡
  else yTop=210;

  if (isNS4) {
    yMenuFrom   = divMenu.top;
    yMenuTo     = windows.pageYOffset + yTop;
  } else if (isDOM) {
    yMenuFrom   = parseInt (divMenu.style.top, 10);
    yMenuTo     = (isNS ? window.pageYOffset : document.body.scrollTop) + yTop;
  }
  timeoutNextCheck = 500;

  if (yMenuFrom != yMenuTo) {
    yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20);
    if (yMenuTo < yMenuFrom)
      yOffset = -yOffset;
    if (isNS4)
      divMenu.top += yOffset;
    else if (isDOM)
      divMenu.style.top = parseInt (divMenu.style.top, 10) + yOffset;
      timeoutNextCheck = 10;
  }
  setTimeout ("moveRightEdge()", timeoutNextCheck);
}

//ÀÌ°÷¿¡ ·¹ÀÌ¾îÁ¤º¸¸¦ ³Ö´Â´Ù
//document.write(left_menu)

function MovePosition()
{

if (isNS4) {
  var divMenu = document["divMenu"];
  divMenu.top = top.pageYOffset + 100;
  divMenu.visibility = "visible";
  moveRightEdge();
} else if (isDOM) {

  var divMenu = getRef('divMenu');
  divMenu.style.top = (isNS ? window.pageYOffset : document.body.scrollTop) + 300;
  divMenu.style.visibility = "visible";
  moveRightEdge();
}
}

//---------- Äü¸Þ´º¿ë ÀÚ¹Ù ½ºÅ©¸®Æ® E ----------//

// Äü¸Þ´º ÇÃ·¡½Ã
function fnc_Return_Flash2(str_Url, int_W, int_H)
{
	var str_Flash_Obj;

	var str_Url; // ÇÃ·¡½Ã ÆÄÀÏ°æ·Î & ÆÄÀÏ¸í
	var int_W; // ÇÃ·¡½Ã °¡·Î»çÀÌÁî
	var int_H; // ÇÃ·¡½Ã ¼¼·Î»çÀÌÁî

	str_Url		= str_Url;
	int_W		= int_W;
	int_H		= int_H;

	str_Flash_Obj = '<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="'+int_W+'" height="'+int_H+'">\n\
						<param name="movie" value="'+str_Url+'">\n\
						<param name="play" value="true">\n\
						<param name="loop" value="true">\n\
						<param name="quality" value="high">\n\
						<embed src="'+str_Url+'" play="true" loop="true" quality="high" \
						pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+int_W+'" height="'+int_H+'"></embed>\n\
					</object>';

	document.write(str_Flash_Obj);
}


