//
// Requested JavaScript (ID: edbdb9e9), last compiled at 22/02/2012 @ 14:49.
// Compression rate: 49%
//
// © Orangeade Ltd 2012. Registered in England No. 3847577.
//

var STANDARD_DATETIME_PICKER_FMT="dd/mm/yy",STANDARD_FADE_INOUT_DURATION=1E3,PATH_TO_IMAGE_DIRECTORY="../images/",PATH_TO_DIRECTIONAL_MARKERS=PATH_TO_IMAGE_DIRECTORY+"directionalMarkers/",PATH_TO_CUSTOM_MARKERS=PATH_TO_IMAGE_DIRECTORY+"markers/",DIRECTIONAL_MARKERS_FILETYPE="png",DEFAULT_AJAX_ERROR_ID="uxStandardAjaxErrorDialog",DEFAULT_MAP_ZOOM=13,_errorDialog;
function DoAjaxCall(a,b,c,d,e){e=null==e?ShowAjaxErrorMessageBox:e;arguments="{";for(var f=0;f<c.length;f++)c[f][1]=EscapeSingleQuotes(c[f][1]),arguments+="'"+c[f][0]+"' : '"+c[f][1]+"'",f<c.length-1&&(arguments+=",");arguments+="}";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",dataType:"json",url:a+"/"+b,data:arguments,success:d,error:e})}function LeadingZeoPad(a,b){for(var c=""+a;c.length<b;)c="0"+c;return c}
function GetDateToString(a){return a.format(LeadingZeoPad(a.getDate(),2)+"/"+LeadingZeoPad(a.getMonth(),2)+"/"+a.getFullYear()+" @ "+LeadingZeoPad(a.getHours(),2)+":"+LeadingZeoPad(a.getMinutes(),2)+":"+LeadingZeoPad(a.getSeconds(),2))}function EscapeSingleQuotes(a){return ReplaceCharacter(a,"'","&apos;")}function EscapeDoubleQuotes(a){return ReplaceCharacter(a,'"',"&quot;")}function ReplaceCharacter(a,b,c){for(var d="",a=a.toString(),e=0;e<a.length;e++)d+=a[e].replace(b,c);return d}
function SetButtonAsDisabled(a,b,c){var d=$("#"+a).dialog("option","buttons"),e=d[b];e.disabled=c;d[b]=e;$("#"+a).dialog("option","buttons",d)}function ReturnLikeSelectorForId(a){return"[id*="+a+"]"}function ClearDate(a){$(a).prev().val("")}function CheckAllCheckBoxes(a,b){$("input[type=checkbox]",$("#"+a)).attr("checked",b);return!1}function BuildUpHtml(a,b,c){for(var d="<"+a,e=0;e<b.length;e++)d+=" "+b[e][0]+'="'+b[e][1]+'"';return null!=c?d+(">"+c+"</"+a+">"):d+" />"}
function MessageBox(a,b,c,d){b=null==b?!1:b;c=null==c?!1:c;$("#"+a).dialog({autoOpen:!1,resizable:!1,modal:!0,width:350,show:"highlight",hide:"highlight"});null!=d&&$("#"+a).dialog("option","buttons",d);c&&$("#"+a).dialog("option",{closeOnEscape:!1,open:function(){var b=$("div[aria-labelledby$="+a+"]");$(".ui-dialog-titlebar-close",b).hide()}});b&&$("#"+a).dialog("open")}
function ShowAjaxErrorMessageBox(){if(null==_errorDialog){_errorDialog=document.createElement("div");$(_errorDialog).attr("title","An error has occured");$(_errorDialog).attr("id",DEFAULT_AJAX_ERROR_ID);var a=document.createElement("p");$(a).html("An error occured whilst trying to display your data.");var b=document.createElement("p");$(b).html('Try refreshing the page to see if this fixes your problem (press the keyboard keys "CTRL" & "F5" together).');var c=document.createElement("p");$(c).html('If this doesn\'t work, please <a href="/Secured/CustomerContact.aspx">contact us</a>.');
_errorDialog.appendChild(a);_errorDialog.appendChild(b);_errorDialog.appendChild(c);document.body.appendChild(_errorDialog)}MessageBox(DEFAULT_AJAX_ERROR_ID,!1,!0);$("#"+DEFAULT_AJAX_ERROR_ID).dialog("open")}function TreatAspNetDateTimeJson(a){var b=null;null!=a&&(b=a.substring(1,a.length-1),b=eval("new "+b));return b};
