2011-03-28 05:45:08 +08:00
|
|
|
var blinkTimer = false;
|
|
|
|
var blinking = false;
|
|
|
|
|
|
|
|
var startblink = function(message1, message2)
|
|
|
|
{
|
|
|
|
if(!blinking)
|
|
|
|
{
|
|
|
|
document.title = (document.title == message2)?message1:message2;
|
|
|
|
blinkTimer = window.setTimeout("blinktitle('" + message1 + "', '" + message2 + "', 1)", 500);
|
|
|
|
blinking = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var blinktitle = function(message1, message2)
|
|
|
|
{
|
|
|
|
document.title = (document.title == message2)?message1:message2;
|
|
|
|
blinkTimer = window.setTimeout("blinktitle('" + message1 + "', '" + message2 + "', 1)", 500);
|
|
|
|
}
|
|
|
|
|
|
|
|
var clearblink = function()
|
|
|
|
{
|
|
|
|
blinking = false;
|
|
|
|
if(blinkTimer)
|
|
|
|
{
|
|
|
|
window.clearTimeout(blinkTimer);
|
|
|
|
}
|
|
|
|
document.title = 'BigBlueButton';
|
|
|
|
}
|
|
|
|
|
2012-08-10 02:14:20 +08:00
|
|
|
var i = 1;
|
|
|
|
function addAlert(message){
|
|
|
|
var target = document.getElementById( 'notifications' ),
|
|
|
|
contentDiv = document.createElement( "div" );
|
|
|
|
contentDiv.id = "alertDiv" + i;
|
|
|
|
i++;
|
2012-08-10 04:10:46 +08:00
|
|
|
//contentDiv.innerHTML = "<p>" + message + "</p>";
|
|
|
|
contentDiv.innerHTML = message;
|
2012-08-10 02:14:20 +08:00
|
|
|
contentDiv.style.display = "block";
|
|
|
|
target.appendChild( contentDiv );
|
|
|
|
target.hide();
|
2012-08-10 04:10:46 +08:00
|
|
|
target.setAttribute("role","alert");
|
2012-08-10 02:14:20 +08:00
|
|
|
target.show();
|
|
|
|
contentDiv.hide();
|
2012-08-10 04:10:46 +08:00
|
|
|
contentDiv.setAttribute("role","alert");
|
2012-08-10 02:14:20 +08:00
|
|
|
contentDiv.show();
|
|
|
|
}
|
|
|
|
|
|
|
|
function determineBrowser()
|
|
|
|
{
|
|
|
|
return navigator.appName;
|
|
|
|
}
|