		function win(url,w,h,wname){
			window.open (url,wname,'titlebar=no,toolbar=no,width=' + w + ', height=' + h + ' ,directories=no,status=no,scrollbars=no, resize=no,menubar=no');
		}

		function SelectAll(mark)
		{
				for (i = 0; i < document.publist.elements.length; i++)
				{
					var item=document.publist.elements[i];
					if (item.name == "d[]")
					{
						item.checked = mark;
					}
				}
		}

		function show_message(id) 
		{
			d = layer(id);
			if (!d) return;
			if (d.css.display && d.css.display == 'none'){
				d.css.display = 'block';
				posx = getScrollX() + 0.5*(getWindowWidth()  - d.getWidth() );
				posy = getScrollY() + 0.5*(getWindowHeight() - d.getHeight());
				d.moveTo(posx, posy);
			}
			else d.css.display = 'none';
		}
		
		function fillEditForm(fid,fname,fdescr){
			document.getElementById('editFormId').value = fid;
			document.getElementById('editFormName').value = fname;
			document.getElementById('editFormDescription').value = fdescr;
			show_message('editForumLayer');

		}
function MSG_OnReply(pid){
	if (!(d = document.getElementById('replydiv'+pid))) return;
	d.className = (d.className == 'show') ? 'hide' : 'show';
}