// JavaScript Document

var contentsWidth;
var contentsHeight;
var closeBtn;
var swfMain;
var dateObj = new Date();
var ifrId = 'ifr_'+ dateObj.getTime();

function openFrame(p_url,p_width,p_height,p_closeBtn){
	//alert(p_url);
	window.onresize = resizeFunc;
	contentsWidth = p_width;
	contentsHeight = p_height;
	closeBtn = p_closeBtn;
	//iLayer.show('ilayer','ifr',p_url,contentsWidth,contentsHeight,closeBtn);
	iLayer.show('ilayer',ifrId,p_url,contentsWidth,contentsHeight,closeBtn);
	Glayer.show();
	//document.body.style.background = "#4B4B4B";
	swfMain = document.getElementById("foresightLms");
	swfMain.style.width = 1;
	swfMain.style.height = 1;
}

function closeFrame(){
	//---
	if (foresightLms){
		foresightLms.closeFrame();
	}
	//---
	if (swfMain){
		swfMain = document.getElementById("foresightLms");
		swfMain.style.width = 1000;
		swfMain.style.height = 700;
	}
	//---
	iLayer.hide();
	Glayer.hide();
	//document.body.style.background = "#FFFFFF";
	return false;
}

function resizeFunc(){
	var tmpil = Glayer.getElement('ilayer');
	iLayer.resetPos(tmpil,contentsWidth,contentsHeight);
	var tmpgl = Glayer.getElement('glayer');
	Glayer.resetSize2(tmpgl);
}
