var to2; var ttc=0; function makeHttpRequestJQS(url, callback_function, return_xml) { var http_request = false; if (window.XMLHttpRequest) { // Mozilla, Safari,... http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { http_request.overrideMimeType('text/xml'); } } else if (window.ActiveXObject) { // IE try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!http_request) { alert('Unfortunatelly you browser doesn\'t support this feature.'); return false; } http_request.onreadystatechange = function() { if (http_request.readyState == 4) { if (http_request.status == 200) { if (return_xml) { eval(callback_function + '(http_request.responseXML)'); } else { eval(callback_function + '(http_request.responseText)'); } } else { //alert('There was a problem with the request.(Code: ' + http_request.status + ')'); // DO Nothing! } } } http_request.open('GET', url, true); http_request.send(null); } function loadBannerJQS(xml) { var html_content = xml.getElementsByTagName('content').item(0).firstChild.nodeValue; // var html_info = xml.getElementsByTagName('info').item(0).firstChild.nodeValue; var reload_after = xml.getElementsByTagName('reload').item(0).firstChild.nodeValue; if ($("#homeBannerX").attr("src")=="") { //alert("ERSTSTART"); $("#homeBannerX").ImageSwitch({ NewImage:html_content, //NewImageInfo:html_info, Type: "FadeIn", Speed: 1 }); } else { $("#homeBannerX").ImageSwitch({ NewImage:html_content, // NewImageInfo:html_info, Type: "FlyIn", Speed: 350 }); } //$("#ritCMSbannerMulti").html(html_content); //document.getElementById('ritCMSbannerMulti').innerHTML = html_content; // document.getElementById('ritCMSbannerInfo').innerHTML = html_info; try { clearTimeout(to2); } catch (e) {} to2 = setTimeout("nextAdJQS()", parseInt(reload_after)); } function nextAdJQS() { var now = new Date(); var url = '/edit/module/banner/topAjaxFX/loadBanner.asp?id=-1337&sysbanner=&ts=' + now.getTime(); makeHttpRequestJQS(url, 'loadBannerJQS', true); //$("#main").scrollable().navigator("#main_navi").navigator(".navi").autoscroll(); } function doubleAction() { nextAdJQS(); // Neues Kleinbanner laden (This) nextAd(); // Main Banner aktualisieren } window.onload = nextAdJQS(); // window.onload = doubleAction();