function checkUserLoggedIn() {
	 xhReq = createXMLHttpRequest();
	 
	 // find out which minisite we are in!
        var sPath = window.location.pathname;
	var siteName = ""	    	      
	// depending on the page, either shown the mini-site boundaries or show the 
	// minisite data 
	 if (sPath.indexOf("Community") > 0)  {
	 	siteName="CommunityMaps";
	   }
	if (sPath.indexOf("Royal") > 0 ){
		siteName="Royal Docks Community Map";
	}
	if (sPath.indexOf("Hackney") > 0 ){
		siteName = "Hackney Wick Community Map";
	}
 
	 xhReq.open("GET", "isLoggedIn.php?siteName="+siteName, true);
	 xhReq.onreadystatechange = isLoggedIn;
	 xhReq.send(null);
}

function ManageTabPanelDisplay() {
//
// Between the parenthesis, list the id's of the div's that 
//     will be affected when tabs are clicked. List in any 
//     order. Put the id's in single quotes (apostrophes) 
//     and separate them with a comma -- all one line.
//

var idlist = new Array('tab1focus','tab2focus','tab3focus','tab4focus','tab1ready','tab2ready','tab3ready','tab4ready','content1','content2','content3','content4');

// check if the user is in data capture mode .. if so the tabs should not work
	if (startCapture == true) {
		if (confirm("Cancel the data capture process?  You will lose all your changes")) {
			startCapture == false;
			clearAllValues();
		}
		else {
			return;
		}
	}


	// No other customizations are necessary.
		if(arguments.length < 1) { 
			return; 
		}
		for(var i = 0; i < idlist.length; i++) {
		   var block = false;
		   for(var ii = 0; ii < arguments.length; ii++) {
		      if(idlist[i] == arguments[ii]) {
			 block = true;
			 break;
			 }
		   }
		   if(block) { 
			if (idlist[i].substring(0,4) == "cont") {
				document.getElementById(idlist[i]).style.display = "block";
			}
			else {
				document.getElementById(idlist[i]).style.display = "inline";
			}
		   }
		   else { 
			document.getElementById(idlist[i]).style.display = "none"; 
		   }
		} // for var i
			
			
	
	
	
}






