if(typeof authus=="undefined"){authus={}}if(typeof authus.lw=="undefined"){authus.lw={}}if(typeof authus.internal=="undefined"){authus.internal={}}authus.IE6=false
/*@cc_on || @_jscript_version < 5.7 @*/
;authus.getIEVersion=function(){var d=-1;if(navigator.appName=="Microsoft Internet Explorer"){var a=navigator.userAgent;var b=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(b.exec(a)!=null){try{d=parseFloat(RegExp.$1)}catch(c){}}}return d};authus.IEVersion=authus.getIEVersion();authus.postMessage=false;if(typeof window.postMessage!=="undefined"){if(authus.IEVersion>0&&authus.IEVersion<8){}else{authus.postMessage=true}}authus.nonceSize=20;authus.addEventHandler=function(c,b,a){if(c.attachEvent){c.attachEvent("on"+b,a)}else{c.addEventListener(b,a,false)}};authus.randomHex=function(g){var d="0123456789abcdef";var b="";for(var a=0;a<2*g;a++){try{var c=Math.floor(16*Math.random());b+=d.charAt(c)}catch(f){b+=d.charAt(6)}}return b};authus.NVP=function(b,a){this.name=b;this.value=a};authus.makeNVPString=function(d){var b="";if(!d){return b}for(var c in d){var a=d[c];if(c&&a){if(b.length>0){b+="&"}b+=c+"="+encodeURIComponent(a)}}return b};authus.parseNVPString=function(d){if(!(typeof(d)=="string")||!d.indexOf("=")>0){return{}}var a={};var e=d.split("&");for(var c=0;c<e.length;c++){var b=e[c].split("=");if(b.length!=2){continue}a[b[0]]=decodeURIComponent(b[1])}return a};authus.internal.handleIsSafe=function(b){if(typeof b=="object"){return true}if(typeof b!="string"){return false}var a=b.replace(/parent/gi,"").replace(/window/gi,"").replace(/\./g,"");if(a.length>0){return false}else{return true}};authus.internal.getHandleObject=function(b){if(!authus.internal.handleIsSafe(b)){return null}if(typeof b=="object"){return b}else{var c=authus.internal.getObjFromHandle(b);var a=true;if(typeof c!="object"){a=false}if(a){return c}else{return null}}};authus.internal.getObjFromHandle=function(e){var a=e.split(".");if(!a){return null}var d=null;if(a[0]&&a[0]=="window"){d=window}else{if(a[0]&&a[0]=="parent"){d=window.parent}else{return null}}for(var b=1;b<a.length;b++){var c=a[b];if(c!="window"&&c!="parent"){return null}d=d[c]}return d};authus.internal.noncify=function(c){if(typeof c!="string"){return c}var a=c.match(/^\[\[[0-9a-f]*\]\]/);if(!a||!a.length||a.length!=1||nw[0].length!=(2*authus.nonceSize)+4){var b=authus.randomHex(authus.nonceSize);return"[["+b+"]]"+c}else{return c}};authus.internal.extractNonce=function(b){if(typeof b!="string"){return null}var a=b.match(/^\[\[[0-9a-f]*\]\]/);if(!a||!a.length||a.length!=1||a[0].length!=(2*authus.nonceSize)+4){return null}return a[0].substring(2,a[0].length-2)};authus.internal.extractMessage=function(b){if(typeof b!="string"){return null}var a=b.match(/^\[\[[0-9a-f]*\]\]/);if(!a||!a.length||a.length!=1||a[0].length!=(2*authus.nonceSize)+4){return null}return b.substring(a[0].length)};if(typeof window.opera!="undefined"){if(parseInt(window.opera.version())==9){Event.prototype.__defineGetter__("origin",function(){if(event.uri){var a=event.uri.toString().match(/http.{0,1}:\/\/[^\/]+(?=\/)/i);if(a&&a.length&&a.length==1){return a[0]}else{return"https://"+this.domain}}else{return"https://"+this.domain}})}}authus.makeLocator=function(a,b){return a+"-"+b.toUpperCase()};authus.makeXmlReference=function(a,b){return authus.makeLocator(a,b)+".xml"};authus.handleMessageEvent=function(f){var a=f.data;var c=f.source;var b=f.origin;var e=authus.internal.extractMessage(a);var d=authus.internal.extractNonce(a);var g=authus.internal.processMessage(d,e,b);if(g){c.postMessage(g,b)}};authus.internal.processMessage=function(c,d,b){var a=b.match(/^https:\/\/[^\/]*\.authus\.com$/);if(!a||!a.length||a.length!=1){return null}var g=null;try{g=authus.messageDispatch(d)}catch(f){}if(!g){return null}if((typeof g=="object")&&g.reply){return"[["+c+"]]"+g.text}else{return null}};authus.internal.handleMessageCall=function(b,c,a){return authus.internal.processMessage(b,c,a)};authus.addEventHandler(window,"message",authus.handleMessageEvent);authus.generateFormValue=function(f,e,c,h,g){var b=c+"-"+h;var d='<?xml version="1.0" encoding="UTF-8"?><get_'+g+' version="01"><retailer_origin url="'+f+'"/><content_origin url="'+e+'"/><assertions_files><assertions_file value="'+b+'"/></assertions_files></get_'+g+">";d=d.replace(/"/g,"%22");return d};authus.makeRequestForm=function(k,f,b,d,j,h){var a=authus.SERVER+authus.VERSION+"/"+j+".html";var c;try{var g='<form style="display: none; visibility: hidden" action="'+a+'" method="POST"></form>';if(h){g='<form style="display: none; visibility: hidden" action="'+a+'" method="POST" target="'+h+'"></form>'}c=document.createElement(g)}catch(e){c=document.createElement("form");c.style.display="none";c.style.visibility="hidden";c.action=a;c.method="POST";if(h){c.target=h}}if(!c){return}else{}var i;n="xml";v=authus.generateFormValue(k,f,b,d,j);try{i=document.createElement('<input type="hidden" name="'+n+'" value="'+v+'">')}catch(e){i=document.createElement("input");i.type="hidden";i.name=n;i.value=v}if(!i){return}else{}c.appendChild(i);try{document.body.appendChild(c)}catch(e){}return c};if(typeof authus=="undefined"){authus={}}authus.SERVER="https://staging.authus.com/A2/";authus.VERSION="1";authus.IMAGE_DIR=authus.SERVER+authus.VERSION+"/images/";authus.makeInvisible=function(){var a=document.getElementById("seal_iframe");if(a){a.style.visibility="hidden"}};authus.onIframeLoad=function(a){a.style.visibility="visible"};authus.messageDispatch=function(b){if(b.indexOf("echo:")===0){var a=b.replace(/^echo:/,"");return{reply:true,text:a}}return null};authus.getLaunchUrl=function(c,d,a,g,f){var b="/launch-authus.html#";var e={};e.retailerOrigin=c;e.contentOrigin=d;e.UID=a;e.lang=g;if(f){e.docDomain=f}b+=authus.makeNVPString(e);return b};authus.makeSeal=function(j,k,b,c,g){var l=window.location.protocol+"//"+window.location.host;var a=authus.getLaunchUrl(k,l,b,c,g);var h;try{h=document.createElement('<iframe src="'+a+'" style="border: none; visibility: hidden; width: 273px; height: 42px; overflow: hidden;" frameborder="0" allowtransparency="true" scrolling="no" onload="authus.onIframeLoad(this);"</iframe>')}catch(e){h=document.createElement("iframe");h.id="seal_iframe";h.style.borderStyle="none";h.style.visibility="hidden";h.style.width="273px";h.style.height="42px";h.style.overflow="hidden";h.allowTransparency="true";h.onload=function(){authus.onIframeLoad(h)};h.src=a}var i=document.getElementById(j);if(i){i.appendChild(h)}};
