// JavaScript Document
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(win){

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 = 30; 
} 
if(detectVersion() < 4)
{ 
self.location.href = 'non4browsers.html';
} 
// _________________________________
// Ce qui suit est la partie suppl?ntaire qui reconnait le navigateur Mac IE
//  il r?uste la taille pour remplir tout l'?an, vous pouvez jouer avec les
// chiffres dans la ligne : 
// maciewindow.resizeTo(screen.width -10,screen.height - 45);
// ce qui modifiera sensiblement la taille.
// __________________________________
if((detectOS() == 'Macintosh') && (detectBrowser() == 'IE'))
{
var maciewindow = window.open(win, '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 + ',resizable=yes';
var thewindow = window.open(win, 'popupwindow', winSize);
thewindow.moveTo(0,0);
} 
} 

function MakeItSo( win ){
	//alert(win);
if((detectOS() == 'Windows') && (detectBrowser() == 'IE')) {
window.open(win,'popupwindow','fullscreen=yes, resizable=yes');
} else { 
onload=FullScreen(win);
} 
} 

function fermer() { 
  opener=self; 
  self.close(); 
}

