/*
**	Javascript utilities, Copyright (C) 2000-2005 Alcontex GmbH, Baar. No rocket science, use at will. No warranty.
**	$Revision: 1820 $
*/
function win(x,y,w,h,url,name)
{
w+=20; h+=10;
if (w>900) w=900;
if (h>750) h=750;
w=window.open(url,name,'status=yes,scrollbars=yes,resizable=yes,width='+w+',height='+h+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
if (w) w.focus();
return w;
}
function reload_parent()
{
parent.location.href = parent.location.href;//.replace(/\?[0-9]*$/, new Date().getTime())
}
function win_imsg_read(id)
{
return win(64,50,420,260,'/code/imsg-read.html?id='+id,'_blank');
}
function win_imsg_thread(peer)
{
win(100,50,520,520,'/code/imsg-thread.html?peer='+peer,'_blank');
return false;
}
function win_imsg_send(to)
{
win(100,200,536,286,'/code/imsg-send.html?to='+to,'_blank');
return false;
}
function dreload()
{
setTimeout('location.reload()', 5000);
}
function playsound(sound)
{
var obj;
if (document.all)
document.all.sound.src = sound;
else if ((obj = document.getElementById('sound')))
obj.innerHTML = '<embed class="sound" type="audio/x-wav" autostart="true" loop="false" volume="90" src="' + sound + '" />';
}
