function swap(imgid, imgsrc) { 
   document.getElementById(imgid).src = imgsrc; 
}

function switchVis(el) {

//style="display:none;" must be added inside a tag (not by using class statement!), 
//otherwise JScript won't be able to check the condition below.

it = document.getElementById(el);
(it.style.display == "none") ? it.style.display="block" : it.style.display="none";

//display=none != visibility=hidden (first changes flow, second not)
}

function show_or_hide (cell_to_change_state_id, text_to_be_changed, show_text, hide_text) {
		var cell_to_change_state = document.all ? 
		    document.all[cell_to_change_state_id] : 
		    document.getElementById(cell_to_change_state_id);
		if (cell_to_change_state.style.display != "block") {
		    cell_to_change_state.style.display = "block";
		    document.getElementById(text_to_be_changed).innerHTML = hide_text;
		} else {
		    cell_to_change_state.style.display = "none";
		    document.getElementById(text_to_be_changed).innerHTML = show_text;
		}
}
