jQuery(document).ready(function(){scrollIt();majx.tabs({id:".tabs-search",zones:".tab",menu:".menu-tabs",active:"on",container:".tabs",linkParent:"li",scrollToTop:true})});function globalSearchRedirect(d,a,c){var b=jQuery("#"+a).val();window.location=d+"?"+c+"="+encodeURI(b)}function enterToGlobalSearchRedirect(c,b,f,d){var a;if(b&&b.which){a=b.which}else{if(window.event){b=window.event;a=b.keyCode}}if(a==13){globalSearchRedirect(f,c.id,d);return false}}function trainingRegistrationRedirect(c,a){var b=jQuery("#"+a).val();var d=jQuery("select[id$="+getDdlYearsClientID()+" ] :selected").text();if(parseInt(b)==b&&parseInt(d)==d){window.location=c+"?Ref="+encodeURI(b)+"&Year="+encodeURI(d)+"&TrainingUrl=%2fnos-formations%2fcatalogue%2fPages%2f"+d+"-"+b+".aspx"}}function enterToTrainingRegistrationRedirect(c,b,d){var a;if(b&&b.which){a=b.which}else{if(window.event){b=window.event;a=b.keyCode}}if(a==13){trainingRegistrationRedirect(d,c.id);return false}}setUrlEncodedKey=function(a,e,c){c=c||window.location;var b=c+(c.toString().indexOf("?")==-1)?"?":"&";var d=new RegExp("[?|&]"+a+"=.*?&");if(!d.test(b)){b+=a+"="+encodeURI(e)}else{b=b.replace(d,"&"+a+"="+encodeURIComponent(e)+"&")}window.location.href=b.trimStart("&").trimEnd("&")};String.prototype.trimEnd=function(a){if(a){return this.replace(new RegExp(a.escapeRegExp()+"*$"),"")}return this.replace(/\s+$/,"")};String.prototype.trimStart=function(a){if(a){return this.replace(new RegExp("^"+a.escapeRegExp()+"*"),"")}return this.replace(/^\s+/,"")};String.prototype.escapeRegExp=function(){return this.replace(/[.*+?^${}()|[\]\/\\]/g,"\\$0")};
