function ajaxCallBack(data) { var newElement = document.createElement('div'); var objects = eval('[' + data + ']'); newElement.innerHTML = unescape(objects[0].tagValue); var scripts = newElement.getElementsByTagName("script"); setTimeout(function () { for (var i = 0; i < scripts.length; ++i) { var script = scripts[i]; eval(script.innerHTML); } }, 1000); } function tagCallBack() { } function getTags() { ajaxGet('//tag.structuredweb.com/sw/app/ServicePages/Tracking/tags.aspx?ajax=true&companysiteid=8vkD85aajxYOthwWpQQteg2', ajaxCallBack); } function ajaxGet(url, callback, errorCallBack, opts) { if (typeof opts === "undefined") { opts = {method: 'GET'}; } else if(typeof opts.method === "undefined") { opts.method = 'GET'; } SWAjax(url, callback, errorCallBack, null, opts); } function SWAjax(url, callback, errorCallBack, data, opts) { var disableCachingParam = 'rnd'; if (typeof errorCallBack === "undefined"){ errorCallBack = globalAjaxErrorHandler; } if (typeof opts !== "undefined" && typeof opts.params !== "undefined"){ var params = encodeParams(opts.params); url = addUrlParameters(url, params); } if (typeof opts !== "undefined" && typeof opts.disableCache !== "undefined"){ url = addUrlParameters(url, [disableCachingParam, new Date().getTime()]); } var method = "GET"; if (typeof opts !== "undefined" && typeof opts.method !== "undefined"){ method = opts.method; } var xmlhttp; if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari try { xmlhttp = new XMLHttpRequest(); } catch (whatThe) { xmlhttp = new window.XMLHttpRequest(); } } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { callback(xmlhttp.responseText); } else if (xmlhttp.readyState == 4 && xmlhttp.status == 500) { //return JSON Object try { var result = xmlhttp.responseText; result = parseJSON(result); errorCallBack(result); } catch (e) { errorCallBack(xmlhttp.responseText); } } }; xmlhttp.open(method, url, true); if(method == 'POST') { xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); } xmlhttp.send(data); } function globalAjaxErrorHandler(message) { //do nothing } var head=document.getElementsByTagName('head')[0]; var script=document.createElement('script'); script.src='//www.googleadservices.com/pagead/conversion_async.js'; script.type='text/javascript'; head.appendChild(script); //var metaRobots = document.createElement('meta'); //metaRobots.name = 'robots'; //metaRobots.content = 'noindex' //head.appendChild(metaRobots); //var metaGoogle = document.createElement('meta'); //metaGoogle.name = 'googlebot'; //metaGoogle.content = 'noindex' //head.appendChild(metaGoogle); getTags();