
// ****************************************************************************************************
//
// Filename		:	date.js
// Create Date	:	2006-07-25
// Modify Date  :   
// Description	:	object ÅÂ±× Ã³¸®¸¦ À§ÇÑ ÇÔ¼öµéÀ» Á¤ÀÇÇØ ³õÀº ÆÄÀÏ
// Reference	:	
//
// ****************************************************************************************************


// ****************************************************************************************************
//
// Create Date : 2006-07-12
// Modify Date :   
//
//	1. Description : ÇÃ·¡½¬ ÆÄÀÏÀ» ¿¬µ¿ÇÒ ¶§ »ç¿ëÇÑ´Ù.
//	2. Parameters
//		- source : source url --> ÇÃ·¡½¬ ÆÄÀÏÀÇ °æ·Î
//		- id : flash id
//		- width : source ³ÐÀÌ		 
//		- height : source ³ôÀÌ
//		- wmode : wmode --> "none, transparent, opaque"
//		- otherparam : Ãß°¡ ÆÄ¶ó¹ÌÅÍ "<param name='myParam' value='myValue' />"
//	3. Return Type : String
//
// ****************************************************************************************************

function MakeFlashString( source, id, width, height, wmode, otherParam )
{	
	//return "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0\" width="+width+" height="+height+" id="+id+"><param name=wmode value="+wmode+" /><param name=movie value="+source+" /><param name=quality value=high />"+otherParam+"<embed src="+source+" quality=high wmode="+wmode+" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash\" width="+width+" height="+height+"></embed></object>";
	return GnxGetFlashActivateString( source, width, height, wmode, id, 0);
	
}

function GnxGetFlashActivateString ( strFlashUrl , n4Width , n4Height , strWmode , strId , strClassName ) {
	var objSize_attribute = "";
	var objId_attribute = "";
	var objId_IE_attribute = "";
	var className_attribute = "";
	var wmode_param = "";
	var wmode_attribute = "";
	
	if (n4Width != 0) {
		objSize_attribute = " width='"+ n4Width +"' height='"+ n4Height +"'";
	} 
	if (strId != 0) {
		objId_attribute = " id='" + strId + "'";
		objId_IE_attribute = " id='" + strId + "'";
	} 
	if (strClassName != 0) {
		className_attribute = " class='" + strClassName + "'";
	} 

	if (strWmode != 0) {
		wmode_param = "<param name='wmode' value='" + strWmode + "' />";
		wmode_attribute = " wmode='" + strWmode + "'";
	} 
	
	var textToWrite = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0' " + objSize_attribute + objId_IE_attribute + className_attribute + ">\n";
	textToWrite += "<param name='movie' value='"+ strFlashUrl +"' />\n";
	textToWrite += "<param name='quality' value='high' />\n";
	textToWrite += "<param name=bgcolor value='#FFFFFF'>\n";
	textToWrite += "<param name='allowScriptAccess' value='always' />\n";
	textToWrite += wmode_param+"\n";
	textToWrite += "<!-- Hixie method -->\n";
	textToWrite += "<!--[if !IE]> <-->\n";
	textToWrite += "<object type='application/x-shockwave-flash' bgcolor='#FFFFFF' data='"+ strFlashUrl +"'" + objSize_attribute + objId_attribute + wmode_attribute + className_attribute + "></object>\n";
	textToWrite += "<!--> <![endif]-->\n";
	textToWrite += "</object>";

	return 	textToWrite;
}

// ****************************************************************************************************
//
// Create Date : 2006-07-12
// Modify Date :   
//
//	1. Description : ActiveX °°Àº ÆÄÀÏÀ» ¿¬µ¿ÇÒ ¶§ »ç¿ëÇÑ´Ù.
//	2. Parameters
//		- classid : classid --> CLSID
//		- codebase : cabÆÄÀÏ À§Ä¡ ¹× ¹öÀüÁ¤º¸ 
//		- name : object¸í
//		- id : object id
//		- width : source ³ÐÀÌ		 
//		- height : source ³ôÀÌ
//		- param : Ãß°¡ ÆÄ¶ó¹ÌÅÍ "<param name='myParam' value='myValue' />"
//	3. Return Type : String
//
// ****************************************************************************************************

function MakeObjectString( classid, codebase, name, id, width, height, param )
{
	return "<object classid="+classid+" codebase="+codebase+" name="+name+" width="+width+" height="+height+" id="+id+">"+param+"</object>";
}

// ****************************************************************************************************
//
// Create Date : 2006-07-12
// Modify Date :   
//
//	1. Description : »óÈ£ÀÛ¿ë¿¡ »ó°ü¾øÀÌ ÄÁÅÙÃ÷¿¡ »ç¿ë °¡´É Ex) SetInnerHTML(document.all.mm, MakeFlashString('image/ml_flash.swf','emb1','330','520','opaque'));
//	2. Parameters
//		- target : ÅÂ±× ID
//		- code : ÅÂ±×¿¡ ÀÔ·ÂÇÒ object ÅÂ±× ½ºÆ®¸µ
//	3. Return Type : ¾øÀ½
//
// ****************************************************************************************************

function SetInnerHTML( target, code )
{ 
	target.innerHTML = code; 
}

// ****************************************************************************************************
//
// Create Date : 2006-07-12
// Modify Date :   
//
//	1. Description : »óÈ£ÀÛ¿ëÀÌ ¾ø´Â ÄÁÅÙÃ÷¿¡ »ç¿ë °¡´É Ex) DocumentWrite(MakeFlashString('image/ml_flash.swf','emb1','330','520','opaque'));
//	2. Parameters
//		- src : object ÅÂ±× ½ºÆ®¸µ
//	3. Return Type : ¾øÀ½
//
// ****************************************************************************************************

function DocumentWrite( src )
{
	document.write(src);
}
