//	Author: Gavin Orland, Gear Ltd (Contact: www.gear-design.com)

function openFullScreen(winId,url,resizable,chrome) {

	/**********************************
	SET DEFAULTS
	**********************************/

	//	note: must use 'typeof' to check undefined AND use string for "undefined" for mac ie	
	if(typeof(winId) == "undefined") winId = "siteWin";
	if(typeof(url) == "undefined") url = "about:blank";
	if(typeof(resizable) == "undefined") resizable = 1;
	if(typeof(chrome) == "undefined") chrome = true;
	if(!chrome) if (resizable) resizable = 0;
	
	
	/**********************************
	GET BROWSER
	**********************************/
	//	note: Apple's Safari identifies itself as 'Netscape'	
	navigator.userAgent.indexOf('Win') != -1 ? platform='windows' : platform = 'mac';
	navigator.appName.indexOf('Netscape') == -1 ? browser = 'ie' : browser = 'netscape';


	/**********************************
	SET WINDOW SIZE
	**********************************/
	var w = window.screen.width;
	var h = window.screen.height;

	//	amend specifically for mac and netscape - routine will default to settings winIdeal for windows ie
	if (platform == "mac"){
		
		if(browser == "netscape"){
			h+=54;
		}
		
	} else {
		
		if(browser == "netscape"){
			h-=30;
		} else {
			h-=28;w+=1;
		}
		
	}		
	
	/**********************************
	SET CHROME
	**********************************/
	var props = "width="+w+",height="+h+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable="+resizable;
	if(chrome != 1) props += ",fullscreen=1";
	
	
	/**********************************
	OPEN WINDOW
	**********************************/
	window[winId] = window.open(url,winId,props);
	window[winId].focus();
	
	
	/**********************************
	CATER FOR MAC IE
	**********************************/
	window[winId].moveTo(0,0);
	window[winId].resizeTo(w,h);
	
	
}