// apre una finestra popup
//
// addr			l'indirizzo del documento che dovra' contenere
// props		la stringa con le proprieta' (almeno width ed height, separate da virgole)
function apri(addr, props)
{
	var IE = navigator.appName.indexOf("Microsoft") != -1;
	
	var tmp = props;
	tmp.toLowerCase();
	tmp.replace(" ", "");
	start = tmp.search("width");
	var width = tmp.substr(start + 6);
	end = width.search(",");
	if (end != -1)
	{
		width = width.substr(0, end); 
	}
	
	tmp = props;
	tmp.toLowerCase();
	tmp.replace(" ", "");
	start = tmp.search("height");
	var height = tmp.substr(start + 7);
	end = height.search(",");
	if (end != -1)
	{
		height = height.substr(0, end); 
	}		
									
	if (IE)
	{
		try
		{
			newwin.window.resizeTo(width, height);
				
			newwin.location.replace(addr);
		}
		catch (e)
		{
			newwin=window.open("", "NewWin");
			newwin.close();
			newwin=window.open(addr, "NewWin", props,"resizeable=no");
		}
	}
	else
	{
		newwin=window.open(addr, "NewWin", props,"resizeable=no");
		newwin.window.resizeTo(width, height);
	}
	
	newwin.focus();	
}
