function loadnewslist(typ,tagid){
    var xhr; 
    try {  xhr = new ActiveXObject('Msxml2.XMLHTTP');   }
    catch (e) 
    {
        try {   xhr = new ActiveXObject('Microsoft.XMLHTTP');    }
        catch (e2) 
        {
          try {  xhr = new XMLHttpRequest();     }
          catch (e3) {  xhr = false;   }
        }
     }
  
    xhr.onreadystatechange  = function()
    { 
         if(xhr.readyState  == 4)
         {
              if(xhr.status  == 200) {
			  
			var doc = xhr.responseXML;   // Assign the XML file to a var
			var allnews = doc.getElementsByTagName('record'); 
			//alert(tips.length);
			
			//get all "eco" tips
			var i;
			var econews = [];
			for (i=0;i<=allnews.length-1;i++){
				if (allnews[i].getAttribute("type")==typ){
					econews[econews.length] = allnews[i];
				}
			}
	
			//create list
			var html;
			html  = '<table>';
			i=0;
			var tempid;
			for (i=0;i<=econews.length-1;i++){
				tempid = "'econewslink"+i+"'";
				html += '<tr><td align="left" valign="top"><img src="images/eco_bullet.png" /></td>';
				html += '<td align="left"><strong><a target="_blank" id="econewslink'+i+'"';
				//alert(econews[i].getAttribute("filename").substring(0,3));
				if (econews[i].getAttribute("filename").substring(0,4)=="http"){
					html += ' href="'+econews[i].getAttribute("filename");
				} else {
					html += ' href="news/'+econews[i].getAttribute("filename");
				}
				html += '" onmouseover="javascript:econews_button_hover('+tempid+');" onmouseout="javascript:econews_button_unhover('+tempid+');" onclick="javascript:econews_button_unhover('+tempid+');">'+econews[i].getAttribute("title")+'</strong></a></td></tr>';
				
				html += '<tr><td></td><td align="left">';
				if (econews[i].getAttribute("author")!=""){
					html += '<em>'+econews[i].getAttribute("author")+'</em>';
				}
				if (econews[i].getAttribute("source")!=""){
					html += ' - '+econews[i].getAttribute("source");
				}
				if (econews[i].getAttribute("date")!=""){
					html += ', '+ econews[i].getAttribute("date") +'</td></tr>';	
				}
				
			}
			html += '</table>';
            
			
		  document.getElementById(tagid).innerHTML = html;
		  
          } else { 
                 alert("Error code " + xhr.status);
			  }
         }
    }

   xhr.open("GET", "kmillar_news_v1.xml",  true); 
   xhr.send(null); 
}