function sendShout(formObj)
{
Shout = formObj.shout.value

if (Shout.replace(/ /g, '') == '')
{
alert('Write a message before posting!')
return false
}

sb_Clear();

var ajax = new tbdev_ajax();

ajax.onShow ('');

var varsString = "";

ajax.requestFile = "shoutbox.php";

ajax.setVar("do", "shout");

ajax.setVar("shout", escape(Shout));

ajax.method = 'GET';

ajax.element = 'shoutbox';

ajax.sendAJAX(varsString);

return false;
}

function getShouts()
{
var ajax = new tbdev_ajax();

ajax.onShow = function() { };

var varsString = "";

ajax.requestFile = "shoutbox.php";

ajax.method = 'GET';

ajax.element = 'shoutbox';

ajax.sendAJAX(varsString);

setTimeout('getShouts()', 10000);

return false;
}

function getWOL()
{
var ajax = new tbdev_ajax();

ajax.onShow = function() { };

var varsString = "";

ajax.requestFile = "shoutbox.php";

ajax.method = 'GET';

ajax.setVar("wol", 1);

ajax.element = 'wol';

ajax.sendAJAX(varsString);

setTimeout('getWOL()', 10000);

return false;
}

function sb_Clear()
{
document.forms["shoutform"].shout.value = '';

return true;
}

function deleteShout(id)
{
if (confirm("Do you whant to Delete this message ?"))
{
var ajax = new tbdev_ajax();

ajax.onShow = function() { };

var varsString = "";

ajax.requestFile = "shoutbox.php";

ajax.setVar("do", "delete");

ajax.setVar("id", id);

ajax.method = 'GET';

ajax.element = 'shoutbox';

ajax.sendAJAX(varsString);
}

return false;
}

function editShout(id) {
var edit = window.open( "shoutbox.php?do=edit&id=" + id, "myWindow", "status = 1, height = 300, width = 650, resizable = 0" );
clearTimeout(getshouts);
}

 function Fermer()
 {
 opener=self;
 self.close();
 } 

 



getShouts();

getWOL();