function MM_jumpMenu(targ,selObj,restore){ //v3.0
	//eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if(selObj.options[selObj.selectedIndex].value+"" != "") 
		window.open( selObj.options[selObj.selectedIndex].value );
	if(restore) selObj.selectedIndex=0;
}

function openPop(URL, name, popWidth, popHeight, scroll, resize) {
	if( popWidth != 0 && popHeight != 0 ) {
		popLeft = screen.width/2 - popWidth/2;
		popTop = screen.height/2 - popHeight/2;
	} else {
		popWidth = screen.width-12;
		popHeight = screen.height-100;
		popLeft = 0;
		popTop = 0;
	}
	scrollYn = typeof(scroll) == "undefined" || scroll.toLowerCase() == 'yes' ? 'Yes' : 'No';
	resizeYn = typeof(resize) == "undefined" || resize.toLowerCase() == 'yes' ? 'Yes' : 'No';
	option = 'width='+popWidth+',height='+popHeight+',toolbar=0,locationbar=0,status='+scrollYn+',menubar=0,scrollbars='+scrollYn+',top='+popTop+',left='+popLeft+',resizable='+resizeYn;
	obj = window.open( URL, name, option );
	obj.focus();
}

function _ID(obj) {
	return document.getElementById(obj);
}

function popupLayer2(s,w,h) {
	if (!w) w = 470;
	if (!h) h = 417;

	var pixelBorder = 0;
	var titleHeight = 0;
	w += pixelBorder * 2;
	h += pixelBorder * 2 + titleHeight;

	var bodyW = document.body.clientWidth;
 
	var posX = (bodyW - w) / 2;
	var posY = document.documentElement.scrollTop + (screen.height / 2) - (h * 3 / 4);

	hiddenSelectBox('hidden');

	/*** 백그라운드 레이어 ***/
	var obj = document.createElement("div");
		with (obj.style){
		position = "absolute";
		left = 0;
		top = 0;
		width = "100%";
		height = document.body.scrollHeight + 30;
		// height = "100%";
		backgroundColor = "#000000";
		filter = "Alpha(Opacity=50)";
		opacity = "0.5";
	}
	obj.id = "objPopupLayerBg";
	document.body.appendChild(obj);

	/*** 내용프레임 레이어 ***/
	var obj = document.createElement("div");
		with (obj.style){
		position = "absolute";
		left = posX + document.body.scrollLeft;
		top = posY + document.body.scrollTop;
		width = w;
		height = h;
		backgroundColor = "#000000";
		border = "0px solid #b4b4b4";
	}
	obj.id = "objPopupLayer";
	document.body.appendChild(obj);

	/*** 타이틀바 레이어 ***/
	var bottom = document.createElement("div");
	with (bottom.style){
		position = "absolute";
		width = w;
		height = 16;
		left = 0;
		top = h - 16;
		padding = "0 0 0 0";
		textAlign = "right";
		backgroundColor = "transparent";
		color = "#ffffff";
		font = "bold 16px tahoma";
	}
	bottom.innerHTML = "<a href='javascript:closeLayer();'><img src='../html/images/icon/close_16x16.png' border=0 width=16 height=16></a>";
	obj.appendChild(bottom);

	/*** 아이프레임 ***/
	var ifrm = document.createElement("iframe");
	with (ifrm.style){
		width = w - 0;
		height = h - pixelBorder * 0 - titleHeight - 0;
		border = "3 solid #202020";
	}
	ifrm.frameBorder = 0;
	ifrm.src = s;
	obj.appendChild(ifrm);
}

function closeLayer() {
	hiddenSelectBox('visible');
	_ID('objPopupLayer').parentNode.removeChild( _ID('objPopupLayer') );
	_ID('objPopupLayerBg').parentNode.removeChild( _ID('objPopupLayerBg') );
}

function hiddenSelectBox(mode) {
	var obj = document.getElementsByTagName('select');
	for (i = 0; i < obj.length; i++) {
		obj[i].style.visibility = mode;
	}
}

function render_flash(url, width, height) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + width + '" height="' + height + '" VIEWASTEXT>');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="' + url + '">');
	document.write('<param name="quality" value="best">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<param name="menu" value="false" />');
	document.write('<param name="scale" value="noscale" />');
	document.write('<embed src="' + url + '" allowScriptAccess="sameDomain" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '" wmode="transparent"></embed>');
	document.write('</object>');
}
