var blinkTitleS;
function blinkTitle(msg)
{
blinkTitleS = document.title;
var timeoutId = setInterval(
function()
{
document.title = document.title == msg ? blinkTitleS : msg;
}, 1000);
window.onmousemove = function() {
clearInterval(timeoutId);
document.title = blinkTitleS;
window.onmousemove = null;
};
}
function addBookmark(title,url)
{
if (window.sidebar)
{
window.sidebar.addPanel(title, url,"");
}
else if( document.all )
{
window.external.AddFavorite( url, title);
}
else if( window.opera && window.print )
{
return true;
}
}
function httpGet(theUrl)
{
var xmlHttp = null;
xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theUrl, false );
xmlHttp.send( null );
return xmlHttp.responseText;
}
var popup=null;
function popWin(theURL,dx,dy)
{
var ScreenWidth=dx;
var ScreenHeight=dy;
var movefromedge=0;
placementx=movefromedge;
placementy=movefromedge;
WinPop=window.open(theURL,"","width="+ScreenWidth+",height="+ScreenHeight+",toolbar=0,location=0,directories=0,status=0,scrollbars=1,menubar=0,resizable=1,left="+placementx+",top ="+placementy+",screenX="+placementx+",screenY="+placementy+",");
}
function popUp(theURL,dx,dy)
{
var movefromedge=50;
placementx=movefromedge;
placementy=movefromedge;
window.open(theURL,"","width="+dx+",height="+dy+",toolbar=0,location=0,directories=0,status=0,scrollbars=1,menubar=0,resizable=1,left="+placementx+",top ="+placementy+",screenX="+placementx+",screenY="+placementy+",");
}
function popUp2(theURL,dx,dy)
{
var movefromedge=50;
placementx=movefromedge;
placementy=movefromedge;
window.open(theURL,"","width="+dx+",height="+dy+",toolbar=1,location=0,directories=0,status=0,scrollbars=1,menubar=0,resizable=1,left="+placementx+",top ="+placementy+",screenX="+placementx+",screenY="+placementy+",");
}
function popUpMax(theURL)
{
window.open(theURL,"_blank","fullscreen=yes,toolbar=0,location=0,directories=0,status=0,scrollbars=1,menubar=0,resizable=1");
}
function x()
{
return;
}
function openURL(url)
{
window.opener.location=url;
setTimeout("window.close()",2500)
}
function showstuff(boxid)
{
document.getElementById(boxid).style.visibility="visible";
}
function showparentstuff(boxid)
{
parent.document.getElementById(boxid).style.visibility="visible";
}
function hidestuff(boxid)
{
document.getElementById(boxid).style.visibility="hidden";
}
function hideparentstuff(boxid)
{
parent.document.getElementById(boxid).style.visibility="hidden";
}
function extractFilename(path) {
var x;
x = path.lastIndexOf('\\');
if (x >= 0) // Windows-based path
return path.substr(x+1);
x = path.lastIndexOf('/');
if (x >= 0) // Unix-based path
return path.substr(x+1);
return path; // just the filename
}
/* FX BOOK FUNCTION */
var xmlDashboard;
function updateDashboard_callback()
{
if (xmlDashboard.readyState==4 && xmlDashboard.status==200)
{
document.getElementById('dashboard').innerHTML=xmlDashboard.responseText;
}
}
var xmlCalendar;
var calSince;
function updateCalendar_callback()
{
if (xmlCalendar.readyState==4 && xmlCalendar.status==200)
{
var html=xmlCalendar.responseText;
if(html.length>0)
{
var objdiv=document.getElementById('calendar');
var lines = new Array();
lines=html.split('\n');
calSince=parseInt(lines.shift());
objdiv.innerHTML=lines.join('');
objdiv.scrollTop = 0;
}
}
}
function refreshCalendar()
{
xmlCalendar.open( "GET", '/calendar.php?since='+calSince+'&ts='+(new Date()).getTime(), true );
xmlCalendar.send();
setTimeout("refreshCalendar()",30000);
}
var xmlNewsfeed;
var newsfeedSince;
var newsAll=0;
function updateNewsfeed_callback()
{
if (xmlNewsfeed.readyState==4 && xmlNewsfeed.status==200)
{
var html=xmlNewsfeed.responseText;
if(html.length>0)
{
var objdiv=document.getElementById('newsfeed');
var lines = new Array();
lines=html.split('\n');
newsfeedSince=parseInt(lines.shift());
objdiv.innerHTML=lines.join('');
objdiv.scrollTop = 0;
}
}
}
function refreshNews(alltext)
{
xmlNewsfeed.open( "GET", '/newsfeed.php?at='+alltext+'&since='+newsfeedSince+'&newsall='+newsAll+'&ts='+(new Date()).getTime(), true );
xmlNewsfeed.send();
setTimeout("refreshNews("+alltext+")",30000);
}
function newsLess()
{
newsAll=0;
newsfeedSince=0;
var sw=document.getElementById('newsswitch');
if(sw)
{
sw.innerHTML='See more';
}
xmlNewsfeed.open( "GET", '/newsfeed.php?since='+newsfeedSince+'&newsall='+newsAll+'&ts='+(new Date()).getTime(), true );
xmlNewsfeed.send();
}
function newsMore()
{
newsAll=1;
newsfeedSince=0;
document.getElementById('newsswitch').innerHTML='See less';
xmlNewsfeed.open( "GET", '/newsfeed.php?since='+newsfeedSince+'&newsall='+newsAll+'&ts='+(new Date()).getTime(), true );
xmlNewsfeed.send();
}
function refreshDashboard()
{
xmlDashboard.open( "GET", '/dashboard.php?ts='+(new Date()).getTime(),true);
xmlDashboard.send();
setTimeout("refreshDashboard()",6000);
}
var xmlmail;
var lastmailcheck;
function checkmb_callback()
{
if (xmlmail.readyState==4 && xmlmail.status==200)
{
var html=xmlmail.responseText;
if(html.length>0)
{
var objdiv=document.getElementById('emails');
var lines = new Array();
lines=html.split('\n');
lastmailcheck=parseInt(lines.shift());
objdiv.innerHTML=lines.join('');
objdiv.scrollTop = 0;
}
}
}
function checkmb()
{
xmlmail.open( "GET", '/email_check.php?since='+lastmailcheck+'&ts='+(new Date()).getTime(), true );
xmlmail.send();
setTimeout("checkmb()",5000);
}
var reqTrOnAir;
var lastupdtAir;
function reqTrOnAir_callback()
{
if (reqTrOnAir.readyState==4 && reqTrOnAir.status==200)
{
var html=reqTrOnAir.responseText;
if(html.length>0)
{
var objdiv=document.getElementById('onair_dlg');
var lines = new Array();
lines=html.split('\n');
lastupdtAir=parseInt(lines.shift());
objdiv.innerHTML=lines.join('');
objdiv.scrollTop = objdiv.scrollHeight;
}
}
}
function refreshTrOnAir()
{
reqTrOnAir.open( "GET", '/tr_onair_dlg.php?since='+lastupdtAir+'&ts='+(new Date()).getTime(), true );
reqTrOnAir.send();
setTimeout("refreshTrOnAir()",2000);
}
var reqTrOnAirPeople;
function reqTrOnAirPeople_callback()
{
if (reqTrOnAirPeople.readyState==4 && reqTrOnAirPeople.status==200)
{
var objdiv=document.getElementById('onair_people');
objdiv.innerHTML=reqTrOnAirPeople.responseText;
objdiv.scrollTop = 0;
}
}
function refreshTrOnAirPeople()
{
reqTrOnAirPeople.open( "GET", '/tr_onair_people.php?ts='+(new Date()).getTime(), true );
reqTrOnAirPeople.send();
setTimeout("refreshTrOnAirPeople()",5000);
}
function initOnAir()
{
lastupdtAir=0;
reqTrOnAir=new XMLHttpRequest();
reqTrOnAir.onreadystatechange=reqTrOnAir_callback;
refreshTrOnAir();
reqTrOnAirPeople=new XMLHttpRequest();
reqTrOnAirPeople.onreadystatechange=reqTrOnAirPeople_callback;
refreshTrOnAirPeople();
}
var reqSYM;
var lastupdtSYM;
function reqSYM_callback()
{
if (reqSYM.readyState==4 && reqSYM.status==200)
{
var html=reqSYM.responseText;
if(html.length>0)
{
var objdiv=document.getElementById('speakyourmind');
var lines = new Array();
lines=html.split('\n');
lastupdtSYM=parseInt(lines.shift());
objdiv.innerHTML=lines.join('');
objdiv.scrollTop = 0;
}
}
}
function refreshSYM()
{
reqSYM.open( "GET", '/speakyourmind_data.php?since='+lastupdtSYM+'&ts='+(new Date()).getTime(), true );
reqSYM.send();
setTimeout("refreshSYM()",2000);
}
function initSYM()
{
lastupdtSYM=0;
reqSYM=new XMLHttpRequest();
reqSYM.onreadystatechange=reqSYM_callback;
refreshSYM();
}
var xmlDates;
function xmlDates_callback()
{
if (xmlDates.readyState==4 && xmlDates.status==200)
{
var html=xmlDates.responseText;
if(html.length>0)
{
var objdiv=document.getElementById('topdates');
objdiv.innerHTML=html;
}
}
}
function refreshDates()
{
xmlDates.open( "GET", '/dates.php?ts='+(new Date()).getTime(), true );
xmlDates.send();
setTimeout("refreshDates()",29000);
}
var xmlTitle;
function xmlTitle_callback()
{
if (xmlTitle.readyState==4 && xmlTitle.status==200)
{
var html=xmlTitle.responseText;
if(html.length>0)
{
parent.document.title=html;
}
}
}
function refreshTitle()
{
xmlTitle.open( "GET", '/title.php?menu=123&ts='+(new Date()).getTime(),true);
xmlTitle.send();
setTimeout("refreshTitle()",5000);
}
function updateTopMenu()
{
parent.document.getElementById('topmenu0').style='tdmenuOFF';
parent.document.getElementById('topmenuhref0').style='textmenuOFF';
parent.document.getElementById('topmenu1').style='tdmenuOFF';
parent.document.getElementById('topmenuhref1').style='textmenuOFF';
parent.document.getElementById('topmenu2').style='tdmenuOFF';
parent.document.getElementById('topmenuhref2').style='textmenuOFF';
parent.document.getElementById('topmenu3').style='tdmenuOFF';
parent.document.getElementById('topmenuhref3').style='textmenuOFF';
parent.document.getElementById('topmenu4').style='tdmenuOFF';
parent.document.getElementById('topmenuhref4').style='textmenuOFF';
parent.document.getElementById('topmenu5').style='tdmenuOFF';
parent.document.getElementById('topmenuhref5').style='textmenuOFF';
}
function updateNotice()
{
parent.document.getElementById('notice').innerHTML=''; }
function jsmain()
{
xmlTitle= new XMLHttpRequest();
xmlTitle.onreadystatechange=xmlTitle_callback;
refreshTitle();
updateNotice();
}