var neofin=null;
var livescrwdt=screen.availwidth;
var livescrhgt=screen.availheight;
function opwind(url,nom,wdt,hgt) {
if ((wdt<=livescrwdt)&&(hgt<=livescrhgt)){
	neofin=window.open(url,nom,'width='+wdt+',height='+hgt+',toolbar=0');
	neofin.focus()
	}
	else {if ((wdt<=livescrwdt)&&(hgt>livescrhgt)){
	wdtt=Number(wdt)+17;
	neofin=window.open(url,nom,'width='+wdtt+',toolbar=0,scrollbars=1');
	neofin.focus()
		}	
		else {if ((wdt>livescrwdt)&&(hgt<=livescrhgt)){
	hgtt=Number(hgt)+17;
	neofin=window.open(url,nom,'height='+hgtt+',toolbar=0,scrollbars=1');
	neofin.focus()}
			else {
				neofin=window.open(url,nom,'toolbar=0,scrollbars=1');
				neofin.focus()
			}
		}	
	}
}