/*
 * @title : Node °è»ê½Ã ie¸¦ Á¦¿ÜÇÑ ºê¶ó¿ìÀú¿¡¼­ °ø¹é±îÁö ³ëµå·Î Æ÷ÇÔ½ÃÅ°´Â °ÍÀ» Á¦°Å
 * @version : 1.0
 * @writer : ÀÌÈñ¿ø
 * @what's new :
 */
function removeNullNode(obj) {
	for(k=0;k<obj.length;k++) {
		if(obj[k].nodeType != 1) obj[k].parentNode.removeChild(obj[k]);
	}

	return obj;
}

/*
 * @title : ÀÌ¹ÌÁö on´ëÃ¼
 * @version : 1.0
 * @writer :
 * @modify(date,writer) :
 * @what's new :
 */
function menuOn(imgEl)
{
  if(imgEl.src.indexOf("_on") < 0) imgEl.src = imgEl.src.replace(".gif", "_on.gif");
}

/*
 * @title : ÀÌ¹ÌÁö off´ëÃ¼
 * @version : 1.0
 * @writer :
 * @modify(date,writer) :
 * @what's new :
 */
function menuOut(imgEl)
{
  imgEl.src = imgEl.src.replace("_on.gif", ".gif");
}

/*
 * @title : object ÅëÇÕ»ý¼º°ü¸®
 * @version : 1.0
 * @writer : 09. 07. 16
 * @modify(date,writer) :
 * @what's new :
 */
function makeobject(path,w,h,id,vars,transparent,bg) {
	this.id = id;
	this.path = path;
	this.w = w+"px";
	this.h = h+"px";
	this.vars = (vars) ? vars : '';
	this.trnasparent = (transparent) ? transparent : 'transparent';
	this.bg = (bg) ? bg : '#ffffff';
	this.gettag = function() {
			this.classid = 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000';
			this.codebase = 'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0';
			this.tag = "<object classid='"+this.classid+"' codebase='"+this.codebase+"' id='"+this.id+"' width='"+this.w+"' height='"+this.h+"'>";
			this.tag += "<param name='movie' value='"+this.path+"' />";
			this.tag += "<param name='allowScriptAccess' value='always' />";
			if(this.vars) this.tag += "<param name='FlashVars' value='"+this.vars+"' />";
			if(this.trnasparent) this.tag += "<param name='wmode' value='"+this.trnasparent+"' />";
			this.tag += "<param name='menu' value='false' />";
			this.tag += "<param name='quality' value='high' />"
			this.tag += "<param name='bgcolor' value='"+this.bg+"' />";
			this.tag += "<param value='"+this.path+"'>";
			this.tag += "<param name='base' value='.'>";
			this.tag += "<embed src='"+this.path+"'";
			if(this.vars) this.tag += " FlashVars='"+this.vars+"'";
			if(this.trnasparent) this.tag += " wmode='"+this.trnasparent+"'";
			this.tag += " width='"+this.w+"'";
			this.tag += " height='"+this.h+"'";
			this.tag += " bgcolor='"+this.bg+"'";
			this.tag += " name='"+this.id+"'";
			this.tag += " menu='false'";
			this.tag += " base='.'";
			this.tag += " quality='high'";
			this.tag += " allowScriptAccess='always'";
			this.tag += " type='application/x-shockwave-flash'";
			this.tag += " pluginspage='http://www.macromedia.com/go/etflashplayer'";
			this.tag += " />";
			this.tag += "</object>";
			return this.tag;
	}
	this.writetag =
		function() {
			document.write(this.gettag());
			//FlashÀÇ ExternalInterface°¡ Form Tag³»¿¡¼­ ¿À·ù³ª´Â ¹ö±×¸¦ ÇØ°áÇÏ´Â ÄÚµå
			eval("window." + this.id + " = document.getElementById('" + this.id + "');");
		}
}

function setPng24(obj) {
	obj.width=obj.height=1;
	obj.className=obj.className.replace(/\bpng24\b/i,''); 
	obj.style.filter =
	"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
	obj.src='about:blank;';
	return '';
}
