function styleOnLoad()
{
    var style = getCookie("style");
	//alert('styleOnLoad: ' + style);
    if(style) {
        switchStyle(style);
    }
}

function switchStyle( style )
{
    var link = document.getElementById("style");
    var oldStyle = getCookie("style");    
	//alert("switchStyle: " + link.href);
	
    if( style == oldStyle ){       
    }
    if( style == "text" ){        
        document.getElementById("style").href="css/default_plainText.css";
    }
    else{
        document.getElementById("style").href="css/default.css";
    }
    setCookie("style",style);   
    //alert("switchStyle: " + document.getElementById("style").href);     
}