/* Spectrum.js AJAX Functions */

function removeWhitespace(string){
	// Remove whitespace from a javascript string
	
	var tempString = string;
	for(var i = 0; i < tempString.length; i++) {
		if(tempString.slice(i, i+1) == String.fromCharCode(9) || tempString.slice(i, i+1) == String.fromCharCode(10) || tempString.slice(i, i+1) == String.fromCharCode(11) || tempString.slice(i, i+1) == String.fromCharCode(13) || tempString.slice(i, i+1) == String.fromCharCode(32)) {
			tempString = tempString.slice(0, i) + tempString.slice(i+1, tempString.length);
			i--;
		}
	}
	return tempString;
}


function unique(){
	// Workaround browser cacheing by adding a unique timestamp at the end of each call
	
	var now = new Date();
	var ms = now.getTime();
	return ms;
}