/* Filename:		header.js
 *
 * Description:		Functions used to deal with session ID
*/


function getSessionID() {
	//return(1);
	if (document.cookie.length == 0)
		return(null);

	var key = "sessionID=";

	// Extract the session key
	var start, end;
	start = document.cookie.indexOf(key);
	if (start == -1) return(null);

	// Return the value
	start += key.length;
	end = document.cookie.indexOf(";", start);
	if (end == -1) end = document.cookie.length;
	return(document.cookie.substring(start, end));
}


function setSessionID() {
	document.cookie = "sessionID=1";
	return;
}


function hideNavBar()
{
	if (getSessionID() == null) return;

	var id = document.getElementById("home");
	if (id != null) {
		// Hide the url
		id.style.display = "none";
	}
	return;
}


