// Timestamp of cart that page was last updated with
/*
 * Adds the specified item to the shopping cart, via Ajax call
 * itemCode - product code of the item to add
 */
function ShowNews(l) {
 var req = newXMLHttpRequest(); 
 req.onreadystatechange = getReadyStateHandler(req, updateNews);
 req.open("POST", "getvnunews", true);
 req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8;");
 req.send("lang="+l);
}
/*
 * Update shopping-cart area of page to reflect contents of cart
 * described in XML document.
 */
function updateNews(cartXML) {
 //alert("test2");
 var tab = cartXML.getElementsByTagName("tab")[0];
 var items = tab.getElementsByTagName("item");
 var contents = document.getElementById("action_news");
// alert(cartXML); 
 var id = items[0].getElementsByTagName("id")[0].firstChild.nodeValue;
// var name = items[0].getElementsByTagName("name")[0].firstChild.nodeValue;
// var head = items[0].getElementsByTagName("head")[0].firstChild.nodeValue;
 var title = items[0].getElementsByTagName("title")[0].firstChild.nodeValue; 
// alert(id+":"+name + ":" + head);
 contents.innerHTML = "";
 contents.innerHTML = "<span style=\"font-family: 'Arial CYR'; color: rgb(181, 45, 45); font-size: 16px;\"><b>&nbsp;актуально <a href='menu.jsp?id=9;&t=n&idd=" + id + "'>" + title + "</a></b></span>";
 }
