/**
 * Dynamic HTML Functions
 * Create By Alex Barker 01/14/2005
 *
 * The purpose of the script is to provide 
 * basic dhtml functions.
 */
function showDiv(sDivID) {
	var objCrossDom = getCrossDom(sDivID);
	
	//Make sure we got a valid object
	if (objCrossDom == null) {
		return false;
	}
	
	//Set the visiblity and height
	objCrossDom.style.display = "block";
}


function hideDiv(sDivID) {
	var objCrossDom = getCrossDom(sDivID);
	
	//Make sure we got a valid object
	if (objCrossDom == null) {
		return false;
	}
	
	//Set the visiblity and height
	objCrossDom.style.display = "none";
}


function isDivHidden(sDivID) {
	//return getCrossDom(sDivID).style.visibility == "hidden";
	return getCrossDom(sDivID).style.display == "none";
}

function getCrossDom(sBlockID) {
	var objCrossDom = null;
	
	//Get the correct dom for the sBlockID
	if (document.getElementById) {
		objCrossDom = document.getElementById(sBlockID);
	}
	else if (document.all) {
		objCrossDom = document.all[sBlockID];
	}
	else if (document.layers) {
		objCrossDom = document.layers[sBlockID];
	}
	
	return objCrossDom;
}

		function writeLayer(sID, sText) {
	if (document.getElementById) {
		document.getElementById(sID).innerHTML = sText;
	}
	else if (document.all) {
		document.all[sID].innerHTML = sText;
	}
}

function readLayer(sID) {
	var sReturn = "";
	
	if (document.getElementById) {
		sReturn = document.getElementById(sID).innerHTML;
	}
	else if (document.all) {
		sReturn = document.all[sID].innerHTML;
	}
}

function appendLayer(sID, sText) {
	if (document.getElementById) {
		document.getElementById(sID).innerHTML += sText;
	}
	else if (document.all) {
		document.all[sID].innerHTML += sText;
	}
}