TYSWidget17938 = new function() { var BASE_URL = "https:\/\/toyoursuccess.com"; var CONTENT_URL = BASE_URL + '/reviews/content:7938:1:'; var POPUP_URL = BASE_URL + '/reviews/popup:7938'; var ROOT = 'tys_widget1_7938'; function requestContent() { url = CONTENT_URL; var script = document.createElement('script'); script.src = url; document.getElementsByTagName('head')[0].appendChild(script); } this.popup = function () { var newwindow = window.open(POPUP_URL,'tys_popup','height=720,width=1000,resizable,scrollbars=yes'); if (window.focus) {newwindow.focus()} return false; } this.serverResponse = function( data ) { if (!data) return; var div = document.getElementById(ROOT); div.innerHTML = data[0]; // assign new HTML into #ROOT div.style.display = 'block'; // make element visible } document.write(""); requestContent(); }