function channelHTML(thisurl) {
    var xmlRequest=null;
	var xmlDOC=null;
	var returnedVersion="none";
    
   	this.doUpdate = doUpdate;

	doUpdate();

	function doUpdate() {
        
        var theurl=thisurl; // +(Math.random()*10000);
        
        title.innerHTML=getTime();
		
        xmlRequest = null;
        xmlRequest = new XMLHttpRequest(); 
       
        xmlRequest.onload = getData; 
        xmlRequest.overrideMimeType("text/xml");
        xmlRequest.open("GET", theurl );
        xmlRequest.setRequestHeader("Cache-Control", "no-cache");
       
        xmlRequest.send(null);
                 
	}

	function getData(e) {
        var xml;
        if (xmlRequest.responseXML) xml = xmlRequest.responseXML;
        xmlRequest = null;
        setData(xml);
    }
    
    
    
    function setData(xml) {
        var xmllist;
        var strval="";
        var acounter=0;
        var feedData = new Object();
        var errmsg = "ok";

        
                
        if ( xml!=null) { 
            xmllist=xml.getElementsByTagName("item");
            // if (xmllist!=null) {
                acounter=xmllist.length-1;
                for (var i=0;i<acounter;++i) {
                        feedData = new Object();

                        try {
                            strval=xmllist[i].getElementsByTagName("title")  [0].firstChild.nodeValue;
                        } catch(ex) {
                            strval="...";
                            };
                        feedData.title = strval;
                        
                        
                        try {
                            strval=xmllist[i].getElementsByTagName("pubDate")  [0].firstChild.nodeValue;
                            }
                        catch(ex) {
                            strval="...";
                            };
                        feedData.pubdate = strval;

                        try {
                            strval=xmllist[i].getElementsByTagName("description")  [0].firstChild.nodeValue;
                            }
                        catch(ex) {
                            strval="...";
                            };
                        feedData.description = strval;
                        
                         try {
                            strval=xmllist[i].getElementsByTagName("image")  [0].firstChild.nodeValue;
                            }
                        catch(ex) {
                            strval="...";
                            };
                        feedData.image = strval;


                        try {
                            strval=xmllist[i].getElementsByTagName("link")  [0].firstChild.nodeValue;
                            }
                        catch(ex) {
                            strval="...";
                            };
                        feedData.link = strval;

                        feedData.description="<p><strong>("+feedData.pubdate+")</strong></p> "+feedData.description;
                        horifeed[i+1] = feedData;
                        // content.innerHTML+="<p>"+strval+"</p>";
                }; // to the end of xml list
                
            // }; // xmllist!=null
                
        
        }; // xml!=null
        
        
        feedData=new Object();
        feedData.title="horiworld newsfeed"; // +acounter;
        feedData.link="http://www.horiworld.com";
        feedData.description="<br><strong>introduction</strong><br>thank you for your attention in advance.<br>";
        feedData.description+="<br>horiworld is a gadget developer, building addicting stuff for google desktop, vista sidebar, apple dashboard and the iphone.<br>";
        feedData.description+="<br>this little webapp demonstrates webapps as newsreaders and let you browse trough the elements.<br>";
        feedData.description+="<li>tap on the title to open article on my website horiworld.com</li>";
        feedData.description+="<li>back/next buttons to navigate</li>";
        feedData.description+="<li>tap on image to zoom. tap again to restore view.</li><br>";
        feedData.description+="<br>don't forget to visit horiworld.com<br>let me know if interested for a gadget/widget/webapp-project.<br>";
        feedData.image="http://www.horiworld.com/images/logo.gif";
        feedData.description+="<br>"+errmsg+"("+acounter+")"+feedData.title;
        horifeed[0]=feedData;

        
        var ai=document.getElementById("activityIndicator")
        setTimeout(function(){ai.style.display="none"},3000);
        setTimeout(function(){initFlow()},4000);
        currentcounter=-1;
        feedNext();
        initFlow();
        
    } // setData
    
    
}


function getTime() {

	var DayText= new Array("So", "Mo", "Tu", "We", "Th", "Fr", "Sa");
	var MonthText = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
	var currentTime = new Date();
	var DayOfWeek = currentTime.getDay();
	var weekday = currentTime.getDay();
	var month = currentTime.getMonth();
	var day = currentTime.getDate();
	var year = currentTime.getFullYear();
	var hours = currentTime.getHours();
	var minutes = currentTime.getMinutes();
	var seconds = currentTime.getSeconds();

	var sReturn = "";

	if ( day < 10 ) { day = "0" + day };
	if ( hours < 10 ) { hours = "0" + hours };
	if ( minutes < 10 ) { minutes = "0" + minutes };
	if ( seconds < 10 ) { seconds = "0" + seconds };
	
	return (DayText[DayOfWeek]+", " + MonthText[month] + "-" + day + "-" + year + ",  " + hours + ":" + minutes + ":" + seconds);
	
}



