/***************************************
* OBJECT ÆÄÀÏ ÆÐÄ¡ - IE PATCH(ÀÌ¿Ã¶ó½º ÆÐÄ¡)
***************************************/
var paramInfo = new Array;

function initParam()
{
  var oldSize = paramInfo.length;

	for (var i=0; i<oldSize; i++) {
		paramInfo.length--;
	}
}

function setParam(paramName, paramValue)
{
	var idx = paramInfo.length;

	paramInfo[idx] = [];
	paramInfo[idx][0] = paramName;
	paramInfo[idx][1]= paramValue;
}

//FLASH
function playFlash(objID, objSource, objWidth, objHeight, objStyle, cabVersion, embedAttr)
{
	document.write('<OBJECT id="' + objID + '" name="' + objID + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');

	if (cabVersion != '') {
		document.write('codebase="' + self.window.document.protocol + '"://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + cabVersion + '" ');
	}
	document.write('WIDTH="' + objWidth + '" HEIGHT="' + objHeight + '" ' + objStyle + '>');

	for (var i=0; i<paramInfo.length; i++) {
		document.write('<PARAM NAME="' + paramInfo[i][0] + '" VALUE="'+ paramInfo[i][1] +'">');
	}

	document.write('<embed src="' + objSource + '" width="' + objWidth + '" height="' + objHeight + '" ' + embedAttr + '>');
	document.write('</OBJECT>');
}

//MOVIE
function playMedia(objID, objSource, objWidth, objHeight, objStyle)
{
	document.write('<OBJECT id="' + objID + '" name="' + objID + '" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ');
	document.write('WIDTH="' + objWidth + '" HEIGHT="' + objHeight + '" ' + objStyle + '>');

	for (var i=0; i<paramInfo.length; i++) {
		document.write('<PARAM NAME="' + paramInfo[i][0] + '" VALUE="'+ paramInfo[i][1] +'">');
	}
	document.write('<embed src="' + objSource + '" width="' + objWidth + '" height="' + objHeight + '" ' + objStyle + '>');
	document.write('</OBJECT>');
}

function playMovie(objID, objSource, objWidth, objHeight, objStyle)
{
	document.write('<embed src="' + objSource + '" width=' + objWidth + ' height=' + objHeight + ' id=' + objID + ' type="application/x-mplayer2" ' + objStyle + '></embed>');
}

/***** Simple Flash View *****************************************************************************************/

function fFlash(argSRC,argWIDTH,argHEIGHT,argID,argName,argWMODE)
{
var strTEMP;
strTEMP ='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ' ;
if(argID)
   strTEMP = strTEMP + ' ID="' + argID + '" ' ;

strTEMP = strTEMP + ' width="'+ argWIDTH + '" height="' + argHEIGHT + '">';
strTEMP = strTEMP + '<param name="movie" value="' + argSRC + '">';
strTEMP = strTEMP + '<param name="quality" value="high">';
strTEMP = strTEMP + '<param name="memu" value="false">';


if(argWMODE)
   strTEMP = strTEMP + '<param name="wmode" value="' + argWMODE + '">';
else
   strTEMP = strTEMP + '<param name="wmode" value="transparent">';



strTEMP = strTEMP + '<embed src="' + argSRC + '" ';
if(argID)
 strTEMP = strTEMP + ' ID="' + argID + '" ' ;

strTEMP = strTEMP + ' width="' + argWIDTH + '" height="'+ argHEIGHT + '" quality="high" menu=false pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" ';
strTEMP = strTEMP + ' name="' + argName + '" ';
if(argWMODE)
   strTEMP = strTEMP + 'wmode="' + argWMODE + '"';
else
   strTEMP = strTEMP + 'wmode="transparent"';

strTEMP = strTEMP + '></embed></object>';

document.write(strTEMP);
//alert(strTEMP)
}

function view(arg)
{
	div = document.getElementById("apDiv1");
	img = document.getElementById("apDiv1img");

	arg = arg.replace(".jpg","b.jpg");
	img.src = arg;
	div.style.visibility = "visible";
}

function unview(arg)
{
	div = document.getElementById("apDiv1");
	div.style.visibility = "hidden";
}
