//funzione per il resize dello scermo
function centerResize() {
    var main = $('#main');
    var clientHeight = $(window).height();
    var clientWidth = $(window).width(); ;
    main.css("top", ((clientHeight / 2) - (main.height() / 2) + 'px'));
    main.css("left", ((clientWidth / 2) - (main.width() / 2) + 'px'));
}
function setFlashContent() {
    var flash = $('#myFlashContent');
    var clientHeight = $(window).height();
    var clientWidth = $(window).width();
    
    if (clientHeight >= 562){
        flash.height(clientHeight);
    }else{
        flash.height(562);
    }

    if (clientWidth >= 960) {
        flash.width(clientWidth);
    } else {
        flash.width(1003);
    }
}

/****************************************************************
*   Funzioni utente modificabili                                *
****************************************************************/
//
//apertura PopUp a tutto schermo
function openFullWindow(lang) {
	var w = screen.width;
	var h = screen.height;

	LeftPosition = 0;
	TopPosition = 0;
	
	if (h<800)
	{
		var windowprops = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+w+',height='+h+',left='+LeftPosition+', top='+TopPosition+',screenX='+LeftPosition+',screenY='+TopPosition+'';
	} else
	{
		var windowprops = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+w+',height='+h+',left='+LeftPosition+', top='+TopPosition+',screenX='+LeftPosition+',screenY='+TopPosition+'';
	}
	
	var $ApplicationName$ = window.open('default.aspx?lang='+lang,'$ApplicationName$',windowprops);
	$ApplicationName$.moveTo(LeftPosition,TopPosition)
	$ApplicationName$.resizeTo(w,h);
	$ApplicationName$.focus();
}
