function gatherArchiveDates(newVal){
	var archiveId = document.pressReleases.archivedDates.value;
	var newArchiveId = archiveId + newVal + "|";
	document.pressReleases.archivedDates.value = newArchiveId;
}
function getTotalPrCount(countNum){
	document.pressReleases.totalPrs.value = countNum;
	document.getElementById("currentPr").style.color = "#cccccc";
	document.getElementById("archivePr").style.color = "#0068b3";	
}
function showArchive(){
	var archiveIds = document.pressReleases.archivedDates.value;
	var totalPrs = document.pressReleases.totalPrs.value;
	var archive_array = archiveIds.split("|");

	for(z=1;z<=totalPrs;z=z+1){
		document.getElementById("prId" + z).style.display = 'none';
	}
	for(y=0;y<=archive_array.length;y=y+1){
		if(document.getElementById("prId" + archive_array[y])){
			document.getElementById("prId" + archive_array[y]).style.display = 'block';
		}
	}
	document.getElementById("currentPr").style.color = "#0068b3";
	document.getElementById("archivePr").style.color = "#cccccc";
}
function showCurrent(){
	var archiveIds = document.pressReleases.archivedDates.value;
	var totalPrs = document.pressReleases.totalPrs.value;
	var archive_array = archiveIds.split("|");

	for(z=1;z<=totalPrs;z=z+1){
		document.getElementById("prId" + z).style.display = 'block';
	}
	for(y=0;y<=archive_array.length;y=y+1){
		if(document.getElementById("prId" + archive_array[y])){
			document.getElementById("prId" + archive_array[y]).style.display = 'none';
		}
	}
	document.getElementById("currentPr").style.color = "#cccccc";
	document.getElementById("archivePr").style.color = "#0068b3";
}

