function sed_javascript($more='')
{
	$result = "<script type=\"text/javascript\">
<!--

function popup(code,w,h) {
	var l = 'plug.php?o=_CODE_';
	l = l.replace('_CODE_', code);
	window.open(l,'','toolbar=0,location=0,directories=0,menuBar=0,resizable=0,scrollbars=yes,width='+w+',height='+h+',left=32,top=16');
}

function pfs(id,c1,c2) {
	var l = 'pfs.php?userid=_ID_&c1=_C1_&c2=_C2_';
	l = l.replace('_ID_', id);
	l = l.replace('_C1_', c1);
	l = l.replace('_C2_', c2);
	window.open(l,'PFS','status=1, toolbar=0,location=0,directories=0,menuBar=0,resizable=1,scrollbars=yes,width=754,height=512,left=32,top=16');
}

function help(rcode,c1,c2) {
	var l = 'plug.php?h=_RCODE_&c1=_C1_&c2=_C2_';
	l = l.replace('_RCODE_', rcode);
	l = l.replace('_C1_', c1);
	l = l.replace('_C2_', c2);
	window.open(l,'Help','toolbar=0,location=0,directories=0,menuBar=0,resizable=0,scrollbars=yes,width=480,height=512,left=32,top=16');
}

function comments(rcode) {
	var l = 'plug.php?id=_RCODE_';
	l = l.replace('_RCODE_', rcode);
	window.open(l,'Comments','toolbar=0,location=0,directories=0,menuBar=0,resizable=0,scrollbars=yes,width=480,height=512,left=16,top=16');
}

function ratings(rcode) {
	var l = 'ratings.php?id=_RCODE_';
	l = l.replace('_RCODE_', rcode);
	window.open(l,'Ratings','toolbar=0,location=0,directories=0,menuBar=0,resizable=0,scrollbars=yes,width=480,height=512,left=16,top=16');
}

function polls(rcode) {
	var l = 'polls.php?id=_RCODE_';
	l = l.replace('_RCODE_', rcode);
	window.open(l,'Polls','toolbar=0,location=0,directories=0,menuBar=0,resizable=0,scrollbars=yes,width=608,height=448,left=16,top=16');
}

function pollvote(rcode,rvote) {
	var l = 'polls.php?a=send&id=_RCODE_&vote=_RVOTE_';
	l = l.replace('_RCODE_', rcode);
	l = l.replace('_RVOTE_', rvote);
	window.open(l,'Polls','toolbar=0,location=0,directories=0,menuBar=0,resizable=0,scrollbars=yes,width=608,height=448,left=16,top=16');
}

function picture(url,sx,sy) {
	var l = 'pfs.php?m=view&v=_URL';
	l = l.replace('_URL_', url);
	window.open(l,'Picture','toolbar=0,location=0,directories=0,menuBar=0,resizable=1,scrollbars=yes,width='+sx+',height='+sy+',left=0,top=0');
}

function redirect(url)
	{ location.href = url.options[url.selectedIndex].value; }

function toggleblock(id)
	{
	var bl = document.getElementById(id);
	if(bl.style.display == 'none')
		{ bl.style.display = ''; }
	else
		{ bl.style.display = 'none'; }
	}

window.name='main';

".$more."

//-->
</script>";
	return ($result);
}