function openFixedWindow(psURL,psName,pnWidth,pnHeight,pnTop,pnLeft){
	var nLeft=pnLeft || Math.round((window.screen.width-pnWidth)/2);
	var nTop=pnTop || Math.round((window.screen.height-pnHeight)/2)-20;	
	if (psName=="") psName=null;
	var oWindow=window.open(psURL,psName,"top="+nTop+",left="+nLeft+",height="+pnHeight+",width="+pnWidth+",status=no,toolbar=no,menubar=no,location=no,scrollbars=no,dependent");
	oWindow.focus();
}
function openAutoFixedWindow(psURL,psName,pnWidth,pnHeight,pnTop,pnLeft){

	var nLeft=pnLeft || Math.round((window.screen.width-pnWidth)/2);
	var nTop=pnTop || Math.round((window.screen.height-pnHeight)/2)-20;	
	if (psName=="") psName=null;
	var oWindow=window.open(psURL,psName,"top="+nTop+",left="+nLeft+",height="+pnHeight+",width="+pnWidth+",status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,dependent");
	oWindow.focus();
}
function openWindowWithMenubar(psURL,psName,pnWidth,pnHeight,pnTop,pnLeft){
	var nLeft=pnLeft || Math.round((window.screen.width-pnWidth)/2);
	var nTop=pnTop || Math.round((window.screen.height-pnHeight)/2)-40;	
	if (psName=="") psName=null;
	var oWindow=window.open(psURL,psName,"top="+nTop+",left="+nLeft+",height="+pnHeight+",width="+pnWidth+",status=no,toolbar=no,menubar=yes,location=no,scrollbars=yes,resizable=yes");
	oWindow.focus();
}
function openWindowWithToolbar(psURL,psName,pnWidth,pnHeight,pnTop,pnLeft){
	var nLeft=pnLeft || Math.round((window.screen.width-pnWidth)/2);
	var nTop=pnTop || Math.round((window.screen.height-pnHeight)/2)-40;	
	if (psName=="") psName=null;
	var oWindow=window.open(psURL,psName,"top="+nTop+",left="+nLeft+",height="+pnHeight+",width="+pnWidth+",status=no,toolbar=yes,menubar=no,location=no,scrollbars=yes,resizable=yes");
	oWindow.focus();
}
function openWindowX(psURL,psName,pnWidth,pnHeight,pnTop,pnLeft){
	var nLeft=pnLeft || Math.round((window.screen.width-pnWidth)/2);
	var nTop=pnTop || Math.round((window.screen.height-pnHeight)/2)-20;	
	if (psName=="") psName=null;
	var oWindow=window.open(psURL,psName,"top="+nTop+",left="+nLeft+",height="+pnHeight+",width="+pnWidth+",status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
	oWindow.focus();
}
								
function openWindow(psURL,psName,pnWidth,pnHeight,pnTop,pnLeft){
	var nLeft=pnLeft || Math.round((window.screen.width-pnWidth)/2);
	var nTop=pnTop || Math.round((window.screen.height-pnHeight)/2)-20;	
	if (psName=="") psName=null;
	var oWindow=window.open(psURL,psName,"top="+nTop+",left="+nLeft+",height="+pnHeight+",width="+pnWidth+",status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
	oWindow.focus();
}
function openWindowWithMenubarAndParams(psURL,psName,pnWidth,pnHeight,pnTop,pnLeft,psQstring){
	var nLeft=pnLeft || Math.round((window.screen.width-pnWidth)/2);
	var nTop=pnTop || Math.round((window.screen.height-pnHeight)/2)-40;	
	if (psName=="") psName=null;
	var psURLcomplete;
	psURLcomplete = psURL + "&" + psQstring;
	//alert(psURLcomplete)
	var oWindow=window.open(psURLcomplete,psName,"top="+nTop+",left="+nLeft+",height="+pnHeight+",width="+pnWidth+",status=no,toolbar=no,menubar=yes,location=no,scrollbars=yes");
	oWindow.focus();
}
function openCalendar(psObjTxt,pbIsChromeless){
	if (pbIsChromeless) fixed_chromeless_window("/calendar/calendar.asp?objTxt="+psObjTxt,"",232,212)
	else	openFixedWindow("/calendar/calendar.asp?objTxt="+psObjTxt,"",212,212);
}
function fixed_chromeless_window(psURL,psName,pnWidth,pnHeight,pnLeft,pnTop){
	var nLeft=pnLeft || Math.round((window.screen.width-pnWidth)/2);
	var nTop=pnTop || Math.round((window.screen.height-pnHeight)/2)-20;	
	if (psName=="") psName=null;
	var oNavigationWindow=window.open(psURL,psName,"scrollbars=0,fullscreen=0");
	window.focus();
	oNavigationWindow.resizeTo(pnWidth,pnHeight);
	oNavigationWindow.moveTo(nLeft,nTop);
	oNavigationWindow.focus();
}