function makeNews(idx,t,d,i,s){ this.id = idx; this.title = t; this.date = d; this.img = i; this.short = s; this.write = writeNews; } var newsArray = new Array(); function parseXML(xmlDomForNews) { //get list news var list = selectNodeList(xmlDomForNews, "/news/new"); if (list != null){ for (var i=0; i'; } else{ str += ''; } str += '

'+ this.title +' ('+this.date+')'; if (this.short != ""){ str += '

' + this.short + ''; } str += ''; return str; } var nIndex = 0; var timerID = null; function rotateNews(){ var len = newsArray.length; if (len > 0){ if(nIndex >= len) nIndex = 0; document.getElementById('rotateNewsContents').innerHTML = newsArray[nIndex]; nIndex++; timerID = setTimeout('rotateNews()',15000); } } function pauseNews() { if (timerID != null) { clearTimeout(timerID); timerID = null; } } function playNews() { if (timerID == null) { timerID = setTimeout('rotateNews()', 1000); } }