var curr = 1;
/*XHConn*/
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('d y(){J 0,8=5;b{0=f h("s.j")}7(e){b{0=f h("u.j")}7(e){b{0=f v()}7(e){0=5}}}6(!0)3 E;l.B=d(a,2,9,g){6(!0)3 5;8=5;2=2.C();b{6(2=="G"){0.k(2,a+"?"+9,c);9=""}I{0.k(2,a,c);0.i("m","n "+a+" p/1.1");0.i("q-r","t/x-w-F-D")}0.H=d(){6(0.o==4&&!8){8=c;g(0)}};0.A(9)}7(z){3 5}3 c};3 l}',46,46,'xmlhttp||sMethod|return||false|if|catch|bComplete|sVars|sURL|try|true|function||new|fnDone|ActiveXObject|setRequestHeader|XMLHTTP|open|this|Method|POST|readyState|HTTP|Content|Type|Msxml2|application|Microsoft|XMLHttpRequest|www||XHConn||send|connect|toUpperCase|urlencoded|null|form|GET|onreadystatechange|else|var'.split('|'),0,{}))
function _(e) {return document.getElementById(e) ? document.getElementById(e) : false;}
/*Cookies */ 
function createCookie(name,value,days) {if (days) {var date = new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires = "; expires="+date.toGMTString();}else var expires = "";document.cookie = name+"="+value+expires+"; domain=."+domain+"; path=/";}
function readCookie(name) {var nameEQ = name + "=";var ca = document.cookie.split(';');for(var i=0;i < ca.length;i++) {var c = ca[i];while (c.charAt(0)==' ') c = c.substring(1,c.length);if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);}return null;}
/*cancel event bubbling */
function stopB(e){if(!e)e=window.event;e.cancelBubble=true;}
function mbd_rotate(dir){mbd_curr=(dir==2)?(curr+1):((dir==1)?((curr>1)?(curr-1):curr):curr);if (_('mbd_'+mbd_curr) && mbd_curr != curr) {_('mbd_'+curr).style.display='none';_('mbd_'+mbd_curr).style.display='block';_('mbd_next').className=(mbd_curr>curr && !(_('mbd_'+(mbd_curr+1)))) ? _('mbd_next').className+' pic_dis' : 'pic_next' ;_('mbd_prev').className = (mbd_curr < curr && !(_('mbd_'+(mbd_curr-1)))) ? _('mbd_prev').className+' pic_dis' : 'pic_prev mrt_small2';curr=mbd_curr;}return false;}			
function getClientHeight(block_id) { return _(block_id).clientHeight; }
function switchTheme( id, docid, tabname, func, showText ){	var Aj = new XHConn();Aj.connect("/exec/micro/switchTheme.php","POST","id="+id+"&docid="+docid+"&tabname="+tabname+"&func="+func,function(res){if(res && res.responseText){if (showText) {_('switchThemeCount'+showText).innerHTML=res.responseText;}else{_('switchTheme'+id).innerHTML=res.responseText;} }});}
function send(id) {new ajax("/send/", {postBody: "a=" + id, onComplete: function (res) {} });return false;}
function sendComplain( table_id, usernick ) {if(confirm('Вы уверенны, что хотите сообщить администрации сайта о том, что пользователь "' + usernick + '" нарушает Правила комментирования и размещения контента?')){new ajax("/exec/complain.php", {postBody: "table_id=" + table_id + "&item_id=" + comment_itemID + "&tablename=" + comment_tablename, onComplete: function (res) {_('complain_link_'+table_id).style.display='none';_('complain_margin_'+table_id).style.display='none';alert('Спасибо за сотрудничество!'+"\n"+'Сообщение о нарушении было отправлено и будет рассмотрено администрацией в ближайшее время');}});}    return false;}
function truncate_ul_block( div_id, ul_id, height ){
if (!height) height = 0;
var ul= _(div_id);
var ul_height=getClientHeight(div_id)+height;
var div_height=getClientHeight(ul_id);
if (parseInt(ul.getElementsByTagName('li').length) != 0 ){
  while (ul_height > div_height){
	var ddos = parseInt(ul.getElementsByTagName('li').length) - 1;
	if (ddos > 0 ){
	  _(div_id).removeChild(_(div_id).getElementsByTagName('li')[ddos]);
      ul_height=getClientHeight(div_id)+height;
      div_height=getClientHeight(ul_id);
	}
  }
}}
function truncate_text(h_title, h_news, height, detail_id){
  String.prototype.cut = function(){return this.substring(0, this.lastIndexOf(" "));};
  if (!height) height = 125;
  title=getClientHeight(h_title);
  news=getClientHeight(h_news);
  str=_(h_news).innerHTML;
  while( (title + news) > height ){
	str = str.cut();
	_(h_news).innerHTML = str + "...";
	title = getClientHeight(h_title);
	news  = getClientHeight(h_news);
	if (str.length == 0){ 
	  str = "";
	  _(h_news).innerHTML = str;
	  break;
	}
  }
  if(_(detail_id)) _(h_news).innerHTML=_(h_news).innerHTML+' '+_(detail_id).innerHTML;
}

ffvinc.counter = 0;
ffvinc.classNames = new Array('1.2', '1.4');
function ffvinc($){
  _('0097f').style.fontSize=(function(){
	return function (){
	  if ($ == "+"){
		ffvinc.counter++;
		if ( ffvinc.counter < ffvinc.classNames.length){
		  _("fav").src = "http://k.img.com.ua/static/img/korr-plus-na.gif";
		  _("minus").src = "http://k.img.com.ua/static/img/korr-minus.gif";
		  return ffvinc.classNames[ffvinc.counter]
		}else{
		  ffvinc.counter = ffvinc.classNames.length - 1;
		  return ffvinc.classNames[ffvinc.counter]
	    }
	  }
	  if ($ == "-"){
		ffvinc.counter--;
		if ( ffvinc.counter > 0 ){
		  return ffvinc.classNames[ffvinc.counter]
		}else{
		  _("fav").src = "http://k.img.com.ua/static/img/korr-plus.gif";
		  _("minus").src = "http://k.img.com.ua/static/img/korr-minus-na.gif";
		  ffvinc.counter = 0;
		  return ffvinc.classNames[ffvinc.counter]
		}
	  }
	}();
  })()+"em";
}