// JavaScript Document
function get_cookie () {
  var results = document.cookie.match ( '(^|;) ?' + 'current_stylesheet' + '=([^;]*)(;|$)' );
  if ( results ) {
    return ( unescape ( results[2] ) );
 } else {
    return null;
	}
 }

 var theStylesheet=document.getElementById('stylesheet');
 
 if (get_cookie()){
 	 theStylesheet.setAttribute('href', get_cookie());
 }
  
 window.onload=init;
 
 function init(){ 
	var theme0=document.getElementById('theme0');
		theme0.onmousedown = function(){
		document.cookie = 
		'current_stylesheet=0.css; expires= 01 Jan 3008 17:22:00 UTC; path=/';
 		theStylesheet.setAttribute('href', '0.css');
		} 	
	var theme1=document.getElementById('theme1');
		theme1.onmousedown = function(){
		document.cookie = 
		'current_stylesheet=1.css; expires= 01 Jan 3008 17:22:00 UTC; path=/';
 		theStylesheet.setAttribute('href', '1.css');
		} 	
	var theme2=document.getElementById('theme2');
		theme2.onmousedown = function(){
		document.cookie = 
		'current_stylesheet=2.css; expires= 01 Jan 3008 17:22:00 UTC; path=/';
 		theStylesheet.setAttribute('href', '2.css');
		}
	}