var CalcunConfig = {
	basePath : '/',
	
	/**
	*	Gets a parameter from the current url
	*/
	urlParam: function( name )
	{
	  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
	  var regexS = "[\\?&]"+name+"=([^&#]*)";
	  var regex = new RegExp( regexS );
	  var results = regex.exec( window.location.href );
	  if( results == null ) {
	    return "";
	  } else {
	    return results[1];
	  }
	},
	
	/**
	* Trim whitespace
	*/
	trim: function(str) {
	    if(!str || typeof str != 'string')
	        return null;
	
	    return str.replace(/^[\s]+/,'').replace(/[\s]+$/,'').replace(/[\s]{2,}/,' ');	
	}
};
