/*
 ** changeStyleSheet(cssSelector,styleElement,newValue)
 **
 ** Arguments:
 **   cssSelector      selector from stylesheet, eg #main   NOTE: Stylesheet rule must START with this text. No check is done on remainder of text.
 **   styleElement    which style element to change. NOTE: This is a javascript (eg camelCase) name. Eg use "fontSize" NOT "font-size" or "fontsize" !!!
 **   newValue         the new value
 **
 ** Example:
 ** changeStyleSheet("div#main", "fontSize", "8px");
 */
function changeStyleSheet(cssSelector, styleElement, newValue) {
	if (!document.styleSheets || !cssSelector || !styleElement ) { return; }
	var theRules = new Array();
	if (document.styleSheets[0].cssRules) {
		theRules = document.styleSheets[0].cssRules
	} else if (document.styleSheets[0].rules) {
		theRules = document.styleSheets[0].rules
	} else {
		return;
	}
	for(var r in theRules) {
		if ( theRules[r].selectorText ) { // Used cssText previously,  but didn't work in IE7
			var tgtIdx = theRules[r].selectorText.indexOf(cssSelector);
			if (tgtIdx != -1 && tgtIdx == 0) { // cssSelector must start with the given text
				eval("theRules[r].style."+styleElement+" = newValue;");
				// theRules[r].style.fontSize = newValue;
				// Footer positioneren			
				setFooter();
				return;
			}
		}
	}


}

