//	JavaScript for Dukinfield Golf Club
addLoadEvent(adjLogos);

function adjLogos() {
	if(!d.getElementsByTagName || !d.getElementById) return false;
	if(d.getElementById("sponsorlogos")) {
		var logocontainer = d.getElementById("sponsorlogos");
		var logos = logocontainer.getElementsByTagName("img");
		//	We have a list of all the images in the logo container
		var heightmax = 0;
		var thisheight = 0;
		//	Now find the tallest image
		for(var i = 0; i < logos.length; i++) {
			thisheight = logos[i].height;
			heightmax = thisheight > heightmax ? thisheight : heightmax;
		}
		//	Now adjust the bottom margin of each image to align vertically
		var bottommargin;
		for(i = 0; i < logos.length; i++) {
			thisheight = logos[i].height;
			bottommargin = logos[i].style.marginBottom;
			bottommargin += Math.floor((heightmax - thisheight)/2);
			logos[i].style.marginBottom = bottommargin + "px";
		}
	}
}