function tgStyleSwitch(event, anchor, id)
{
	var links = document.getElementsByTagName("link");
	
	if(id == null)
		id = anchor.getAttribute("id");

	for(i = 0;i < links.length; i++)
	{
		if((links[i].getAttribute("type") == "text/css") && links[i].getAttribute("title"))
		{
			if(links[i].getAttribute("title") == id)
			{
				if(links[i].getAttribute("rel") == "alternate")
					links[i].setAttribute("rel", "stylesheet");

				links[i].disabled = false;
				tgSetStyleCookie(links[i].getAttribute("title"));
			}
			else
			{
				links[i].disabled = true;
			}
		}
	}
	
	return false;
}

function tgSetStyleCookie(style)
{
	var date = new Date();
	date.setTime(date.getTime() + 365 * 24 * 60 * 60 * 1000);

	var curCookie = "style=" + escape(style) +
		"; expires=" + date.toGMTString() +
		"; path=/" +
		"; domain=.sinisterdevelopments.com;";
  document.cookie = curCookie;
}