uz.helper.callback = {
	reputationView : function(o){
		_uParseXML(o,_uWnd.getbyname('Rh'));
		$('div[id^="mmtx"]',w.wnd).each(function(){this.innerHTML=this.innerHTML.replace(/(http:\/\/[^\s"]+)/,'<a href="$1">[ просмотреть тему ]</a>')})
	},
	reputationDo : function(o){
		_uParseXML(o,_uWnd.getbyname('Rd'));
		if(uz.helper.reputation.type=='minus'&&uz.helper.cUser.groupID>1){
			$('#a2').attr('disabled',true);
			$('#a1').attr('checked',true);
			if(typeof uz.helper.reputation.pid!='undefined')
				$('textarea[name="reason"]',w.wnd).val('Тьфу на тебя, за твое сообщение')
		}
		if(uz.helper.reputation.type=='plus'||(uz.helper.reputation.type=='minus'&&uz.helper.cUser.groupID==1)){
			$('#a1').attr('disabled',true);
			$('#a2').attr('checked',true);
			if(typeof uz.helper.reputation.pid!='undefined')
				$('textarea[name="reason"]',w.wnd).val('Спасибо за полезное сообщение!')
		}
		if(typeof uz.helper.reputation.pid!='undefined' && confirm('Вы уверены?'))
			$('#submfrm981').click()
	},
	
	ajaxWindows :function(o){
		if(typeof o=='string'){
			var a=o.match(/<title>(.+)<\/title>/i),
				w=_uWnd.getbyname('AJAXLayer');
			o=o.replace(/<div class="pbarContainer" title="Сообщений \d* из \d*"><div class="pbarFiller" style="width:\d*%;"><\/div><\/div>/i,'');
			if(a)w.setTitle(RegExp.$1);
			if(o.toLowerCase().indexOf('<body>')!=-1)
				o=o.substring(o.toLowerCase().indexOf('<body>')+6,o.toLowerCase().indexOf('</body>')).replace(/addform/ig,'ajaxAddform').replace(/emoticon/ig,'ajaxEmoticon');
			w.content($('#ajaxLayerContent',o).size()?$('#ajaxLayerContent',o).html():o);
			uz.helper.bindWinOpen($('div.myWinCont a[href!="javascript://"]:not(.noAjax):not([target="_blank"]),a.pmCatLink',w.wnd));
			return
		}
	}
}

