// If the browser supports it, attach a javascript to change the stylesheet.

function prepareStyleSwitch()
{
	if ( document.getElementById && document.getElementsByTagName )
	{
		if ( document.getElementById( 'styleswitch' ) )
		{
			document.getElementById( 'styleswitch' ).style.display = 'block';
			var styles = document.getElementById( 'styleswitch' );
			var links = styles.getElementsByTagName( 'a' );

			for (var i = 0; i < links.length; i++)
			{
				if ( links[i].title )
				{
					links[i].onclick = function()
					{
						setActiveStyleSheet(this.title);
						return false;
					}
				}
			}
		}
	}
}