

var sectionColors = new Array(	["tv", "#d0103a"],
								["sat", "#6eb7e4"],
								["int", "#ffb612"],
								["tel", "#ccdc00"],
								["dtv", "#d0103a"]
								);


function changeOptionColors(input, section, option, isRadio) {
	if (document.getElementById) {
		var color = ""
		
		for (var i=0; i<sectionColors.length; i++) {
			if (sectionColors[i][0] == section) {
				color = sectionColors[i][1]
				break
			}
		}
		if (input.checked) {
			document.getElementById(option + "_header").style.color = color
			document.getElementById(option + "_monthlym").style.color = color
			document.getElementById(option + "_setupm").style.color = color
		} else {
			document.getElementById(option + "_header").style.color = ""
			document.getElementById(option + "_monthlym").style.color = ""
			document.getElementById(option + "_setupm").style.color = ""
		}
	}
}

function changeRadioOptionColors(radio, index) {
	for (var i = 0; i < radio.form[radio.name].length; i++) {
		var r = radio.form[radio.name][i]
		if (r.checked) {
			r.parentNode.parentNode.className = "highlighted"
		} else {
			r.parentNode.parentNode.className = ""
		}
	}
}

function checkCheckBoxes() {
	if (document.getElementsByTagName) {
		var inputs = document.getElementsByTagName('INPUT')
		for (var i=0; i<inputs.length; i++ ) {
			if (inputs[i].type == 'checkbox' || inputs[i].type == 'radio') {
				inputs[i].onclick()
			}
		}
	}
}

function changeCheckboxOptionColors(checkbox) {

	if (checkbox.checked) {
		checkbox.parentNode.parentNode.className = "highlighted"
	} else {
		checkbox.parentNode.parentNode.className = ""
	}
	
}

function changeArrowOptionColors(checkbox,trname) {
	
	var tr = document.getElementById(trname)

	if (checkbox.checked) {
		tr.className = "highlighted"
	} else {
		tr.className = ""
	}
	
}