/* ================================================================ */


//openSubWindow
function openSubWindow(url,name,width,height,misc,centering) {
	var details;
	details = "width="+ width +",height=" + height +",";
	details += "toolbar="+ misc.charAt(0) +",location="+ misc.charAt(1) +",status="+ misc.charAt(2);
	details += ",menubar="+ misc.charAt(4) +",scrollbars="+misc.charAt(5) +",resizable="+misc.charAt(6)+"";
	if (centering =="center") {
		var posX = (screen.width / 2) - (width / 2);
		var posY = (screen.height / 2) - (height / 2);
		details += ",left=" + posX + ",top=" + posY + ",screenX=" + posX + ",screenY=" + posY;
	}
	window.open(url,name,details);
}

//openerWindow
function openerWindow(url){
	if(!window.opener || window.opener.closed){
		window.open(url);
	}else{
		window.opener.location.href = url;
	}
}
