// Identifico la piattaforma dell'utente
if(navigator.userAgent.indexOf('Win') == -1) {
OS = 'Macintosh';
} else {
OS = 'Windows';

// Identifico il sistema operativo dell'utente
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;		// true if we're on ie
var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false; // true if we're on windows

// Funzione di fullscreen per PC-Explorer
function fullscreen(page)
{
    window.open( page , "" , "fullscreen=1 ,scrollbars = 0" );
    return;
}

// Funzione fullscreen per Netscape per PC e Mac
function openFullscreen(page) 
{
var yes = 1;
var no = 0;

var menubar = no;      // The File, Edit, View Menus
var scrollbars = no;   // Horizontal and vertical scrollbars
var locationbar = no;  // The location box with the site URL
var directories = no;  // the "What's New", "What Cool" links
var resizable = no;    // Can the window be resized?
var statusbar = no;    // Status bar (with "Document: Done")
var toolbar = no;      // Back, Forward, Home, Stop toolbar

windowprops = "width=" + (screen.width-10) + ",height=" + (screen.height-30) + ",top=0,left=0";

windowprops += (menubar ? ",menubar" : "") +
(scrollbars ? ",scrollbars" : "") +
(locationbar ? ",location" : "") +
(directories ? ",directories" : "") +
(resizable ? ",resizable" : "") +
(statusbar ? ",status" : "") +
(toolbar ? ",toolbar" : "");

window.open(page, 'fullPopup', windowprops);
}

// Detection del plug-in
function detectFlash()
{	
	if (isIE == true) 
		  {							
			if(OS == 'Windows') 
			{					
				//alert("IE and Win");
				fullscreen(flashPage);
				window.location.replace(saluti);	
			} 
			else if(OS == 'Macintosh')
			{
				//alert("IE and Mac");
				fullscreen(flashPage);
				window.location.replace(saluti);
			}
	      }
	    else 
    	  { 		  							
			if(OS == 'Windows') 
			{					
				//alert("Net and Win");
				window.location.replace(saluti);
				openFullscreen(flashPage);
			} 
			else if(OS == 'Macintosh')
			{
				//alert("Net and Mac");
				openFullscreen(flashPage);	
                window.location.href(saluti);	
			}
	     }		
	  }
   }
