!function(e){var t,n,r,o,i,a,s=e.document,l=/^([a-zA-Z]+:)?\/\//,c={url:null,tabId:"ask-us",tabText:"Support",tabColor:"#000000",tabImageURL:null,tabPosition:"Left",forceSuggestions:!1,hide_tab:!1,request_subject:null,request_description:null,requester_name:null,requester_email:null,ticketTypeId:0};function u(t){try{return t()}catch(t){e.console&&e.console.log&&e.console.log.apply&&e.console.log("Feedback Error: ",t)}}function d(e,t,n){e&&e.addEventListener?e.addEventListener(t,n,!1):e&&e.attachEvent&&e.attachEvent("on"+t,n)}function p(e){return e&&!l.test(e)?s.location.protocol+"//"+e:e}function f(){var n=function(){if(c.tabImageURL)return c.tabImageURL;var e=c.url+"/javascript/external/images/tab_"+c.tabId;return"right"===c.tabPosition&&(e+="_right"),e+".png"}(),r=e.navigator&&e.navigator.appVersion.split("MSIE"),o=parseFloat(r[1]);o>=5.5&&o<7&&s.body.filters?t.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+n+"', sizingMethod='crop')":t.style.backgroundImage="url("+n+")"}function b(t){var n=t||e.event||{};return n.cancelBubble=!0,n.returnValue=!1,n.stopPropagation&&n.stopPropagation(),n.preventDefault&&n.preventDefault(),!1}function g(){return c.url+"/javascript/external/loading.html"}function m(l){t||((t=s.createElement("div")).setAttribute("id","feedback_tab"),t.setAttribute("href","#"),t.style.display="none",s.body.appendChild(t),(n=s.createElement("div")).setAttribute("id","feedback_overlay"),n.style.display="none",n.innerHTML='<div id="feedback_container">  <div class="header"></div>  <div id="feedback_close"></div>  <iframe id="feedback_body" frameborder="0" scrolling="auto" allowTransparency="true"></iframe></div><div id="feedback_scrim">&nbsp;</div>',s.body.appendChild(n),r=s.getElementById("feedback_container"),o=s.getElementById("feedback_close"),i=s.getElementById("feedback_body"),a=s.getElementById("feedback_scrim"),d(t,"click",function(){e.CESupportWidget.show()}),d(o,"click",function(){e.CESupportWidget.hide()}),d(a,"click",function(){e.CESupportWidget.hide()})),function(e){var t;for(t in e)e.hasOwnProperty(t)&&(c[t]="url"===t?p(e[t]):e[t])}(l),c.hide_tab?t.style.display="none":(f(),t.setAttribute("title",c.tabText),t.setAttribute("class","FeedbackTab"+c.tabPosition),t.setAttribute("className","FeedbackTab"+c.tabPosition),t.innerHTML=c.tabText,t.style.backgroundColor=c.tabColor,t.style.borderColor=c.tabColor,t.style.display="block"),i.src=g(),e.addEventListener("message",function(e){"hideSupportWidget"===e.data&&h()},!1)}function y(t){var o;return i.src=(o=c.url+"/index.php?fuse=support&view=supportwidgetform&controller=index",c.request_subject&&(o+="&subject="+c.request_subject),c.request_description&&(o+="&description="+c.request_description),c.requester_name&&(o+="&name="+c.requester_name),c.requester_email&&(o+="&email="+c.requester_email),c.forceSuggestions&&(o+="&forceSuggestions="+c.forceSuggestions),c.ticketTypeId&&(o+="&ticketTypeId="+c.ticketTypeId),o),n.style.height=a.style.height=Math.max(Math.max(s.body.scrollHeight,s.documentElement.scrollHeight),Math.max(s.body.offsetHeight,s.documentElement.offsetHeight),Math.max(s.body.clientHeight,s.documentElement.clientHeight))+"px",r.style.top=(e.pageXOffset||s.documentElement.scrollLeft||s.body.scrollLeft,(e.pageYOffset||s.documentElement.scrollTop||s.body.scrollTop)+50+"px"),n.style.display="block",b(t)}function h(e){return n.style.display="none",i.src=g(),b(e)}var v={init:function(e){u(function(){return m(e)})},update:function(e){u(function(){return m(e)})},render:function(e){u(function(){return y(e)})},show:function(e){u(function(){return y(e)})},hide:function(e){u(function(){return h(e)})}};d(e,"load",function(){e.supportwidget_params&&v.init(e.supportwidget_params)}),e.CESupportWidget=v}(this.window||this);
