// return version number (e.g., 4.03)
function bVer() {
    return parseFloat(navigator.appVersion)
}
//Open an External Window
	function openWin(url, titlex, px) {
	var title =  new String(titlex);
	var p =  new String(px);
	if (title == "" || title == "undefined") title = "IMCA";
	if (p == "" || p == "undefined") p = "width=450,height=450,menubar=yes,scrollbars=yes,resizable=yes,status=no,location=no,toolbar=yes";
	if(bVer() >= 3) {	
		mywin=window.open(url,title,p);
		//Previene l'errore in apertura file OFFICE
		mySubfix = new String(url.substr(url.length-3,3));
		if (mySubfix.toUpperCase() != "DOC" && 
			mySubfix.toUpperCase() != "XLS" && 
			mySubfix.toUpperCase() != "MDB" && 
			mySubfix.toUpperCase() != "PPT")
			mywin.focus();						
    } 
 }
 