// Public function
// Set a cookie with the stylesheet chosen
// and refresh the screen
function changeStyle(stylesheetContrast/*,stylesheetFontsize*/,stylesheetFonstyle,stylesheetLineheight)
{
	createCookie("stylesheetContrast", stylesheetContrast, 365);
	/*createCookie("stylesheetFontsize", stylesheetFontsize, 365);*/
	createCookie("stylesheetFonstyle", stylesheetFonstyle, 365);
	createCookie("stylesheetLineheight", stylesheetLineheight, 365);
	window.top.location = window.top.location;
}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
		else expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function selectStyle(styleList, styleSheet) {
	if (!(styleSheet == "" || styleSheet == null)) {
		for (i = 0; i < styleList.length; i++) {
			if(styleList.options[i].value == styleSheet) {
				styleList.options[i].selected = "true";
			}
		}
	}
	return null;
}

