Element.prototype.remove=function(){this.parentElement.removeChild(this)};NodeList.prototype.remove=HTMLCollection.prototype.remove=function(){for(var n=0,t=this.length;n<t;n++)this[n]&&this[n].parentElement&&this[n].parentElement.removeChild(this[n])};window.console||(console={log:function(){}});globalJs={appConfig:{regexPatterns:{name:/^[ÀÈÌÒÙ àèìòù ÁÉÍÓÚÝáéíóúýÂÊÎÔÛâêîôûÃÑÕãñõÄËÏÖÜŸäëïöüŸ¡¿çÇŒœ ßØøÅåÆæÞþÐð""\w\d\s\-'.,&#@("@"):?!()$\/]{2,30}$/,friendsNetworkName:/^[0-9ÀÈÌÒÙ àèìòù ÁÉÍÓÚÝáéíóúýÂÊÎÔÛâêîôûÃÑÕãñõÄËÏÖÜŸäëïöüŸ¡¿çÇŒœ ßØøÅåÆæÞþÐð""\w\d\s\-'.,&#@("@"):?!()$\/]{2,50}$/,forumTag:/^[ÀÈÌÒÙ àèìòù ÁÉÍÓÚÝáéíóúýÂÊÎÔÛâêîôûÃÑÕãñõÄËÏÖÜŸäëïöüŸ¡¿çÇŒœ ßØøÅåÆæÞþÐð""\w\d\s\-'.,&#@("@"):?!()$\/]{2,30}$/,email:/^([A-Za-z0-9_\-!#\$%&'\*\+/=\?\^`\{|\}~\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([A-Za-z0-9_\-]+\.)+)([A-Za-z0-9_\-]{2,4}))$/,noEmail:/^((?!([A-Za-z0-9_\-!#\$%&'\*\+/=\?\^`\{|\}~\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([A-Za-z0-9_\-]+\.)+)([A-Za-z0-9_\-]{2,4})))[\s\S])*$/,shortDescription:/^.{2,100}$/,longDescription:/^[\s\S]{2,10000}$/,comment:/^.{2,}$/,nonEmptyString:/^.+$/,password:/^.{6,}$/,username:/^[a-zA-Z0-9\s\.-_]+$/,serviceNumber:/^[a-zA-Z0-9\s\.-_]+$/,year:/^[\d]{4}$/,cardNumber:/^[\d]{16}$/,expiryMonth:/^[\d]{1,2}$/,subscriptionPeriod:/^[\d]{1,}$/,radioButtonValue:/^[a-zA-Z0-9\s\.-_]{1,}$/,expiryYear:/^[\d]{4}$/,securityCode:/^[\d]{3}$/,ukPostCode:/^[A-Za-z]{1,2}[0-9][A-Za-z0-9]?\s?[0-9][ABD-HJLNP-UW-Zabd-hjlnp-uw-z]{2}$/},apiRoot:null,apiRootSecure:null},appOptions:{getServiceYears:function(){for(var i=(new Date).getFullYear(),t=[],n=i;n>=1920;n--)t.push(n.toString());return t},getPaymentYears:function(){for(var t=(new Date).getFullYear(),i=[],n=t;n<=t+12;n++)i.push(n);return i},paymentMonths:["01","02","03","04","05","06","07","08","09","10","11","12"],servicesOptions:[{id:1,name:"Army"},{id:2,name:"RAF"},{id:3,name:"Navy"},{id:4,name:"Marines"},{id:5,name:"TA"},{id:6,name:"Civilian"},{id:7,name:"Merchant Navy"},{id:8,name:"MOD"},{id:9,name:"Forces Families"}],supportRequestTypes:["Forces Reunited - General Support","Forces Reunited - Merge Mailbox","Forces Reunited - Problems in Upgrading","Forces Reunited - Other payment problem","Forces Reunited - Login Problem","Forces Genealogy","Discount Card","Advertising","Media Enquiry","Other"],corpsOptions:["AAC","ACC","AGC","ALC","APTC","ATC","CAMus","Infantry","INT Corps","QARANC","RA","RAC","RADC","RAEC","RAMC","RAOC","RAPC","RASC","RAVC","RCEME","RCT","RE","REME","RLC","RMP","Royal Signals","RPC","UOTC","WRAC"]},fn:{system:{guid:function(){function n(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return function(){return n()+n()+"-"+n()+"-"+n()+"-"+n()+"-"+n()+n()+n()}}(),shortGuid:function(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)},isUndefined:function(n){return typeof n=="undefined"},isUndefinedOrNull:function(n){return typeof n=="undefined"||n==null},arrayContains:function(n,t){for(var r=!1,i=0;i<n.length;i++)if(n[i]==t){r=!0;break}return r},applyTimeZoneOffsetForSend:function(n){var t,i,r;if(n&&n instanceof Date)t=new Date(n.getTime()),i=t.getTimezoneOffset(),r=t.getMinutes()-i,t.setMinutes(r);else throw"Input variable must be Date";return t},applyTimeZoneOffsetForReceive:function(n){var t,i,r;if(n&&n instanceof Date)t=new Date(n.getTime()),i=t.getTimezoneOffset(),r=t.getMinutes()+i,t.setMinutes(r);else throw"Input variable must be Date";return t}},string:{toType:function(n){return{}.toString.call(n).match(/\s([a-zA-Z]+)/)[1].toLowerCase()},toDateFromOrdinalFormatedString:function(n){var t=null;return n&&(t=new Date(parseInt(n.substr(0,4)),parseInt(n.substr(5,2))-1,parseInt(n.substr(8,2)),parseInt(n.substr(11,2)),parseInt(n.substr(14,2)),parseInt(n.substr(17,2)))),t},toDateFromString:function(n){var t=null;return n&&(t=new Date(n),t=new Date(t.getTime())),t},toDateFromIsoString:function(n){var t=null;return n&&(t=new Date(n),t=new Date(t.getTime()+t.getTimezoneOffset()*6e4)),t},toFormattedDate:function(n,t){var i=new Date(n),r=i.getFullYear(),u=("0"+(i.getMonth()+1)).slice(-2),f=("0"+i.getDate()).slice(-2);return t.replace("yyyy",r).replace("MM",u).replace("dd",f)},toSeoKey:function(n){return n!=null&&n.length>0&&(n=n.replace(/[^a-zA-Z0-9\s]/g,""),n=n.replace(/[\s]/g,"-"),n=n.toLowerCase()),n},pad:function(n,t,i){return i=i||"0",n=n+"",n.length>=t?n:new Array(t-n.length+1).join(i)+n},getFileExtension:function(n){var t="";return n!=null&&n.indexOf(".")>-1&&(t=n.split(".").pop().toLowerCase()),t},isJsonString:function(n){try{JSON.parse(n)}catch(t){return!1}return!0},endsWith:function(n,t){return n.indexOf(t,n.length-t.length)!==-1},trimEnd:function(n,t){var i=n;return this.endsWith(n,t)&&(i=n.substring(0,n.length-1)),i},startsWith:function(n,t){return n.indexOf(t)==0},isUndefinedNullOrWhiteSpace:function(n){return typeof n=="undefined"||n==null||n.trim().length==0},contains:function(n,t){return n.indexOf(t)!=-1},containsCaseInsensitive:function(n,t){var i="",r="";return n&&n!=null&&(i=n.toLowerCase()),t&&t!=null&&(r=t.toLowerCase()),i.indexOf(r)!=-1},fileNameFromPath:function(n){var t=n;return t=t.substring(0,t.indexOf("#")==-1?t.length:t.indexOf("#")),t=t.substring(0,t.indexOf("?")==-1?t.length:t.indexOf("?")),t.substring(t.lastIndexOf("/")+1,t.length)}},http:{setCookie:function(n,t,i,r){var u=new Date;u.setDate(u.getDate()+i);document.cookie="key"+t+";expires="+u.toGMTString()+(r?";secure":";")}},routing:{getQsParameterByName:function(n){var i=window.location.toString(),r=new RegExp("[?&]("+n+"([&=][^&=]*|$))","i"),u,t;return i.match(r)?(u=r.exec(i),t=u[1].split("=")[1],typeof t!="undefined")?decodeURIComponent(t.replace(/\+/g," ")):"":null},appendToUrl:function(n,t,i){var r=window.location.href,u;i?(r=r.indexOf("?")>-1?r+"&":r+"?",r+=n+"="+t,window.location.href=r):(u=r.indexOf("?")>-1?"&":"?",u+=n+"="+t,window.history.pushState(null,null,u))}},angularJs:{safeApply:function(n,t){n.$$phase||n.$root.$$phase?t():n.$apply(t)},setPristine:function(n){n.$setPristine?n.$setPristine():_.each(n,function(n){n.$dirty&&(n.$dirty=!1)})},getScope:function(n){var t='[ng-controller="'+n+'"]';return angular.element(t).scope()}}}}