var cSection = null;
var cSubsection = null;

var pn = document.location.pathname.substr(1);
var splittedPath = pn.split("/");

cSection = splittedPath[0];
if (splittedPath.length == 3) { cSubsection = splittedPath[1]; }
if (splittedPath.length == 1) { cSection = 'home'; }


function chBg(o, s) {
	if (o.id != cSection) {
		o.style.background = 'url(/images/menubutton_background_'+s+'.gif)';
	}
}

function chSub(o, s) {
	o.style.backgroundColor = s;
}

function toggleMenu(o) {
	alert(o);
}

function goToUrl(u) {
	document.location.href = u;
}

menuBgImg = new Image();
menuBgImg.src = "/images/menubutton_background_on.gif";



function moment(){
window.setTimeout("clearIt()", 10)
}
function clearIt(){
window.status=" ";
} 
function longPopUp( page, width, height, top, left ) { 
	var yes		= 1; 
	var no		= 0; 
	var menubar     = no;  // The File, Edit, View Menus 
	var scrollbars  = no;  // Horizontal and vertical scrollbars 
	var locationbar = no;  // The location box with the site URL 
	var directories = no;  // the "What's New", "What Cool" links 
	var resizable   = no;  // Can the window be resized? 
	var statusbar   = no;  // Status bar (with "Document: Done") 
	var toolbar     = no;  // Back, Forward, Home, Stop toolbar 
	window.status=' ';
	features = "" + 
	  "width=" + width + "," + 
	  "height=" + height + "," + 
	  "top=" + top + "," + 
	  "left=" + left + ""; 
	  features += "" + 
	  (menubar ? ",menubars" : "") + 
	  (scrollbars ? ",scrollbars" : "") + 
	  (locationbar ? ",location" : "") + 
	  (directories ? ",directories" : "") + 
	    (resizable ? ",resizable" : "") + 
	  (statusbar ? ",status" : "") + 
	  (toolbar ? ",toolbar" : ""); 
 
	window.open( page, 'fullPopup', features );
}
function clearBox(me){
	me.value="";
}


		function displayAnswer(qid)
		{
			if( (qid.style.display == "") || (qid.style.display == "none") ) {
				qid.style.display = "block";
			}
			else {
				qid.style.display = "none";
			}
		}
	