function IsNull(n,t){return $("#"+n).val()==null?t:$("#"+n).val()}function GetObjectReference(n){return $("#"+n)===undefined?null:$("#"+n)}function ResetControls(n){(n===undefined||n==null)&&(n=document);$("*",n).each(function(){var n=this.type,t=this.tagName.toLowerCase(),i;n=="text"||n=="password"||t=="textarea"||n=="file"?this.value="":n=="checkbox"||n=="radio"?(this.checked=!1,$(this).parent().removeClass("checked")):t=="select"&&(this.selectedIndex=0);$(this).parent().removeClass("has-error");$(this).removeClass("error");i=this.id;$(document).find("span").each(function(){$(this).attr("for")==i&&$(this).remove()})})}function HasValue(n){(n===undefined||n==null)&&(n=document);var t=!1;return $("*",n).each(function(){var n=this.type,i=this.tagName.toLowerCase();n=="text"||n=="password"||i=="textarea"||n=="file"||i=="select"?$(this).attr("disabled")===undefined&&(n!="password"&&$(this).val()!=""?t=!0:n=="password"&&$(this).val()!=""&&(t=!0)):(n=="checkbox"||n=="radio")&&$(this).is(":checked")&&(t=!0)}),t}function IsLeapYear(n){var t=!1;return(n%4||!(n%100))&&n%400||(t=!0),Boolean(t)}function IsValidDate(n,t,i){if(n<1||t<1||i<1)return!1;var r=[];return(r.push(31),IsLeapYear(i)==!0?r.push(29):r.push(28),r.push(31),r.push(30),r.push(31),r.push(30),r.push(31),r.push(31),r.push(30),r.push(31),r.push(30),r.push(31),n>r[t-1])?!1:!0}function Range(n,t){var i=[],r=0;do i.push(n),n=n+1,r++;while(r?,.",t=0;t31&&(t<48||t>57)?!1:!0}function GetValidPaxName(n){var t=$(n).val().replace(/[^a-zA-Z'\s-]/g,"");$(n).val(t)}function DisableControl(n){$(n).attr("disabled",!0)}function EnableControl(n){$(n).attr("disabled",!1)}function ShowMessage(n,t){t?$.notify({title:"Heads up!<\/strong>",message:n},{type:"success"}):$.notify({title:"Oops!<\/strong>",message:n},{type:"danger"})}function IsEmpty(n){return typeof n!="undefined"&&n&&n.length!==0&&n!==""&&/[^\s]/.test(n)&&!/^\s*$/.test(n)&&n.replace(/\s/g,"")!==""?!1:!0}function getUrlVars(){for(var i=[],n,r=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),t=0;t