<!--
// Generic window opener for fullscreen
// Copyright 2004-2005 Stefan Thomson (stefan 'at' thomson.nu)
function tmFullScreenWindow(url){

	// Get browser version
	var strAppVersion = navigator.appVersion;
	var strAppName = navigator.appName;
	var bolWin = (strAppVersion.indexOf("Win")>=0)?1:0;
	var strBrowser = "";
	var intPos = strAppVersion.indexOf("MSIE",0); 

	// Open window with different properties depending on version

	// OS > Windows
	if(bolWin){
		// Browswers in Windows
		bolIE = (strAppName.indexOf("Microsoft")>=0)?1:0;
		bolIE5 = (strAppName == "Microsoft Internet Explorer" && parseInt(strAppVersion) >= 4)?1:0;
		bolXP = (parseInt(strAppVersion.indexOf("Windows NT 5.1"),0)>0)?1:0;
		bolIE6 = (parseInt(strAppVersion.slice(intPos+5,intPos+6))>=6)?1:0;
		if(bolIE){ //  Internet Explorer
			if(bolIE5){
				popWin = window.open(url,'fullWin','fullscreen=0,width='+(screen.availWidth-10)+',height='+screen.availHeight+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,left=0,top=0,screenX=0,screenY=0');
				popWin.focus();
			}else if(bolIE && !bolIE5){// Internet Explorer < 4
				popWin = window.open(url,'fullWin','width='+screen.availwidth+',height='+screen.availHeight+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,left=0,top=0,screenX=0,screenY=0',true);
			}
		}else if(strAppName.indexOf("Netscape")>=0){ // Netscape Navigator
			popWin = window.open('','fullWin','scrollbars=0,resizable=0,outerWidth='+screen.availWidth+',outerHeight='+screen.availHeight+',top=p,left=0,fullscreen=yes');
			popWin.moveBy(0,-10);
			popWin.location.href=url;
		}else{// Other windows browser
			popWin = window.open(url,'fullWin','fullscreen=1,width='+screen.availWidth+',height='+screen.availHeight+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
			popWin.resizeTo(Math.ceil(screen.availWidth+3),Math.ceil(screen.availWidth+1));
			popWin.moveTo(0,0);
			popWin.focus();
		}
	}else if(strAppVersion.indexOf("Mac")>=0){ // Mac OS
		if(strAppVersion.indexOf("Safari")>=0){ // Safari
			popWin = window.open("","full","scrollbars=0,resizable=0,width=" + (screen.availWidth) +",height=" + (screen.availHeight-20));
			popWin.moveTo(0,0);
			popWin.location.href=url;
			popWin.focus();
		}else{ // Other browsers
			if(strAppName.indexOf("Microsoft")>=0){ // IE
				popWin = window.open(url,"full","alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=1,directories=0,fullscreen=1,hotkeys=1,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,z-lock=0,screenX=0,screeny=0,left=0,top=0");
				popWin.resizeTo(screen.availWidth,screen.availHeight);
				popWin.focus();
			}else if(strAppName.indexOf("Netscape")>=0){ // Netscape
				popWin = window.open("","full","scrollbars=0,resizable=0,width=" + (screen.availWidth-12) +",height=" + (screen.availHeight-30));
				popWin.moveTo(0,0);
				popWin.location.href=url;
				popWin.focus();			
			}else{ // Other mac browser
				popWin = window.open(url,'fullWin','fullscreen=1,width='+screen.availWidth+',height='+screen.availHeight+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
				popWin.resizeTo(Math.ceil(screen.availWidth+3),Math.ceil(screen.availWidth+1));
				popWin.moveTo(0,0);
				popWin.focus();
			}
		}
	}
}