if(!document.getElementById)
{
	if(document.all)
	{
		accessObj = function()
		{
			if(typeof document.all[arguments[0]]!="undefined")
				return document.all[arguments[0]];
			else
				return null;
		}
	}
	else if(document.layers)
	{
		accessObj = function()
		{
			if(typeof document[arguments[0]]!="undefined")
				return document[arguments[0]];
			else
				return null;
		}
	}
}
else
{
	accessObj = function()
	{
		return document.getElementById(arguments[0]);
	}
}

var ie6 = false;
var ie7 = false;

function bookmark()
{
		var url = self.location.href;
		var title = "Dot Digital Group advent calendar";

        if ($.browser.mozilla) {
                window.sidebar.addPanel(title, url, '');
        } else if(ie7 || ie6)
		{
			window.external.AddFavorite(url, title);
		}
		else if($.browser.safari){
			var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
			if(is_chrome)
			{
				alert('Please use CTRL + B, right click on the bar and add page');	
			}else
			{
				alert('Please click on the + next to the address bar to bookmark this page.');
			}
		}
		else 
		{
            alert('Please use CTRL + D to bookmark this website.');
        }

}

function sizetest()
{
	if($(window).width() < 960)
	{
		$("#footer").css("left", "0px");
		$("#footer").css("margin-left", "0px");
	}
	if($(window).width() > 960)
	{
		$("#footer").css("left", "50%");
		$("#footer").css("margin-left", "-480px");
	}
};