var ss;
function accyloader() {
	ss = document.styleSheets[0];
	$$('#accytable .accylrow .c2').each(function(td) {
		td.addEvent('click', function() {
			td.getParent().setStyle('display', 'none');
			if (ss.insertRule) {
				ss.insertRule("#accytable ." + td.id + " { display: table-row }", 0); // Mozilla
			} else if (ss.addRule) {
				ss.addRule("#accytable ." + td.id, "display: block", 0); // IE
			} else {
				if (window.ie) $$('#accytable .' + td.id).setStyle('display', 'block');
				else $$('#accytable .' + td.id).setStyle('display', 'table-row');
			}
		});
		$('c'+td.id).addEvent('click', function() {
			if (window.ie) td.getParent().setStyle('display', 'block');
			else td.getParent().setStyle('display', 'table-row');
			if (ss.deleteRule) {
				ss.deleteRule(0); // Mozilla
			} else if (ss.removeRule) {
				ss.removeRule(0); // IE
			} else {
				$$('#accytable .' + td.id).setStyle('display', 'none');
			}
		});
	});	
	
	$$('#accytable td.c2 h3').each(function(el) {
		var text = el.innerHTML;
		
		if(text == 'WIRELESS FOOT CONTROL AND 14 PIN RECEIVER')
		{
			el.innerHTML = '<a href="/wireless/foot.php">' + text + '</a>';
		}
		
		if(text == 'WIRELESS HAND CONTROL AND 14 PIN RECEIVER')
		{
			el.innerHTML = '<a href="/wireless/hand.php">' + text + '</a>';
		}
		
	});
}
window.addEvent('load', accyloader);
