function format(n){for(i=1;i<arguments.length;i++)n=n.replace("{"+(i-1)+"}",arguments[i]);return n}function getBasePath(){try{var n=window.location.toString().split("/");return"http://"+n[2]}catch(t){return"http://www.storm.no"}}function getWeatherPagePath(){return getBasePath()+"/"+localizeWeatherRoute()+"/"}function getSearchPagePath(){return getBasePath()+"/"+localizeSearchRoute()+"/"}function setEnterButton(n,t){n.keypress(function(n){if(n.which&&n.which==13||n.keyCode&&n.keyCode==13)return t.click(),!1})}String.prototype.trim=function(){return this.replace(/^\s*/,"").replace(/\s*$/,"")}
