var msgwnd=null;
var hWnd_1 = null;
var hWnd_2 = null;
var hWnd_3 = null;

function ApriFinestra(Url,Larghezza,Altezza,Scroll) {

	var ie4 = (document.all)? true:false;

	if (Larghezza == ""){
		Larghezza = screen.width;
		Altezza   = screen.height - 60;
	}

	if ((ie4) && (top.hWnd)){
		top.hWnd.close();
	}
	top.hWnd = window.open(Url,"finestra","width="+Larghezza+",height="+Altezza+",left=0,top=0,screenX=0,screenY=0,resizable=yes,scrollbars="+Scroll);
}

function GetBrowser(){
		var style;
		var version=parseInt(navigator.appVersion.substring(0,1));
		if (version >= 4){
			if (navigator.appName == "Netscape" && version==4 ){
				return 'n';
			}
			else{
				return 'ie';
			}
		}
	}
	
function WriteCssFile(){
	if (GetBrowser() == 'ie'){
		document.write('<link rel=stylesheet type="text/css" href="/common/css/v19_style.css">');
	}
	else{
		document.write('<link rel=stylesheet type="text/css" href="/common/css/v19_style_n.css">');
	}
}
function WriteSecondPageCssFile(){
	if (GetBrowser() == 'ie'){
		document.write('<link rel=stylesheet type="text/css" href="../common/css/style_main.css">');
	}
	else{
		document.write('<link rel=stylesheet type="text/css" href="../common/css/style_main_n.css">');
	}
}
