var feature;
var testing = false;
function cpms__initFeature() {
	feature = document.getElementById("Feature");
	var nextFeature = document.getElementById("nextFeature").childNodes[0];
	
	var oldHref = nextFeature.href;
	nextFeature.onclick = function(){ cpms__getNextFeature(oldHref+'?page=0'); return false; };
}
byu__registerOnLoadHandler(cpms__initFeature);

function cpms__newFeature(featureEscapedString) {
	var newFeatureContent = unescape(featureEscapedString).replace(/[\+]/g, " ");
	if (newFeatureContent == null) return;
	
	feature.innerHTML = newFeatureContent;

	var nextFeature = document.getElementById("nextFeature").childNodes[0];
	
	var oldHref = nextFeature.href;
	nextFeature.onclick = function(){ cpms__getNextFeature(oldHref); return false; };
}

function cpms__getNextFeature(fullUrl) {
	
	var request = fullUrl + '&js=1';

	if (testing) alert(request);

	var aObj = new byu__ScriptRequest(request);
	aObj.buildScriptTag();
	aObj.addScriptTag();
}