// Hide or show our partners text, and update our logo rollover status
function showPartnerText(textDiv,requestingDiv) {
  var tds = document.getElementsByTagName("td");
	// Find all of our divs in the third table column, to hide any of them except for the one we want to show
  for (var i=0; i<tds.length; i++ ) {
    if (tds[i].className.indexOf("thirdcolumn") == -1) continue;
		var divs = tds[i].getElementsByTagName("div");
		for (var j=0; j<divs.length; j++ ) {
    	if (divs[j].getAttribute("id") != textDiv) {
      	divs[j].style.display = "none";
    	} else {
      	divs[j].style.display = "block";
    	}
			// Make sure the bottom wrapper graphic is really at the bottom (it will lose position sometimes during our changes)
			if (document.getElementById("insidewrapperwide")) {
				var wrappernode = document.getElementById("insidewrapperwide");
				var newnode = document.createElement("div");
						newnode.className = "bottom";
				var possibledivs = wrappernode.getElementsByTagName("div");
				for (var k=0; k<possibledivs.length; k++) {
  				if (possibledivs[k].getAttribute("class") == "bottom" || possibledivs[k].getAttribute("className") == "bottom" ) {
  		  		wrappernode.replaceChild(newnode, possibledivs[k]);
  				}
				}
			}							
		}
  }
	// Find our logo divs and hide the rollover state except for the one we are on
	for (var i=0; i<tds.length; i++ ) {
		if (tds[i].className.indexOf("firstcolumn") || tds[i].className.indexOf("secondcolumn")) {
			var divs = tds[i].getElementsByTagName("div");
			for (var j=0; j<divs.length; j++ ) {
				if (divs[j] != requestingDiv) {
					divs[j].style.backgroundPosition = "800px center";
				} else {
					requestingDiv.style.backgroundPosition = "0 center";
				}
			}
		}
	}
}
