// JavaScript Document
/*

Здесь будут находится все новые функции. Я буду стараться делать их по возможности универсальными, чтобы не выполнять одну и ту же работу многократно.

*/

function refresh_chat()
{
	document.all.chat.src='chat_frame.php';
}


function timedRefresh(timeoutPeriod) {
    setTimeout("location.reload(true);",timeoutPeriod);
}

function pasteUsername(name) {
	window.frames['send'].document.getElementById('message').focus();
	window.frames['send'].document.getElementById('message').value=name+': ';

}

function editBox ($id, $oldstatus, $userid)
{
  document.getElementById($id).innerHTML="<form action='edit_status.php?postid="+$id+"' method='POST'><input type='text' name='status' value='"+$oldstatus+"'><input type='hidden' name='userid' value='"+$userid+"'><input type='submit' value='OK'></form>";
}

