function _detectVersion()
{ 
version = parseInt(navigator.appVersion);
return version; 
} 

function _detectOS()
{ 
if(navigator.userAgent.indexOf('Win') == -1) {
OS = 'Macintosh'; 
} else { 
OS = 'Windows'; 
} 
return OS; 
} 

function _detectBrowser()
{ 
if(navigator.appName.indexOf('Netscape') == -1) {
browser = 'IE'; 
} else { 
browser = 'Netscape';
} 
return browser; 
} 

function _FullScreen(lingua){

var adjWidth; 
var adjHeight; 

if((_detectOS() == 'Macintosh') && (_detectBrowser() == 'Netscape'))
{ 
adjWidth = 20; 
adjHeight = 35; 
} 
if((_detectOS() == 'Macintosh') && (_detectBrowser() == 'IE'))
{ 
adjWidth = 0; 
adjHeight = 0; 
} 
if((_detectOS() == 'Windows') && (_detectBrowser() == 'Netscape'))
{ 
adjWidth = 10; 
adjHeight = 50; 
} 
if((_detectOS() == 'Windows') && (_detectBrowser() == 'IE')) {
adjWidth = 0; 
adjHeight = 0; 
}
if(_detectVersion() < 4)
{ 
self.location.href = 'non4browsers.html';
} 
// _________________________________
// The following is the added bit which recognises the Mac IE browser
// and moves and resizes it to fit the whole screen you can play around
// with the numbers in the line: maciewindow.resizeTo(screen.width -
//10,screen.height - 45);
// which will change the size slightly
// __________________________________
if((_detectOS() == 'Macintosh') && (_detectBrowser() == 'IE'))
{
var maciewindow = window.open(lingua, 'popupwindow',
'_FullScreen=yes');
maciewindow.moveTo(0,0);
maciewindow.resizeTo(screen.width - 10,screen.height - 45);
}
else
{ 
var winWidth = screen.width - adjWidth;
var winHeight = screen.height - adjHeight;
var winSize = 'width=' + winWidth + ',height=' + winHeight;
var thewindow = window.open(lingua, 'popupwindow', winSize);
thewindow.moveTo(0,0);
} 


} 

function _MakeItSo(lingua){
if((_detectOS() == 'Windowsff') && (_detectBrowser() == 'IaaaE')) {
window.open(lingua,'popupwindow','_FullScreen=yes');
alert("si");
} else { 
_FullScreen(lingua);
} 
} 


function check_ris(lingua){
var altezza = window.screen.height;
var larghezza = window.screen.width;

if ((larghezza >= 1024) && (altezza >= 768))
{
_MakeItSo(lingua);
} else {
location.href = lingua;
}
}

function apri_fullscreen(url) {
    var larg_schermo = screen.availWidth - 10;
    var altez_schermo = screen.availHeight - 30;
    window.open("ss10/esterno.php?change_language=ITA&dochange=true", "finestrafull", "width=" + larg_schermo + ",height=" + altez_schermo + ",top=0,left=0");
}
function apri_fullscreen_eng(url) {
    var larg_schermo = screen.availWidth - 10;
    var altez_schermo = screen.availHeight - 30;
    window.open("ss10/esterno.php?change_language=ENG&dochange=true", "finestrafull", "width=" + larg_schermo + ",height=" + altez_schermo + ",top=0,left=0");
}

// --> 


