
function openMaxWindow(url, appname)
		{
		var the_url = url; 
		var the_x = screen.availWidth;
		var the_y = screen.availHeight;

		// The attributes for our new window
		var the_fullscreen = "no";
		var the_toolbar = "no";
		var the_addressbar = "no";
		var the_directories = "no";
		var the_statusbar = "yes";
		var the_menubar = "no";
		var the_scrollbars = "yes";
		var the_do_resize =  "yes";
		var the_copy_history = "no";
		var browser_type = navigator.appName;

		// always place the window in the top left corner.
		top_pos = 0;
		left_pos = 0;

		// Check what browser we are as we need to change display size slightly to compensate
		// for irregularites between browsers.
		if (browser_type == "Microsoft Internet Explorer") 
		{ // IE Gives you the available space INCLUDING its frame, offset a little for its frame
		// otherwise you get some parts of the display offscreen!
			the_x -= 10;
			the_y -= 60;
		}
		else
		{ // Firefox is nice and gives you the correct information so no need to offset
		}
		
		// Open the Page
		if (window.outerWidth ){
			var option = "toolbar="+the_toolbar+",location="+the_addressbar+",directories="+the_directories+",status="+the_statusbar+",menubar="+the_menubar+",scrollbars="+the_scrollbars+",resizable="+the_do_resize+",outerWidth="+the_x+",outerHeight="+the_y+",copyhistory="+the_copy_history+",left="+left_pos+",top="+top_pos+",fullscreen="+the_fullscreen;
			site=open(the_url, appname, option);

			var Opera = (navigator.userAgent.indexOf('Opera') != -1);
			if(Opera){
				site.resizeTo(the_x,the_y);
				site.moveTo(0,0);
			}
		}
		else
		{
			var option = "toolbar="+the_toolbar+",location="+the_addressbar+",directories="+the_directories+",status="+the_statusbar+",menubar="+the_menubar+",scrollbars="+the_scrollbars+",resizable="+the_do_resize+",Width="+the_x+",Height="+the_y+",copyhistory="+the_copy_history+",left="+left_pos+",top="+top_pos+",fullscreen="+the_fullscreen;
			site=open('', appname, option);
			site.location=the_url;
			if(site.open){
				site.focus();return false;
			}
			site.resizeTo(the_x,the_y);
		}
	}

