var header =
{
	maxStylesheets: 6,
	stylesheetFilename: "/stylesheets/header",
	
	init: function()
	{
		var headerCookie = document.cookie.match(/(^|;|; )header_stylesheet[^;]*(;|$)/);
		
		if (headerCookie != null)
		{
			var headerCookieValue = parseInt(unescape(headerCookie[0].split("=")[1]));
		}
		else
		{
			var headerCookieValue = 0;
		}
		
		var random = 0;
		
		while (random == 0 || random == headerCookieValue)
		{
			random = Math.ceil(Math.random() * header.maxStylesheets);
		}
		
		document.write('<link rel="stylesheet" type="text/css" href="' + header.stylesheetFilename + random + '.css" media="screen, projection" />');
		
		document.cookie = "header_stylesheet=" + random;
	}
};

header.init();

/*
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

try {
	//var pageTracker = _gat._getTracker("UA-8746883-1");
	//pageTracker._trackPageview();
	
	var pageTracker2 = _gat._getTracker("UA-8302717-1");
	pageTracker2._trackPageview();
} catch(err) {}
*/

	var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-8302717-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
  })();

