var xmlHttp; var xmlHttptwo; function changecontents(tab,order) { xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { alert ("Browser does not support HTTP Request"); return; } var url="js/change.php"; url=url+"?sid="+Math.random(); url=url+"&num="+order; xmlHttp.onreadystatechange=function () { stateChange("sponsorsimages"); }; xmlHttp.open("GET",url,true); xmlHttp.send(null); if (tab=="" || tab=="1") { changenewscontents(order); } numrows = 0; num = eval(order+1); if (num == 6 || numrows < num) { num = 1; } clearInterval(delint); delint = setInterval("changecontents('" + tab + "'," + num + ")",10000); } function changecontents2() { xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { alert ("Browser does not support HTTP Request"); return; } var url="js/change.php"; url=url+"?sid="+Math.random(); xmlHttp.onreadystatechange=function () { stateChange("sponsorsimages"); }; xmlHttp.open("GET",url,true); xmlHttp.send(null); clearInterval(delint2); delint2 = setInterval("changecontents2()",5000); } function stateChange(field) { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { document.getElementById(field).innerHTML=xmlHttp.responseText; } } function GetXmlHttpObject() { var xmlHttp=null; try { xmlHttp=new XMLHttpRequest(); } catch (e) { try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } function changenewscontents(num) { xmlHttptwo=GetXmlHttpObjecttwo(); if (xmlHttptwo==null) { alert ("Browser does not support HTTP Request"); return; } var url="js/change.php"; url=url+"?tab=news"; url=url+"&num="+num; url=url+"&sid="+Math.random(); xmlHttptwo.onreadystatechange=function () { stateChangetwo("news"); }; xmlHttptwo.open("GET",url,true); xmlHttptwo.send(null); } function stateChangetwo(field) { if (xmlHttptwo.readyState==4 || xmlHttptwo.readyState=="complete") { document.getElementById(field).innerHTML=xmlHttptwo.responseText; } } function GetXmlHttpObjecttwo() { var xmlHttptwo=null; try { xmlHttptwo=new XMLHttpRequest(); } catch (e) { try { xmlHttptwo=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttptwo=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttptwo; }