/* script for button rollover effect */
function changeColor(name){
/*ICS start*/
/*org	document.getElementsByName(name)[0].style.background = "#FFFFC9";*/
	document.getElementsByName(name)[0].style.backgroundImage="url(images/form_button_over.gif)";
/*ICS end*/
}
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 {
/*ICS start*/
/*org		document.getElementsByName(name)[0].style.background = "#99CCFF";*/
		document.getElementsByName(name)[0].style.backgroundImage="url(images/form_button.gif)";
/*ICS end*/
	}
}
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 {
/*ICS start*/
/*org		obj.style.background = "#FFE7E7";*/
		obj.style.backgroundImage="url(images/form_button.gif)";
/*ICS end*/
	}
}
function changeColor2(obj){
/*ICS start*/
/*org	obj.style.background = "#FFFFC9";*/
	obj.style.backgroundImage="url(images/form_button_over.gif)";
/*ICS end*/
}
function resumeColor2(obj){
	var colorType = document.forms['header:colorStyleForm'].elements['hdnColorStyle'].value;
	if (colorType == 'color-red.css') {
		obj.style.background = "#FFCCB3";
	} else {
		/* obj.style.background = "#99CCFF"; */
		obj.style.backgroundImage="url(images/form_button.gif)";
	}
}
/* 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;
    }
  }
}
