var thminv_hdTimer;
var thminv_stTimer;
var thminv_plTimer;
var thminv_msgIcon = null, thminv_milock = false, thminv_dIcon;
var thminv_mFolders, thminv_fdTimer;
var thm_sTime;
function thminv_activateMsgIcon()
{
if (thminv_milock)
{
setTimeout('thminv_activateMsgIcon()', 500);
return;
}
thminv_milock = true;
if (!thminv_msgIcon)
{
thminv_dIcon = false;
thminv_msgIcon = setTimeout('thminv_blinkMsgIcon()', 200);
}
thminv_milock = false;
}
function thminv_disableMsgIcon()
{
if (thminv_milock)
{
setTimeout('thminv_disableMsgIcon()', 500);
return;
}
thminv_milock = true;
clearTimeout(thminv_msgIcon);
thminv_msgIcon = null;
document.getElementById('msgicon').innerHTML = ' ';
document.getElementById('msgicon').onclick = null;
thminv_milock = false;
}
function thminv_viewMessage()
{
document.location.href = 'message.redirect';
}
function thminv_blinkMsgIcon()
{
if (thminv_milock)
{
setTimeout('thminv_blinkMsgIcon()', 50);
return;
}
thminv_milock = true;
var e = document.getElementById('msgicon');
if (typeof e.onClick != 'function')
e.onclick = thminv_viewMessage;
if (thminv_dIcon)
e.innerHTML = ' ';
else
e.innerHTML = '';
thminv_dIcon = !thminv_dIcon;
thminv_msgIcon = setTimeout('thminv_blinkMsgIcon()', 1000);
thminv_milock = false;
}
function thminv_updateTime()
{
thm_sTime ++;
document.getElementById('jsservtm').innerHTML = formatDate(thm_sTime);
thminv_stTimer = setTimeout('thminv_updateTime()', 1000);
}
function thminv_writeHeader(data)
{
if (thminv_stTimer)
clearTimeout(thminv_stTimer);
var a = data.split("#");
thm_sTime = parseInt(a.shift(), 10);
document.getElementById('jsservtm').innerHTML = formatDate(thm_sTime);
document.getElementById('jspname').innerHTML = a.shift();
document.getElementById('jscash').innerHTML = "€" + formatNumber(a.shift());
if (a[0] == "1")
thminv_activateMsgIcon();
else
thminv_disableMsgIcon();
a.shift();
if (a[0] != "" || a.length > 1)
document.getElementById('jsalliance').innerHTML = " [" + a.join('#') + "]";
else
document.getElementById('jsalliance').innerHTML = "";
thminv_stTimer = setTimeout('thminv_updateTime()', 1000);
thminv_hdTimer = setTimeout('x_getHeaderData(thminv_writeHeader)', 15000);
}
function thminv_writePlanets(data)
{
if (!document.getElementById('jspmenu'))
return;
var ms = "";
if (data != '')
{
var i, a = data.split("\n");
for (i=0;i