addLoadEvent(prepareLinks);

function prepareLinks() {
	//checkpoints
	if (!document.getElementsByTagName) return false;
	if (!document.getElementsByTagName("a")) return false;
	
	//create array with all a tags
	var links = document.getElementsByTagName("a");
	//loop through array
	for (var i=0; i < links.length; i++) {
		//if link tag has class "links"
		if (links[i].className == "links") {
			//set action to when the link is clicked
			links[i].onclick = function() {
				var id = this.getAttribute("id");				

				showHide("div." +id);
				changeArrow(id);

				return false;
			}
		}
	}
}
