<div id="pm_info">
	Личные сообщения <a id="pm_count" href="{url href=$pm.path}">{$pm.umess}/{$pm.mess}</a>
</div>
<script type="text/javascript">
	pm_status_url='{url href=$pm.path type="json"}';
	if (typeof(MooTools)=='object')
	{
		window.addEvent('domready', function(){
					if ('undefined'!=typeof(pm_status_url)) checkTimer=setInterval(function(){ updatePmInfo(); },10000);
				});
	}
	function updatePmInfo()
	{
		var myXhr = new Request.JSON({
				url:pm_status_url,
				method: 'post',
				onSuccess:function(result){ if(!result.error) $('pm_count').set('html', result.umess+'/'+result.mess); }
				}).send('action=status');
	}

</script>