	<div id="modlayer" style="display: none;position:position">
		<input type="hidden" name="optgroup" />
		<input type="hidden" name="operation" />
		<a class="collapse" href="javascript:;" onclick="$('modlayer').className='collapsed'"><img src="{IMGDIR}/collapsed_yes.gif" alt="{lang zoom_out}" title="{lang zoom_out}" /></a>
		<label><input class="checkbox" type="checkbox" name="chkall" onclick="if(!($('modcount').innerHTML = modclickcount = checkall(this.form, 'moderate'))) {$('modlayer').style.display = 'none';}" /> {lang checkall}</label>
		<span>{lang admin_select}</span><strong onmouseover="$('moremodoption').style.display='block'" onclick="$('modlayer').className=''" id="modcount"></strong><span>{lang piece}: </span>
		<strong><a href="javascript:;" onclick="modthreads(3, 'delete');return false;">{lang delete}</a></strong>
		<span class="pipe">|</span>
		<strong><a href="javascript:;" onclick="modthreads(2, 'move');return false;">{lang thread_moved}</a></strong>
		<span class="pipe">|</span>
		<strong><a href="javascript:;" onclick="modthreads(2, 'type');return false;">{lang types}</a></strong>
		
		<div id="moremodoption">
			<hr class="solidline" />
			<a href="javascript:;" onclick="modthreads(1, 'stick');return false;">{lang thread_stick}</a>
			<a href="javascript:;" onclick="modthreads(1, 'highlight');return false;">{lang thread_highlight}</a>
			<a href="javascript:;" onclick="modthreads(1, 'digest');return false;">{lang thread_digest}</a>
			<!--{if $forum['modrecommend']['open'] && $forum['modrecommend']['sort'] != 1}-->
				<a href="javascript:;" onclick="modthreads(1, 'recommend');return false;">{lang recommend}</a>
			<!--{/if}-->
			<span class="pipe">|</span>
			<a href="javascript:;" onclick="modthreads(3, 'bump');return false;">{lang admin_bump_down}</a>
			&nbsp;
			<a href="javascript:;" onclick="modthreads(4);return false;">{lang admin_openclose}</a>
		</div>
	</div>
	<script type="text/javascript">
		modclickcount = 0;
		function modclick(obj) {
			if(obj.checked) {
				modclickcount++;
			} else {
				modclickcount--;
			}
			$('modcount').innerHTML = modclickcount;
			if(modclickcount > 0) {
				var top_offset = obj.offsetTop;
				while((obj = obj.offsetParent).id != 'threadlist') {
					top_offset += obj.offsetTop;
				}
				$('modlayer').style.top = top_offset - 7 + 'px';
				$('modlayer').style.display = '';
			} else {
				$('modlayer').style.display = 'none';
			}
		}
		function modthreads(optgroup, operation) {
			var checked = 0;
			var operation = !operation ? '' : operation;
			for(var i = 0; i < $('moderate').elements.length; i++) {
				if($('moderate').elements[i].name.match('moderate') && $('moderate').elements[i].checked) {
					checked = 1;
					break;
				}
			}
			if(!checked) {
				alert('{lang admin_select_required}');
			} else {
				floatwinreset = 1;
				floatwin('open_mods', '', 250, optgroup < 2 ? 365 : 215);
				$('moderate').optgroup.value = optgroup;
				$('moderate').operation.value = operation;
				$('floatwin_mods').innerHTML = '';
				ajaxpost('moderate', 'floatwin_mods', '');
			}
		}
	</script>
