///////////////////////////////////////////////////////////////////
/*
openPopup.js
Apertura finestra popup
Pierlorenzo, 22 Maggio 2005
© pierlorenzo@doweb.it
*/
///////////////////////////////////////////////////////////////////
function openPopup( url, center, nameWin, wWin, hWin, tWin, lWin, sbWin ) { 

	if( nameWin == null ) nameWin = "winpopup"; 

	if( wWin == null ) wWin = "500"; 
	if( hWin == null ) hWin = "300"; 
 
	if( lWin == null ) lWin = "62"; 
	if( tWin == null ) tWin = "62"; 

	if( center == "C" ) {
		lWin = parseInt((screen.availWidth - wWin)/2);
		tWin = parseInt((screen.availHeight - hWin)/2);
	}

	if( sbWin == null ) sbWin = "no"; 
 
	parWin  = ""; 
	parWin += "resizable=1,titlebar=0,menubar=0,"; 
	parWin += "toolbar=0,location=0,directories=0,status=0,"; 
	parWin += "scrollbars=" + sbWin + ","; 
	parWin += "width=" + wWin + ","; 
	parWin += "height=" + hWin + ","; 
	parWin += "top=" + tWin + ","; 
	parWin += "left=" + lWin; 
 
	window.open( url, nameWin, parWin ); 
} 
