function iecheck() { if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) { var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, ''); var iever = (rslt != null && Number(rslt[1]) >= 5.5 && Number(rslt[1]) <= 7 ); } return iever; } MyXssMagic = new function() { var BASE_URL = 'http://widgets.macroaxis.com/widgets/'; if(window.location.host == 'www.macroaxis.com' || window.location.host == 'macroaxis.com'){ BASE_URL = 'https://www.macroaxis.com/widgets/'; } var STYLESHEET = BASE_URL + "x.css" var CONTENT_URL = BASE_URL + 'content.jsp'; var ROOT = 'my_xss_magic'; function requestStylesheet(stylesheet_url) { stylesheet = document.createElement("link"); stylesheet.rel = "stylesheet"; stylesheet.type = "text/css"; stylesheet.href = stylesheet_url; stylesheet.media = "all"; document.lastChild.firstChild.appendChild(stylesheet); } function requestContent( local ) { var script = document.createElement('script'); script.src = CONTENT_URL + '?t=2&f=f&url=' + escape(local || location.href)+''; document.getElementsByTagName('head')[0].appendChild(script); } this.init = function() { this.serverResponse = function(data) { if (!data) return; var div = document.getElementById(ROOT); var txt = ""; txt = data[0]; if(txt =='0') { div.innerHTML = "Configuration Error: Contact us at support@macroaxis.com to resolve this issue"; } else { div.innerHTML = " "; } div.style.display = 'block'; // make element visible div.style.visibility = 'visible'; // make element visible } // requestStylesheet(STYLESHEET); document.write(""); requestContent(); var no_script = document.getElementById('no_script'); if (no_script) { no_script.style.display = 'none'; } } } MyXssMagic.init();