// activeCSS: Set the active stylesheet

function activeCSS(title)
{
	var i, oneLink;
	
	for (i = 0; (oneLink = document.getElementsByTagName('link')[i]); i++)
	{
		if (oneLink.getAttribute('title') && findWord('stylesheet', oneLink.getAttribute('rel')))
		{
			oneLink.disabled = true;
			if (oneLink.getAttribute('title') == title)
			{
				oneLink.disabled = false;
			}
		}
	}
}

// findWord: Used to find a full word (needle) in a string (haystack)

function findWord(needle, haystack)
{
	return haystack.match(needle + '\\b');
}