<!--
/****************************************************
     Author: Eric King
     Url: http://redrival.com/eak/index.shtml
     This script is free to use as long as this info is left in
     Featured on Dynamic Drive script library (http://www.dynamicdrive.com)
****************************************************/
function FullScreenPopup(mypage,myname,w,h,scroll,pos){
var win=null;
alert("im also here");
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}
// -->



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(demoPage){

var adjWidth; 
var adjHeight; 

 alert ("now im here");
if((detectOS() == 'Macintosh') && (detectBrowser() == 'Netscape'))
{ 
adjWidth = 20; 
adjHeight = 35; 
} 
if((detectOS() == 'Macintosh') && (detectBrowser() == 'IE'))
{ 
adjWidth = 0; 
adjHeight = 0; 
} 
if((detectOS() == 'Windows') && (detectBrowser() == 'Netscape'))
{ 
adjWidth = 30; 
adjHeight = 30; 
} 
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(demoPage, '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(demoPage, 'popupwindow', winSize);
thewindow.moveTo(0,0);
} 
} 

function LaunchDemo(theURL){
 alert ("im here");
// if((detectOS() == 'Windows') && (detectBrowser() == 'IE')) {
// alert ("luanching IE");
//window.open(theURL,'','fullscreen=yes, scrollbars=no');
//} else { 
FullScreen(theURL);
//} 
// alert ("im here");
} 

