Browser = {
	safariFix: false,
	widState: true,
	xGetElementById: function(e)
	{
		/* xGetElementById, Copyright 2001-2005 Michael Foster (Cross-Browser.com)
		 * Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL
		 */
		if(typeof(e)!='string') return e;
		if(document.getElementById) e=document.getElementById(e);
		else if(document.all) e=document.all[e];
		else e=null;
		return e;
	},
	redraw: function()
	{
		if(Browser.safariFix==true){
			if(Browser.widState == true){
				Browser.widState = false;
				window.innerWidth -= 1;
			}else{
				Browser.widState = true;
				window.innerWidth += 1;
			}
		}
	},
	centrePop: function(mypage, myname, w, h, scroll, alternative)
	{
		var alt = (alternative) ? alternative : mypage;
		window.opener = self;
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
		var Macintosh = navigator.userAgent.indexOf('Mac')>0 && navigator.userAgent.indexOf('MSIE')>0;
		winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no,status=no';
		win = window.open(mypage, myname, winprops);
		if(!win && alternative == "null"){
			return "false";
		}else if(!win && alternative != "null"){
			function check(win){
				if(!win) document.location.href = alt;
			}
			setTimeout(check, 300, win, alt);
		} else if(alternative != "null"){
			if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
		}
		//return "true";
	},
	setup: function()
	{
		var detect = navigator.userAgent.toLowerCase();
		var place = detect.indexOf("safari")+1;
		if(place>0) Browser.safariFix = true;
	}	
}