function loadNews() { if (typeof(window.webimNews) == "undefined" || typeof(window.webimNews.length) == "undefined") return; var str = "
"; for (var i = 0; i < window.webimNews.length; i++) { str += "
" + window.webimNews[i].title + ", " + window.webimNews[i].date + "
"; str += "
" + window.webimNews[i].message+"
"; } $("#news").html(str + "
"); } function loadVersion() { if(typeof(window.webimLatest) == "undefined" || typeof(window.webimLatest.version) == "undefined") return; var current = $("#cver").html(); if(current != window.webimLatest.version) { if(current < window.webimLatest.version) { $("#cver").css("color","red"); } $("#lver").html(window.webimLatest.version+", Download "+window.webimLatest.title+""); } else { $("#cver").css("color","green"); $("#lver").html(window.webimLatest.version); } } $(function(){ loadNews(); loadVersion(); });