/**********************************************************************
NEC : [ common.js ]

08.02.22
***********************************************************************
variavles : NF_xxx
functions : NF_utilityxxx / 
**********************************************************************/

/*=============================================
 NF_utilityHtml()
=============================================*/
function NF_utilityHtml(){


}

/*=============================================
 NF_openWindow()
=============================================*/
var pNotFocus = '';
var pUrl,pName,pWid,pHgt;


if( navigator.appName == "Microsoft Internet Explorer" ){
	if( navigator.userAgent.substr(navigator.userAgent.indexOf("MSIE") + 5,3) < 5.0 ){
		pNotFocus = "IE4";
	}
}

function NF_openWindow(pUrl,pName,pWid,pHgt){

	var pOpt = "toolbar=yes,location=yes,directories=no,status=yes,scrollbars=yes,menubar=yes,resizable=yes";

	if( pWid != undefined )
		var pOpt = pOpt + ",width=" + pWid;
	if( pHgt != undefined )
		var pOpt = pOpt + ",height=" + pHgt;

	var pWin = window.open(pUrl,pName,pOpt);

	if( pNotFocus != "IE4" && pWin != null ){
		if ((pWin.outerWidth && pWin.outerWidth != pWid) || (pWin.outerHeight && pWin.outerHeight != pHgt)) {
			var toW = (pWid != undefined && pWin.outerWidth  > pWin.innerWidth ) ? pWid + (pWin.outerWidth  - pWin.innerWidth ) : pWin.outerWidth;
			var toH = (pHgt != undefined && pWin.outerHeight > pWin.innerHeight) ? pHgt + (pWin.outerHeight - pWin.innerHeight) : pWin.outerHeight;
			if (navigator.userAgent.indexOf("Mac") != -1 && navigator.userAgent.indexOf(" Firefox/2.")) {
				toH += 3;
			}
			pWin.resizeTo(toW, toH);
		} else {
			var de = (pWin.document) ? pWin.document.documentElement : null;
			if (de) {
				if (pWid != undefined && de.clientWidth) {
					pWin.resizeBy((pWid - de.clientWidth), 0);
				}
				if (pHgt != undefined && de.clientHeight) {
					pWin.resizeBy(0, (pHgt - de.clientHeight));
				}
			}
		}
		pWin.focus();
	}
}

/*=============================================
imBtnClose()
=============================================*/
window.onload = imBtnClose;

function imBtnClose() {
	btCloseJA();
	btCloseEN();
}
function btCloseJA() {
	var clBoxJA = document.getElementById('NF-imcJA');
	if(clBoxJA == null) {
	}
	else {
		clBoxJA.innerHTML = '<p class="NF-close"><a href="javascript:window.close()"><img src="/nec_tmp/v1/common/images/bt_close_ja.gif" alt="&#38281;&#12376;&#12427;" width="65" height="21" /></a></p>';
	}
}
function btCloseEN() {
	var clBoxEN = document.getElementById('NF-imcEN');
	if(clBoxEN == null) {
	}
	else {
		clBoxEN.innerHTML = '<p class="NF-close"><a href="javascript:window.close()"><img src="/nec_tmp/v1/common/images/bt_close_en.gif" alt="&#38281;&#12376;&#12427;" width="65" height="21" /></a></p>';
	}
}

/*********************************************************************/
