
if (window.XMLHttpRequest)
  {
  xhttp=new XMLHttpRequest();
  }
else // Internet Explorer 5/6
  {
  xhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xhttp.open("GET","datafeed_103353.xml",false);
xhttp.send("");
xmlDoc=xhttp.responseXML; 

var found=0;

var x=xmlDoc.getElementsByTagName("prod");
for (i=0;i<x.length;i++)
  { 

var y=(x[i].getElementsByTagName("name")[0].childNodes[0].nodeValue);

y=(y.toUpperCase())
 
  if ((y.search(DESC))>=1){
  found=1;
  document.write("<div id='prodcuts' style='z-index:5;position:relative;font-family:verdana;width:895px;margin:20px auto;height:215px;overflow:hidden;background:url(i/prodbg.gif);margin-bottom:20px;'>");
  document.write("<a  href="+(x[i].getElementsByTagName("awTrack")[0].childNodes[0].nodeValue)+"><img style='float:left;height:160px;margin:27px 20px 0 22px;border:none;' src="+(x[i].getElementsByTagName("awImage")[0].childNodes[0].nodeValue)+"/></a>")
  document.write("<h4 style='color:#5e4f3b;'>"+x[i].getElementsByTagName("name")[0].childNodes[0].nodeValue)+"</h4>";
  document.write("</td><td class='description'>");
 

document.write("<p style='color:#836a4c;font-size:12px;width:500px;height:128px;overflow:hidden;float:left;'>"+x[i].getElementsByTagName("desc")[0].childNodes[0].nodeValue.substring(0,600)+"...")+"hello</p>";


// Previous code, no count on paragraph:
// document.write("<p style='color:#836a4c;font-size:12px;width:500px;height:128px;overflow:hidden;float:left;'>"+x[i].getElementsByTagName("desc")[0].childNodes[0].nodeValue)+"</p>";
//  
  
  document.write("<a style='position:absolute;bottom:22px;right:25px;'href="+(x[i].getElementsByTagName("awTrack")[0].childNodes[0].nodeValue)+"><img style='border:none;'src='i/infobut.gif'></a>");
  document.write("<p style='font-size:14px;color:#c6c2c2;position:absolute;top:53px;right:25px;'>was &#163;"+x[i].getElementsByTagName("rrp")[0].childNodes[0].nodeValue)+"</p>";
  document.write("<p style='font-size:18px;color:#e35656;position:absolute;top:83px;right:25px;'>now &#163;"+x[i].getElementsByTagName("buynow")[0].childNodes[0].nodeValue)+"</p>";
  document.write("</div>");

  };
  
  }
document.write("</div>");


if (found<1)
{ document.write("<div id='prodcuts' style='z-index:5;position:relative;font-family:verdana;width:895px;margin:20px auto;height:215px;overflow:hidden;background:url(i/prodbg.gif);margin-bottom:20px;'>");
  document.write("<p style='margin:94px 0 0 218px;color:#666;'>Sorry there are current no products in stock for this section</p>");
  document.write("</div>");
  };