var navItem;
var showTest = false;

/* DO NOT EDIT ABOVE THIS LINE 
Edit Testimonials below.  Follow format in existing entries 
NOTES: Single quotes must be escaped. For example, if you want the text to be "That's Great!" from source "Mike O'Connor", you will need to enter it below as: 
    testimonials[1] = ['Mike O\'Connor', 'That\'s Great!'];
*/
var tCore = new Array();
tCore[0] = ['Robert Maccarone, State Director of NYS Division of Probation and Correctional Alternatives', 'Through our work with Northpointe, New York State has implemented the customized COMPAS risk and need assessment instrument throughout our probation departments. Probation practitioners now have the tools to identify a persons\' criminogenic needs and develop more effective case plans that will assist offenders in changing their behavior and reduce recidivism.'];

var tReEntry = new Array();
tReEntry[0] = ['Gail Oliver, New Mexico\'s Corrections Department, Deputy Secretary for Reentry and Prison Reform', 'By working with Northpointe and the University of New Mexico, we will have an opportunity to conduct further research on our unique inmate population and remain in front of the issue of overcrowded prisons. Using the COMPAS tool will allow us to take a scientific approach to effectively assess the risk and needs of our inmates in a short period of time and determine how we can most effectively treat these needs to improve outcomes for our inmates and lower the chances of them re-entering the prison system.'];

var tWomen = new Array();
tWomen[0] = ['', ''];

var tYouth = new Array();
tYouth[0] = ['', ''];

var tClassification = new Array();
tClassification[0] = ['Rob Masko, Corrections Bureau Chief, Pierce County Sherriff\’s Department in Washington State', 'Northpointe has been instrumental in assisting us in implementing their Jail Inmate Classification System. This system has allowed us to satisfactorily address classification and related inmate management issues in our Federal Court Consent Decree. Northpointe\’s training and consultancy services have enabled us to more effectively manage our large inmate population through better housing and behavior management strategies. The Northpointe team was highly professional, knowledgeable, personable and easy to work with.'];

var tCaseManager = new Array();
tCaseManager[0] = ['', ''];

var tConsulting = new Array();
tConsulting[0] = ['', ''];

var tResearch = new Array();
tResearch[0] = ['', ''];

var tImplementation = new Array();
tImplementation[0] = ['', ''];

var tTraining = new Array();
tTraining[0] = ['', ''];

var tTechnology = new Array();
tTechnology[0] = ['', ''];

var tAllServices = new Array();
tAllServices[0] = ['', ''];

var tTheInstitute = new Array();
tTheInstitute[0] = ['', ''];

/* DO NOT EDIT BELOW THIS LINE */
function setTestimonial() {
	if(showTest) {
		randId = (Math.floor(Math.random() * testimonials.length + 1) - 1);

		thisSrc = testimonials[randId][0];
		thisTxt = testimonials[randId][1];
		// fallback to default 
		if(thisSrc.length <= 0) {
			thisSrc = testimonials[0][0];
			thisTxt = testimonials[0][1];
		}	
		document.getElementById('testTxt').appendChild(document.createTextNode(thisTxt));
		document.getElementById('testSrc').appendChild(document.createTextNode(thisSrc));
	}
}
function setLNavClass(elem) {
    document.getElementById(elem).className = 'on';
}

function navInit () {
	if(navItem != undefined) {
		setLNavClass(navItem);
	}
}

function showMap() {
	document.getElementById('flash-map-wrapper').className = 'vis';
    document.getElementById('flash-map').style.display = 'block';
	return false;
}

function hideMap() {
	document.getElementById('flash-map-wrapper').className = 'novis';
    document.getElementById('flash-map').style.display = 'none';
	return false;
}

if(window.addEventListener) {
    window.addEventListener("load",navInit,false);
    window.addEventListener("load",setTestimonial,false);
} else if(window.attachEvent) {
	window.attachEvent("onload",navInit);
	window.attachEvent("onload",setTestimonial);
}

