var file=''; var content=''; var lightboxNav = new Array(); function updateDataDiv(file, content) { var y = content.substr(1); if (lightboxNav[y]!=1) { advAJAX.get({ url : 'www/lightbox_include/'+file, onSuccess : function(obj) { var element = document.getElementById(content); element.innerHTML = obj.responseText; }, onError : function(obj) { alert("Error: " + obj.status); updateDataDiv(file, content); }, headers : { "content-type" : "text/html; charset=utf-8" } }); lightboxNav[y]=1; } } function _updateSurebet(){ updateSurebet("surebet_list_home_refresh.html","surebetWindow", "surebetWindowLoad"); } function _updateSurebet2(){ updateSurebet("surebet_list_refresh.html","surebetWindow", "surebetWindowLoad"); } function updateSurebet(file, content, content2) { var d1 = document.getElementById(content2); var d2 = document.getElementById(content); d2.style.display = 'none'; d1.style.display = 'block'; d2.innerHTML = ''; advAJAX.get({ url : 'www/html/surebet/'+file, onSuccess : function(obj) { var element = document.getElementById(content); d1.style.display = 'none'; element.innerHTML = obj.responseText; d2.style.display = 'block'; }, onError : function(obj) { //alert("Error: " + obj.status); updateSurebet(file, content, content2); }, headers : { "content-type" : "text/html; charset=utf-8" } }); } /*function updateDataDiv(file, content) { $(document).ready(function(){ alert(file); alert(content); $.ajax({ type: 'GET', url: 'lightbox_include/'+file, dataType: 'xml', complete: function addContent(msg) { $('#'+content).append(msg.responseXML.getElementsByTagName('div')[0]); }, error: function showError() { $('#'+content).append('Error'); } }) }); }*/