﻿var refresh_baner = 60;

function draw_rotobaner()
{
    Razor.Web.ServiceMethods.getRotobanerFilePseudo('confhall', 'large', refresh_baner, rf_ConfHall_callback);
    Razor.Web.ServiceMethods.getRotobanerFilePseudo('confexhib', 'large', refresh_baner, rf_ConfEx_callback);
}

function rf_ConfHall_callback(res)
{
	document.getElementById("imageConfHallRoto").src = "/rotobaner.aspx?pseudo=" + res.value;
	window.setTimeout(draw_rotobaner, refresh_baner * 1000);
}

function rf_ConfEx_callback(res)
{        
	document.getElementById("imageConfExRoto").src = "/rotobaner.aspx?pseudo=" + res.value;
}

function init() {
    if (arguments.callee.done) return;

    arguments.callee.done = true;

    draw_rotobaner();
}

/* for Mozilla */
if (document.addEventListener) {
   document.addEventListener("DOMContentLoaded", init, null);
}

window.attachEvent("onload", init);