/* script for button rollover effect */
function changeColor(name){
	document.getElementsByName(name)[0].style.background = "#FFFFC9";
}
function resumeColor(name){
	var colorType = document.forms['header:colorStyleForm'].elements['hdnColorStyle'].value;
	if (colorType == 'color-red.css') {
		document.getElementsByName(name)[0].style.background = "#FFCCB3";
	} else if (colorType == 'color-green.css') {
		document.getElementsByName(name)[0].style.background = "#CCFFB3";
    } else {
		document.getElementsByName(name)[0].style.background = "#99CCFF";
	}
}
function resumeSmallBtnColor(name){
	document.getElementsByName(name)[0].style.background = "#FFE7E7";
}
function resumeSmallBtnColor2(obj){
	var colorType = document.forms['header:colorStyleForm'].elements['hdnColorStyle'].value;
	if (colorType == 'color-red.css') {
		obj.style.background = "#F0F0FF"
	} else if (colorType == 'color-green.css') {
		obj.style.background = "#CCFFB3";
 	} else {
		obj.style.background = "#FFE7E7";
	}
}
function changeColor2(obj){
	obj.style.background = "#FFFFC9";
}
function resumeColor2(obj){
	var colorType = document.forms['header:colorStyleForm'].elements['hdnColorStyle'].value;
	if (colorType == 'color-red.css') {
		obj.style.background = "#FFCCB3";
 	} else if (colorType == 'color-green.css') {
		obj.style.background = "#CCFFB3";
	} else {
		obj.style.background = "#99CCFF";
	}
}
/* script for font size change */
function setCharStyle(charStyle){
	setActiveStyleSheet(charStyle);
	CharSizeUpdater.updateCharSize(charStyle);
}
function setActiveStyleSheet(charStyle) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == charStyle) a.disabled = false;
    }
  }
}
