function ChangePagerPageNumber(C,B,A){if(typeof (Page_ClientValidate)=="function"){if(A!==null&&!Page_ClientValidate(A==""?undefined:A)){return false}}element=document.getElementById(C);element.value=B;if(typeof __doPostBack!="undefined"){__doPostBack(C)}else{document.forms[0].submit()}return true}function MoveBetweenListboxes(E,D){var A=E.selectedIndex;if(A<0){return }var C=false;for(var B=0;B<D.options.length;B++){if(E.options[A].value.toUpperCase()<D.options[B].value.toUpperCase()){D.insertBefore(E.options.item(A),D.options[B]);D.selectedIndex=B;C=true;break}}if(!C){D.appendChild(E.options.item(A));D.selectedIndex=D.options.length}E.selectedIndex=-1;return }function SelectAllItems(C){var B=C.options.length;for(var A=0;A<B;A++){C.options(A).selected=true}}function DisableWTButton(C,D){if(undefined==C||C==null){return }var A=C.parentNode.className;var B=(A.substring(A.length-2)=="_d");if(D&&!B){C.parentNode.className+="_d"}else{if(!D&&B){C.parentNode.className=A.substring(0,A.length-2)}}}function WTButtonIsDisabled(A){return(A.className.substring(A.className.length-2)=="_d")}function ShowWTButton(B,A){ShowElement(B.parentNode,A)}function SetWTButtonText(A,B){A.firstChild.innerHTML=B}function ShowElement(B,A){if(A==undefined||A){if(B.tagName=="SPAN"){if(B.style.display!="inline"){B.style.display="inline"}}else{if(B.style.display!="block"){B.style.display="block"}}}else{if(B.style.display!="none"){B.style.display="none"}}}function SetVisibility(A,B){A.style.visibility=B?"visible":"hidden"}function GetFirstDiv(A){return GetFirstElement(A,"DIV")}function GetFirstElement(B,A,C){if(B.firstChild==undefined||B.firstChild.tagName==A){return B.firstChild}else{if(C){var D=GetFirstElement(B.firstChild,A,C);if(D!=null){return D}}return GetNextElement(B.firstChild,A,C)}}function RemoveAllChildren(A){while(A.firstChild!=undefined){A.removeChild(A.firstChild)}}function GetNextDiv(A){return GetNextElement(A,"DIV")}function GetNextElement(B,A,C){while(B.nextSibling!=undefined){if(B.nextSibling.tagName==A){return B.nextSibling}if(C&&B.firstChild!=null){var D=GetFirstElement(B.nextSibling,A,C);if(D!=null){return D}}B=B.nextSibling}return null}function HasClass(C,B){var A=new RegExp("(?:^|\\s+)"+B+"(?:\\s+|$)");return A.test(C["className"])}function GetParentWithStyle(A,B){do{A=A.parentNode}while(A!=undefined&&!HasClass(A,B));return A}function GetChildWithStyle(B,C,D){var A=B.firstChild;while(A!=undefined&&!HasClass(A,C)){if(D){var E=GetChildWithStyle(A,C,D);if(E!=null){return E}}A=A.nextSibling}return A}function FormatTime(A){return(A.getHours()<10?"0":"")+A.getHours()+(A.getMinutes()<10?":0":":")+A.getMinutes()}function FormatDuration(C){var A=Math.floor(C/60);var B=C%60;return A.toString()+(B.toString()<10?":0":":")+B.toString()}var monthNames=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");var dayNames=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");function FormatDate(A){return dayNames[A.getDay()]+" "+A.getDate()+" "+monthNames[A.getMonth()]+" "+A.getFullYear()}function FormatPrice(A){return"&pound;"+(A/100).toFixed(2)}function FormatPriceWithRounding(A){return"&pound;"+Math.floor(A/100)}function InsertItemIntoArray(C,B,A){C.splice(B,0,A)}function StillInsideElementOnMouseOut(B,C){var A=C.relatedTarget||C.toElement;do{if(A==undefined||A==null){break}if(A==B){return true}A=A.parentElement}while(A!=undefined);return false}function StillInsideElementOnMouseClick(B,C){var A=C.srcElement;do{if(A==undefined||A==null){break}if(A==B){return true}A=A.parentElement}while(A!=undefined);return false}function CreateElement(D,C,B,E){var A=document.createElement(C);if(A.className!=undefined){A.className=B}if(E!=undefined){A.innerHTML=E}D.appendChild(A);return A}function IsVisible(A){if(A.style&&A.style.display=="none"){return false}else{if(A.parentNode){return IsVisible(A.parentNode)}else{return true}}}function WTCheckValidation(A){if(typeof (Page_ClientValidate)=="function"){return Page_ClientValidate(A)}else{return true}}