
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>";
}

function MakeObjectString(classid, codebase, name, id, width,height, param)
{
	return "<object classid="+classid+" codebase="+codebase+" name="+name+" width="+width+" height="+height+" id="+id+"><param name=wmode value="+wmode+" />"+param+"</object>";
}

function MakeMovieString(MovieURL, width, height, showControl, autoStart)
{
	return "<EMBED SRC='"+MovieURL+"' width='"+width+"' height='"+height+"'  showcontrols='"+showControl+"' autostart='"+autoStart+"'></EMBED>";
}

// innerHTML Type
function SetInnerHTML(target, code)
{
	target.innerHTML = code;
}

// Direct Write Type
function DocumentWrite(src)
{
	document.write(src);
}

function doPopupWindow(win, MyW, MyH, MySel, MyName, contents) {
	var myX, myY, PopUpWindow

	myX = (screen.width - MyW) / 2 - 4;
	myY = (screen.height - MyH) / 2 - 40;

	//openWinClose(MyW,MyH,MySel,MyName);

	switch (MySel) {
		case 1:
			PopUpWindow = window.open(win, MyName, "width=" + MyW + ",Height=" + MyH + ",Top=" + myY + ",left=" + myX + ",statusbars=no,scrollbars=no,resizable=no,status=0");
			break;
		case 2:
			PopUpWindow = window.open(win, MyName, "width=" + MyW + ",Height=" + MyH + ",Top=" + myY + ",left=" + myX + ",statusbars=no,scrollbars=yes,resizable=no,status=0");
			break;
		default:
			PopUpWindow = window.open(win, MyName, "width=" + MyW + ",Height=" + MyH + ",Top=" + myY + ",left=" + myX + ",statusbars=no,scrollbars=no,resizable=no,status=0");
	}

	if(PopUpWindow == null)   {
		alert("Â÷´ÜµÈ ÆË¾÷Ã¢À» Çã¿ëÇØ ÁÖ¼¼¿ä.     ");
	} else {
		if ( contents != "" && typeof(contents) != "undefined" ) PopUpWindow.document.write(contents);
		PopUpWindow.focus();
	}
}

function getLastMonthDay(yy, mm) {
	var MonthArray = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
	if ( (Number(yy) % 4 == 0 && Number(yy) % 100 != 0) || Number(yy) % 400 == 0 ) MonthArray[1] = 29;
	return MonthArray[Number(mm)-1];
}

function fnSetLastDay(yy, mm, target, txt)
{
	var cnt = target.length;
	var tmp = "";

	for ( var i=cnt-1; i>=0; i-- )
		if ( target.options[i].value != "" ) target.remove(i);

	if ( yy.value == "" || mm.value == "" ) return;

	if ( typeof(txt) == "undefined" || txt == null ) txt = "";

	var dd = getLastMonthDay(yy.value, mm.value);

	for (var i=0; i<dd; i++)
	{
		tmp = (i+1);
		if ( (i+1) < 10 ) tmp = "0" + tmp;
		target.options[target.length] = new Option(tmp + txt, tmp);
	}
}