function addEv(ev, fc, obj) {
	if (obj.addEventListener) {
		obj.addEventListener(ev, fc, false);
		return;
	}
	
	eval("obj.on"+ev+" = fc");
}

function toggleIns() {
	var Checks = document.getElementById('insurancelist').getElementsByTagName('input');
	for (var i=0;i<Checks.length;i++) {
		if (Checks[i].id != 'other' && Checks[i].id != 'othertext') {
			if (Checks[i].checked) {
				document.getElementById(Checks[i].id+'w').style.display = 'block';
				document.getElementById('allsubmit').style.display = 'block';
			} else
				document.getElementById(Checks[i].id+'w').style.display = 'none';
		}
	}
}

window.onload = function () {
	
	var Insurances = new Array('liability','disability','busdisab','life','property','compensation','longterm','health','employee');
	var showButton = document.getElementById('showsections');
	addEv('click', toggleIns, showButton);

}