function showTabContents(tabID) {
    if (document.getElementById && document.getElementsByTagName) {
        // get all of the tabs
        var theTab = document.getElementById(tabID);
        if (theTab) {
            theTab.style.display = "block";
        }
    }
}

function hideAllTabContents() {
	if (document.getElementById && document.getElementsByTagName) {
        // get all of the tabs
        var theTabBlock = document.getElementById('travelProfBlock');
        if (theTabBlock) {
            var theTabs = theTabBlock.getElementsByTagName('div');
			
            for (var i=0; i < theTabs.length; i++) {
				if (theTabs[i].className == "travelProfTabContents") {					
					theTabs[i].style.display = "none";
				}
			}

			// this is a total hack, because FF isn't resizing the overall body correctly - might be b/c of all the 100% crap we're using
			fixTableSize();
        }
    }
}

function fixTableSize() {
	if (document.getElementById) {
		var bodyTable = document.getElementById('bodyTable');
		if (bodyTable) {
			// doesn't seem to matter what this number is, so long as it's not bigger than the content
			bodyTable.style.height = "400px";
		}
		
		var mainTable = document.getElementById('mainTable');
		if (mainTable) {
			// doesn't seem to matter what this number is, so long as it's not bigger than the content
			mainTable.style.height = "400px";
		}		
	}
}


function swapBackgrounds(tabID) {
	if (document.getElementById && document.getElementsByTagName) {
        // get all of the tabs
        var theTabRow = document.getElementById('tabRow');
        if (theTabRow) {
            var theTabs = theTabRow.getElementsByTagName('div');
			
            for (var i=0; i < theTabs.length; i++) {
				// hide all "On" state divs 
				if (theTabs[i].className == "tableTabOn") {
					if (theTabs[i].id != (tabID+"On")) {	// don't hide the one we want
						theTabs[i].style.display = "none";
					}	
					else {	// it's the one we want, so show it
						theTabs[i].style.display = "block";
					}
				}
				else if (theTabs[i].className == "tableTab") {	// show the off states of tabs
					if (theTabs[i].id != tabID) {
						theTabs[i].style.display = "block";
					}
					else {
						theTabs[i].style.display = "none";
					}					
				}
			}
        }
    }		
}


function showLinkOn(element) {
	element.style.color = "#EA216F";
	element.style.textDecoration = "underline";
	element.style.cursor = "pointer";
}

function showLinkOff(element) {
	element.style.color = "#FFFFFF";
	element.style.textDecoration = "none";
	element.style.cursor = "default";
}

