// urlParamObject definition
function urlParamObject() {
	this.urlArray = createUrlArray();
	this.getValueByName = getValueByName;
	this.isValid = checkUrlParams;
	
	function createUrlArray() {
		var queryString = document.location.search.substring(1,document.location.search.length)
		var tempArray = queryString.split("&");
		var buildArray = new Array();
		for (i=0; i < tempArray.length; i++) { buildArray = buildArray.concat(tempArray[i].split("=")); }
		return buildArray;
	}
	
	function getValueByName(searchterm) {
		for (i=0; i < this.urlArray.length; i++) {if (this.urlArray[i] == searchterm) {return this.urlArray[i+1];}}
		return null;
	}
	
	function checkUrlParams() {
		if ((this.urlArray.length % 2) == 0) {
			return true; }
		else { return false; }
	}		
}
