// JavaScript Document clickbox.js

// script to make any div with class 'clickbox' all clickable - taking first link
window.onload = function(){
if (!document.getElementsByTagName) return false; //added to test the browsers DOM compatibility
if (!document.getElementsByTagName('div')) return false; //added to test for any divs
var divs = document.getElementsByTagName('div');
for(var i=0,j=divs.length;i<j;i++){
if (divs[i].className.match('clickbox')){ // added match to this line to deal with multiple class names
if (!divs[i].getElementsByTagName('a')[0]) continue; // added to ensure no errors if href is not present
divs[i].style.cursor = "pointer"; // added this line to change the cursor to a pointer if onclick is applied
divs[i].onclick = function (){
window.location = this.getElementsByTagName('a')[0].href;
			}
		}
	}
}
