function roll(img, imgsrc) {
     
	img.src = imgsrc;
   
}

function noPrint() {
	
	alert("Please do your bit for the environment by not printing this material. It will always be available on line for you to refer back to.");

}

function trim(str) {  
			
	return str.replace(/^\s+|\s+$/g, '');

}

function getXmlHttpObject() {

	var x = null;

	try {
    
		x = new XMLHttpRequest();
	} catch (e) {
 
		try {
			x = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			x = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	
	return x;

}

function GP_popupConfirmMsg(msg) { 

	return confirm(msg);
	
}

function addItem(list, text, value, index) {

	var option = document.createElement("option");
	var old = list.options[index];
	option.text = text;
	option.value = value;				
	
	try {
		list.add(option, old); 
	} catch(ex) {
		list.add(option, index);
	}
					
}

function is_numeric(n) { return (isNaN(parseFloat(n))) ? false : true; }
