//var theURL ="http://"+window.location.host+"/version4/includes";


function processedNews() {
   if (xhReq.readyState != 4)  {
   		return;
   	}
	var result = xhReq.responseText;
	alert(result);
	
	
	// now go back to the news page that the user came from ..
	minisitename = getMinisiteName();
	redirectPage();
	/*if (minisitename == "" || minisitename == "communitymaps") {
		// this is the community maps page
		//window.location = theURL+"/CommunityMaps.php";
		window.location = getURL()+ "CommunityMaps.php";
	}
	else {
		//window.location = theURL+"/communityNews.php?minisitename="+minisitename;
		window.location = getURL()+"includes/communityNews.php?minisitename="+minisitename;
	}*/

	
	
}



function newsCheckData() {
   if (xhReq.readyState != 4)  {
   		return;
   	}
	var result = xhReq.responseText;
	var htmlscript = result.split("|XX|");
	var headID = document.getElementsByTagName("head")[0];
	var newScript = document.createElement('script');
	newScript.type = 'text/javascript';

	newScript.text = htmlscript[1];
	headID.appendChild(newScript);
	document.getElementById('communitynews').innerHTML = htmlscript[0];
}		
