﻿AMV.JavaScript.Logic.Utilities.GetRootUrl=function(A){var B=document.location.hostname;var C="";if(B.toString().indexOf("www",0)!=-1){C="www."}B=B.toString().toLowerCase().replace("www.","");if(B=="localhost"){switch(A){case"admin":return"http://localhost:61686/AMV.Admin.Web/";break;case"files":return"http://localhost:61686/AMV.Admin.Web/";break;case"site":return"http://localhost:57235/";break}}else{if(B.toString().indexOf("projekt.andremedvanner.se")>=0){switch(A){case"admin":return"http://"+C+"admin.amv.projekt.andremedvanner.se/";break;case"files":return"http://"+C+"files.amv.projekt.andremedvanner.se/";break;case"site":return"http://"+C+"amv.projekt.andremedvanner.se/";break}}else{switch(A){case"site":return"http://"+C+"andremedvanner.se/";break;case"admin":return"http://"+C+"admin.andremedvanner.se/";break;case"files":return"http://"+C+"files.andremedvanner.se/";break}}}};AMV.JavaScript.Logic.Utilities.GetRowClass=function(A){return A%2==0?"RowAltItem":"RowItem"};AMV.JavaScript.Logic.Utilities.AlertSuccessTime=function(){return 1000};AMV.JavaScript.Logic.Utilities.AlertErrorTime=function(){return 2000};AMV.JavaScript.Logic.Utilities.S4=function(){return(((1+Math.random())*65536)|0).toString(16).substring(1)};AMV.JavaScript.Logic.Utilities.Guid=function(){return(S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4())};AMV.JavaScript.Logic.Utilities.PageQuery=function(B){if(B.length>1){this.q=B.substring(1,B.length)}else{this.q=null}this.keyValuePairs=new Array();if(B){for(var A=0;A<this.q.split("&").length;A++){this.keyValuePairs[A]=this.q.split("&")[A]}}this.getKeyValuePairs=function(){return this.keyValuePairs};this.getValue=function(D){for(var C=0;C<this.keyValuePairs.length;C++){if(this.keyValuePairs[C].split("=")[0]==D){return this.keyValuePairs[C].split("=")[1]}}return false};this.getParameters=function(){var C=new Array(this.getLength());for(var D=0;D<this.keyValuePairs.length;D++){C[D]=this.keyValuePairs[D].split("=")[0]}return C};this.getLength=function(){return this.keyValuePairs.length}};AMV.JavaScript.Logic.Utilities.queryString=function(A){var B=new PageQuery(window.location.search);return unescape(B.getValue(A))};
