function AdfLoopbackUtils(){}AdfLoopbackUtils._addCookie=function(a,b){var d=new Date;d.setTime(d.getTime()+3E4);d="; expires\x3d"+d.toUTCString();document.cookie=a+"\x3d"+(null!=b?b:"")+d+"; path\x3d/"};AdfLoopbackUtils._addParam=function(a,b,d,e,f){try{f?AdfLoopbackUtils._addCookie(d,e):null!=e&&""!==e&&(a=null==a||""===a?"?":a+"\x26",a=a+b+"\x3d"+e)}catch(g){}return a};AdfLoopbackUtils._addQS=function(a,b){AdfLoopbackUtils._internalParams[a]||(AdfLoopbackUtils._queryParamNames.push(a),AdfLoopbackUtils._queryParamValues.push(b))};
AdfLoopbackUtils._replaceCallback=function(a,b,d,e){AdfLoopbackUtils._addQS(b,e)};AdfLoopbackUtils._cookiesEnabled=function(){return navigator&&navigator.cookieEnabled};AdfLoopbackUtils._findWithBinarySearch=function(a,b,d,e){if(d<=b)return b;for(var f=Math.ceil((d+b)/2);;){if(b==f||d==f)return b;window.matchMedia("( min-"+a+": "+f+e+")").matches?b=f:d=f;f=Math.ceil((d+b)/2)}};
AdfLoopbackUtils._getTouchFeature=function(){var a="none";navigator.maxTouchPoints&&(a=1<navigator.maxTouchPoints?"multiple":"single");return a};AdfLoopbackUtils._addFontSizeParam=function(a,b,d,e){var f="16";try{f=window.getComputedStyle(document.createElement("div")).fontSize||window.getComputedStyle(document.documentElement).fontSize,f=f.substring(0,f.indexOf("px"))}catch(g){fontsize="16"}return a=AdfLoopbackUtils._addParam(a,b,d,f,e)};
AdfLoopbackUtils._addMediaTypeParam=function(a,b,d,e){var f="screen print handheld aural braille embossed tv projection tty".split(" "),g="all";try{for(var h=0;h<f.length;h++)if(window.matchMedia(f[h]).matches){g=f[h];break}}catch(k){g="all"}return a=AdfLoopbackUtils._addParam(a,b,d,g,e)};
AdfLoopbackUtils._addMediaFeatures=function(a,b,d,e,f,g,h,k,l,m,n,p,q,r,s,u,t,v,w,z,y,A,B,C,D,G,E,H){a=AdfLoopbackUtils._addFontSizeParam(a,d,u,b);a=AdfLoopbackUtils._addMediaTypeParam(a,e,t,b);a=AdfLoopbackUtils._addParam(a,f,v,window.innerWidth,b);a=AdfLoopbackUtils._addParam(a,g,w,window.innerHeight,b);a=AdfLoopbackUtils._addParam(a,h,z,screen.width,b);a=AdfLoopbackUtils._addParam(a,k,y,screen.height,b);d=AdfLoopbackUtils._findWithBinarySearch("color",0,50,"");a=AdfLoopbackUtils._addParam(a,l,
A,d,b);l=AdfLoopbackUtils._findWithBinarySearch("color-index",0,50,"");a=AdfLoopbackUtils._addParam(a,m,B,l,b);m=AdfLoopbackUtils._findWithBinarySearch("monochrome",0,20,"");a=AdfLoopbackUtils._addParam(a,n,C,m,b);n=AdfLoopbackUtils._findWithBinarySearch("resolution",0,1E3,"dpi");a=AdfLoopbackUtils._addParam(a,p,D,n,b);p=window.matchMedia("(grid)").matches;a=AdfLoopbackUtils._addParam(a,q,G,p?1:0,b);q=window.matchMedia("(scan: progressive)").matches;a=AdfLoopbackUtils._addParam(a,r,E,q?1:0,b);r=window.matchMedia("(orientation: portrait)").matches?
1:0;return a=AdfLoopbackUtils._addParam(a,s,H,r,b)};
AdfLoopbackUtils.runLoopback=function(a,b,d,e,f,g,h,k,l,m,n,p,q,r,s,u,t,v,w,z,y,A,B,C,D,G,E,H,I,J,N,Q,O,U,W,X,Y,Z,$,aa,ba,ca,da,ea,fa,ga,R){AdfLoopbackUtils._queryParamNames=[];AdfLoopbackUtils._queryParamValues=[];AdfLoopbackUtils._internalParams=v;var T=""===h?null:h,S=null,F=null,M=null,K=document.location.href,L=K.indexOf("#");h=0<L?K.substring(L+1):null;v=K=0<L?K.substring(0,L):K;n=n?AdfLoopbackUtils._cookiesEnabled():n;var P=null;try{P=window.history.state}catch(ha){}null==T&&null!=P&&(T=P[g]);
if(0<L)if(0==h.indexOf(m))t=decodeURIComponent(h.substring(m.length)).split("@"),L=t.length,1<=L&&null==T&&(T=t[0]),2<=L&&(S=t[1]),3<=L&&(F=t[2]),4<=L&&(M=t[3]);else if(M=decodeURIComponent(h),t&&(0<=M.indexOf("/")||0<=M.indexOf("@")))M=M.split("@"),t=M.length,1<=t&&(S=M[0]),2<=t&&(F=M[1]),M=null;t=K.indexOf("?");0<t&&(F=F||S&&0<S.length?F:K.substring(t),K=K.substring(0,t));if(null!=F&&0<F.length&&(F.replace(/([^?=&]+)(=([^&]*))?/g,AdfLoopbackUtils._replaceCallback),F=null,t=AdfLoopbackUtils._queryParamNames,
L=AdfLoopbackUtils._queryParamValues,0<t.length)){F="";for(P=0;P<t.length;P++)var V=L[P],F=F+(0==P?"?":"\x26")+t[P]+"\x3d"+(null==V?"":V)}t=0;F&&0<=F.indexOf("_rtrnId")&&(t=1,n=!1,L=window.parent?window.parent.name:null,/^ADFDialog\d+['$']/.test(L)&&(L=L.split("$"),window.name=L[1]));L=K.indexOf(";");0<L&&(K=K.substring(0,L));!l&&!AdfLoopbackUtils._cookiesEnabled()?window.location.replace(K.substring(0,K.length-a)+w):(S&&0<S.length&&(K=K.substring(0,K.length-a)+S),F=AdfLoopbackUtils._addParam(F,b,
p,d,n),n&&AdfLoopbackUtils._addCookie(u,""),a=window.name,/^[\w]+$/.test(a)||(a=null),1!=t&&!a&&(t=2),F=AdfLoopbackUtils._addParam(F,e,q,t,n),a||(a=k,window.name=a),AdfLoopbackUtils._saveWindowId(f),F=AdfLoopbackUtils._addParam(F,f,r,a,n),l&&(0==l.indexOf(";")?K+=l:0==l.indexOf("?")&&(F=null==F||0==F.length?"?":F+"\x26",F+=l.substr(1))),F=AdfLoopbackUtils._addParam(F,g,s,T,n),F=AdfLoopbackUtils._addMediaFeatures(F,n,z,y,A,B,C,D,G,E,H,I,J,N,Q,U,W,X,Y,Z,$,aa,ba,ca,da,ea,fa,ga),""!=O&&(e=AdfLoopbackUtils._getTouchFeature(),
F=AdfLoopbackUtils._addParam(F,O,R,e,n)),O=K+(null==F?"":F),R=null!=M&&0<M.length?encodeURIComponent(M):null,e=window.location,f=!1,null!=window.console&&null!=window.console.firebug&&(f=parseFloat(window.console.firebug),f=!isNaN(f)&&1.9>f),O==v&&(null!=R||f)?(h!=R&&e.replace(null==R?"#"+m:"#"+R),e.reload(!0)):e.replace(null==R?O:O+"#"+R))};
AdfLoopbackUtils.runRedirect=function(a,b){var d=b,e=new Date;e.setTime(e.getTime()+3E4);d=d.replace(/\$exp\$/g,e.toUTCString());d=d.split("$$");for(i=0;i<d.length;i++)document.cookie=d[i];var d=document.location,e=d.href,f=null,g=e.indexOf("#");0<=g&&(e=e.substring(0,g),f=e.substring(g));var h=a,k=null,g=h.indexOf("#");0<=g&&(h=h.substring(0,g),k=h.substring(g));h==e&&null!=k?(f!=k&&d.replace(k),d.reload(!0)):d.replace(a)};
AdfLoopbackUtils._saveWindowId=function(a){if(window===parent)try{var b=window.name;b&&0<b.length&&sessionStorage.setItem(a,b)}catch(d){}};AdfLoopbackUtils.appendBodyStyle=function(a){if(a){var b=document.body;b.style.cssText=b.style.cssText+";"+a}};