$pfs_header1 = $cfg['doctype']."<html><head>
<title>".$cfg['maintitle']."</title>".sed_htmlmetas()."
<script type=\"text/javascript\">
<!--
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 addthumb(gfile,c1,c2)
	{ opener.document.".$c1.".".$c2.".value += '[thumb=".$cfg['th_dir_user']."'+gfile+']'+gfile+'[/thumb]'; }
function addpix(gfile,c1,c2)
	{ opener.document.".$c1.".".$c2.".value += '[img]'+gfile+'[/img]'; }
function addfile(gfile,c1,c2)
	{ opener.document.".$c1.".".$c2.".value += '[pfs]".$cfg['rel_dir_user']."'+gfile+'[/pfs]'; }
function addglink(id,c1,c2)
	{ opener.document.".$c1.".".$c2.".value += '[gallery='+id+']".$L["pfs_gallery"]." #'+id+'[/gallery]'; }

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 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 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');
}

//-->
</script>
";