var o;
function updateStock() {
	
		 $('#stockinfo').html("Share data currently unavailable");
		 
$.getJSON("/data/stock.asp", function(data) {
    data = eval(data);   
    
    if (data != null && data.length > 0) {
    
    o =  "<a href=\"/ir/shrprice.asp\" class=\"nounderline\">";
    o += "<span style=\"font-size:11px;color:#404040;\"><b>";
    o += data[0].LastValue;
    o += "</b>&nbsp;<span style=\"font-size:11px;color:#909090;\">EUR</span></span>";
    o += "<img src=\"";
    
    if (data[0].Difference > 0) { 
        o += "/grfx/up1.gif";
    } else if (data[0].Difference < 0) {
        o += "/grfx/down1.gif";
    } else {
        o += "/grfx/level.gif";
    }
    
    o += "\" border=0 hspace=6><span style=\"font-size:11px;color:#404040;\"><b>" + data[0].Difference + "</b> <span style=\"font-size:11px;color:#909090;\">EUR</span></span></a>&nbsp;";
    o += "<div style=\"font-size:10px;font-family:tahoma;color:#606060;\">" + data[0].LastTime + " GMT+1</div></center>";
    o += "<style>.hilo td { font-size:10px;font-family:tahoma;color:#606060;text-align:center }</style>";
    o += "<br/><table class=\"hilo\" width=\"100%\" align=center >";
    o += "<tr><td valign=top><u>High</u></td><td valign=top><u>Low</u></td></tr>";
    o += "<tr><td>EUR <b>" + data[0].HighValue + "</b><br/>at " + data[0].HighTime + "</td><td>EUR <b>" + data[0].LowValue + "</b><br/>at " + data[0].LowTime + "</td></tr>";
    o += "</table>";
    
    } else {
        o = "Share data currently unavailable";
    }
    $('#stockinfo').html(o);
    
});

}

//setInterval('updateStock()', 6000);