function changeFont(value) {
//create array of values used in the link
var size = new Array('s','m','l');
//create corresponding array of font-size values that match the above link values
var font = new Array('100\%','105\%','110\%');
//loop through the first array, looking for the match to the clicked link
//when found, check for which browser (IE uses a rules object, FF uses a cssRules object to store the stylesheet values) and change the body's font-size to the corresponding value
//Note that the index number of the body rule is 0. This makes things a little simpler by placing the body rule declaration FIRST in the stylesheet
for (i=0; i<size.length; i++) {
if(value == size[i]) {
if (document.styleSheets[0].rules) {
document.styleSheets[0].rules[0].style.fontSize=font[i];
}
else if(document.styleSheets[0].cssRules) {
document.styleSheets[0].cssRules[0].style.fontSize=font[i];
} else {
alert('This script does not work in your browser');
return;
}
}
}
}

