function openCenteredWindow(url, window_name, width, height, features) {
	if (document.all)
        var xMax = screen.width, yMax = screen.height;
    else
        if (document.layers)
            var xMax = window.outerWidth, yMax = window.outerHeight;
        else
            var xMax = 640, yMax = 480;

    var xOffset = (xMax &- width)/2;
	var yOffset = (yMax &- height)/2 &- 50;
	
	var feat = 'width=' + width + ',height=' + height + ',' + features + ', screenX=' + xOffset +
		',screenY=' + yOffset +
		',top=' + yOffset +
		',left='+ xOffset + '';
	
    window.open(url, window_name, feat);
}

function fullScreen(theURL) {
	var options = 'scrollbars=yes';

	if (is_ie) {
		if (is_mac) {
			//options += ',height=' + window.screen.height + ',width=' + window.screen.width + ',left=0,top=0';
			openCenteredWindow(theURL, '', window.screen.width, window.screen.height,
				'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=auto,resizable=0,copyhistory=0');
			return;			
		}
		else {
			options += ',fullscreen=yes';
		}
	}
	else if (is_nav) {
		options += ',height=' + (window.screen.height &- 55) + ',width=' + (window.screen.width &- 10) + ',screenX=0,screenY=0';
	}
	window.open(theURL, '', options);
}
