function changeImg(newVar) {
	defaultMc.setVariable("openContent", newVar);
}
function loginAction(mb_id) {
	defaultMc.setVariable("mb_id", mb_id);
	topMc.setVariable("mb_id", mb_id);	
}
function popup(popupURL) {
	defaultMc.setVariable("popupURL", popupURL);
}

var IE = false ;
var miniumHg = 50;
var oldHeightVar = 50;
var iframeMode = false;

function iframeFn (vsl, iLeft, iTop, iWidth, iHeigth) {
	document.all.contentView.style.display=vsl;
	document.all.contentView.style.marginLeft=iLeft;
	document.all.contentView.style.marginTop=iTop;
	document.all.contentView.style.width=iWidth;
	//document.all.contentView.style.height=0;
	if (vsl == "none") {
		contentView.location.href = "blank.asp";
		document.all.contentView.style.height=0;
		//alert("n");
		iframeMode = false;
	}
}

function iframeLnk (args) {
	document.all.contentView.style.height=0;
	contentView.location.href = args;
	iframeMode = true;
}
function popupFn (vsl, pLeft, pTop, pWidth, pHeigth) {
	document.all.contentPopup.style.display=vsl;
	document.all.contentPopup.style.marginLeft=pLeft;
	document.all.contentPopup.style.marginTop=pTop;
	document.all.contentPopup.style.width=pWidth;
	document.all.contentPopup.style.height=pHeigth;
	if (vsl == "none") {
		contentPopup.location.href = "blank.asp";
		document.all.contentPopup.style.height=0;
	}
}

function popupLnk (args) {
	document.all.contentPopup.style.height=0;
	contentPopup.location.href = args;
}

function historyBack() {
	defaultMc.setVariable("historyBack", "ok");
}

function newFlashHg(args) {
	document.all.defaultMc.style.height = args;
}

if (window.navigator.appName.indexOf("Explorer") !=-1) IE = true;

function getReSize() {
	try {
		var objFrame = document.getElementById("contentView");
		if(IE) objBody = contentView.document.body;
		else objBody = contentView.contentDocument.body;
//		if (iframeMode == true) {
			contentViewHeight = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight); 
			if (contentViewHeight > miniumHg) {
				newHeightVar = contentViewHeight;
			} else {
				newHeightVar = miniumHg;
			}
			//alert(objBody.scrollHeight+"  "+objBody.offsetHeight+" "+objBody.clientHeight);
			if (newHeightVar != oldHeightVar) {
				oldHeightVar = newHeightVar;
				objFrame.style.height = newHeightVar; // ÆäÀÌÁö ÇÁ·¹ÀÓH
				defaultMc.setVariable("iframeHg", newHeightVar);
			}
	//	}
	} 
	catch(e) {
	};
	setTimeout('getReSize()',1000);
} 
getReSize();

function setScroll(arg) {
    window.scrollBy(0,Number(arg)*-20);
}
