function iecheck() { if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) { var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, ''); var iever = (rslt != null && Number(rslt[1]) >= 5.5 && Number(rslt[1]) <= 7 ); } return iever; } ListBox = new function() { var BASE_URL = 'http://www.finnlist.com'; var STYLESHEET = BASE_URL + "/design/css/widget.css" var CONTENT_URL = BASE_URL + '/finland/data.js'; var ROOT = 'Div' + 'Finnlist'; var j = 0; var p = 0; var slideShowSpeed = 5000; var items; var div; function requestStylesheet(stylesheet_url) { stylesheet = document.createElement("link"); stylesheet.rel = "stylesheet"; stylesheet.type = "text/css"; stylesheet.href = stylesheet_url; stylesheet.media = "all"; document.lastChild.firstChild.appendChild(stylesheet); } function requestContent( local ) { var script = document.createElement('script'); // How you'd pass the current URL into the request // script.src = CONTENT_URL + '&url=' + escape(local || location.href); script.src = CONTENT_URL; document.getElementsByTagName('head')[0].appendChild(script); } function drawItem(item) { var txt = ""; txt += "
  • "; txt += ""+item.title+""; txt += "

    "+item.description+"

    "; txt += "
  • "; return txt; } function runSlideShow() { if (j > (items.length - 2)) j=0; var txt = ""; div.innerHTML = txt; // assign new HTML into #ROOT div.style.display = 'block'; // make element visible div.style.visibility = 'visible'; // make element visible j = j + 1; t = setTimeout(runSlideShow, slideShowSpeed) } this.init = function() { this.serverResponse = function(data) { if (!data) return; items = data div = document.getElementById(ROOT); runSlideShow(); } requestContent(); requestStylesheet(STYLESHEET); document.write(""); var no_script = document.getElementById('no_script'); if (no_script) { no_script.style.display = 'none'; } } } ListBox.init();