// --------------------------------------------------------------------------------
// csssetup.js
// Rob Brown 18-Nov-2008
// Reads CSSSwitch cookie, if set by Body Switchers script - and loads the appropriate css file upoon page load
// --------------------------------------------------------------------------------

function readCookie(name) {
	var ca = null;
	if (document.cookie && document.cookie.indexOf("CSSSwitch=") != -1) {
		ca = document.cookie.split("CSSSwitch=")[1].split(";")[0].split("&");
		var sizeParam = ca[0].split("=");
		var txtSize = sizeParam[1];
		
		if( txtSize != "" ) { return txtSize; }
	}
	return null;
}

var txtSetting = readCookie("CSSSwitch");
if( txtSetting == "" || txtSetting == undefined ) {
	txtSetting = "default";
}
document.write("<link id=\"css_switch_stylesheet\" rel=\"stylesheet\" type=\"text/css\" href=\"/english/css/css_switch_" + txtSetting + ".css\" />");