Questa piccola funzione, completamente parametrizzata, permette di aprire una nuova finestra HTML.
function openNewWnd(sUrl,w,h,t,l,tbar,loc,stat,mbar,sbar,resiz,sCenter)
{
if (sUrl != '')
{
if (sCenter=='s'){
var l = (screen.width) ? (screen.width-width)/2 : 0;
var t = (screen.height) ? (screen.height-height)/2 : 0;
}
var sFeatures = '';
sFeatures = 'width='+w+',height='+h+',top='+t+',left='+l+',toolbar='+tbar+',
location='+loc+',directories=0,status='+stat+',menuBar='+mbar+',scrollBars='+sbar+',
resizable='+resiz;
var wnd =window.open(sUrl, '', sFeatures);
wnd.focus();
}
}