// 투명png 
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='';
	return '';
}

// 이벤트팝업 
function viewPop(seq) {
	var temp = eval("document.all.popRes" + seq);
	temp.style.display="block";
}

function closePop(seq){
	var temp = eval("document.all.popRes" + seq);
	temp.style.display="none";
}

// tab menu
function initTabMenu(tabContainerID, order) {
	var tabContainer = document.getElementById(tabContainerID);
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var i = 0;

	var arr = new Array ();
	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "tab")
			thismenu = tabAnchor.item(i);
		else
			continue;

		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		thismenu.onclick = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return false;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.gif", ".gif");
				} else {
					currentmenu.className = currentmenu.className.replace(" on", "");
				}
			}
			this.targetEl.style.display = "";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace(".gif", "_on.gif");
			} else {
				this.className += "on";
			}
			this.container.current = this;

			return false;
		};

		if (!thismenu.container.first)
			thismenu.container.first = thismenu;

		arr[i] = new Array ( thismenu.href.split("#")[1], thismenu );
	}

	if ( order && order != '') {
		for ( i=0; i<arr.length; i++ ) {
			if ( arr[i][0] == order ) {
				arr[i][1].onclick();
				break;
			}
		}
	}
	else {
		if (tabContainer.first)
			tabContainer.first.onclick();
	}
}

// flash
function swfView(src,w,h){
	var html = '';
	html = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+w+'" height="'+h+'" VIEWASTEXT>';
	html +=  '<param name="movie" value="'+src+'" />';
	html +=  '<param name="wmode" value="transparent" />';
	html +=  '<param name="quality" value="high" />';
	html +=  '<embed src="'+src+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'" wmode="transparent">';
	html +=  '</embed>';
	html +=  '</object>';
	document.write(html);
}

/* center 
 function openLayer() {
  h = document.body.clientHeight;
  h2 = parseInt(document.getElementById("wrapPos").style.height);
  h3 = (h - h2) / 2;
  
  if(h <= 700)
		document.getElementById("wrapPos").style.top = "0";
		else
		document.getElementById("wrapPos").style.top = h3 + "px";
	}

	function sizeChange() {
		openLayer()
	var x = document.documentElement.clientWidth;
	 var y = document.documentElement.clientHeight;

	  if(y <= 700)
		document.getElementById("container").style.height = "700px";
		else
		document.getElementById("container").style.height = "100%";
	}

window.onload = sizeChange;
window.onresize = sizeChange; */


function init() {
	var doc = document.getElementById('microContainer');
	if (doc.offsetHeight == 0) {
	} else {
	pageheight = doc.offsetHeight;
	parent.document.getElementById("contentFrame").height = pageheight + "px";
	}
}
window.onload = function() {
	init();
}
