/**
 * The most general set of utility functions that can be used throughout the Edvisors network
 * @author Ian Kennington Walter
 * @since 9/6/2011
 */


// Allows us to use GET parameters within Javascript
function getUrlParams(url) {
	var params = {};
	if (url) {
		url.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(str,key,value) {
			params[key] = value;
		});
	} else {
		window.location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(str,key,value) {
			params[key] = value;
		});
	}
	return params;
}
