function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

if (!window.VK) window.VK = {};
if (!VK.Share) {
  VK.Share = {
    _popups: [],
    _gens: [],
    _base_domain: '',
    _ge: function(id) {
      return document.getElementById(id);
    },
    button: function(gen, but, index) {
      if (!gen) gen = {};
      if (gen === gen.toString()) gen = {url: gen.toString()};
      if (!gen.url) gen.url = VK.Share._loc;

      if (!but) but = {type: 'round'};
      if (but === but.toString()) but = {type: 'round', text: but};
      if (!but.text) but.text = 'Ñîõðàíèòü';

      var old = true, count_style = 'display: none', count_width = 22;
      if (index === undefined) {
        gen.count = 0;
        gen.shared = (but.type == 'button' || but.type == 'round') ? false : true;
        this._gens.push(gen);
        this._popups.push(false);
        index = this._popups.length - 1;
        old = false;
      } else {
        if ((gen.count = this._gens[index].count) && (but.type == 'button' || but.type == 'round')) {
          count_style = '';
          count_width = 29;
        }
        gen.shared = this._gens[index].shared;
        this._gens[index] = gen;
      }

      var head = document.getElementsByTagName('head')[0];
      if (!this._base_domain) {
        for (var elem = head.firstChild; elem; elem = elem.nextSibling) {
          var m;
          if (elem.tagName && elem.tagName.toLowerCase() == 'script' && (m = elem.src.match(/(http:\/\/(?:[a-z0-9_\-\.]*\.)?(?:vk\.com|vkontakte\.ru)\/)js\/api\/share\.js(?:\?|$)/))) {
            this._base_domain = m[1];
          }
        }
      }
      if (!this._base_domain) {
        this._base_domain = 'http://vkontakte.ru/';
      }
      if (!old && (but.type == 'button' || but.type == 'round')) {
        var elem = document.createElement('script');
        elem.src = this._base_domain + 'share.php?act=count&index=' + index + '&url=' + encodeURIComponent(gen.url);
        head.appendChild(elem);
      }
      var a = '<a href="'+this._base_domain+'share.php?url='+encodeURIComponent(gen.url)+'" onmouseup="this._btn=event.button;this.blur();" onclick="return VK.Share.click(' + index + ', this);"', a1 = a+' style="text-decoration:none;">', a2='</a>', a3 = a+' style="display:inline-block;text-decoration:none;">', td1 = '<td style="vertical-align: middle;">', td2 = '</td>';
      if (but.type == 'button' || but.type == 'button_nocount') {
        return '<table cellspacing="0" cellpadding="0" id="vkshare' + index + '" onmouseover="VK.Share.change(1, ' + index + ');" onmouseout="VK.Share.change(0, ' + index + ');" onmousedown="VK.Share.change(2, ' + index + ');" onmouseup="VK.Share.change(1, ' + index + ');" style="position: relative; width: auto; border: 0px;"><tr style="line-height: normal;"><td></td>' +
               td1+a1+'<div style="border: 1px solid #3b6798; cursor:pointer;"><div style="border: 1px solid #5c82ab; border-top-color: #7e9cbc; background-color: #6d8fb3; color: #fff; text-shadow: 0px 1px #45688E; height: 15px; padding: 2px 4px 0px 6px; font-size: 10px; font-family: tahoma;">' + but.text + '</div></div>'+a2+td2 +
               td1+a1+'<div style="background: url(http://vk.com/images/btns.png) 0px 0px no-repeat; cursor:pointer; width:' + count_width + 'px; height: 21px"></div>'+a2+td2 +
               td1+a1+'<div style="border: 1px solid #a2b9d3; cursor:pointer; border-left: 0px; background-color: #dee6f1; color:#000; height: 15px; padding: 2px 6px 0px 4px; font-size: 10px; font-weight: bold; font-family: tahoma;' + count_style + '">' + gen.count + '</div>'+a2+td2 +
               '</tr></table>';
      } else if (but.type == 'round' || but.type == 'round_nocount') {
        return '<table cellspacing="0" cellpadding="0" id="vkshare' + index + '" onmouseover="VK.Share.change(1, ' + index + ');" onmouseout="VK.Share.change(0, ' + index + ');" onmousedown="VK.Share.change(2, ' + index + ');" onmouseup="VK.Share.change(1, ' + index + ');" style="position: relative; width: auto; cursor: pointer; border: 0px;"><tr style="line-height: normal;">' +
               td1+a1+'<div style="height: 21px; cursor:pointer; width: 2px; background: url(http://vk.com/images/btns.png) no-repeat -21px -42px;"></div>'+a2+td2 +
               td1+a1+'<div style="border: 1px solid #3b6798; cursor:pointer; border-left: 0px;"><div style="border: 1px solid #5c82ab; border-left: 0px; border-top-color: #7e9cbc; background-color: #6d8fb3; color: #fff; text-shadow: 0px 1px #45688E; height: 15px; padding: 2px 4px 0px 6px; font-family: tahoma; font-size: 10px;">' + but.text + '</div></div>'+a2+td2 +
               td1+a1+'<div style="background: url(http://vk.com/images/btns.png) 0px -21px no-repeat; cursor:pointer; width:' + count_width + 'px; height: 21px"></div>'+a2+td2 +
               td1+a1+'<div style="border: 1px solid #a2b9d3; border-width: 1px 0px; cursor:pointer; background-color: #dee6f1; color:#000; height: 15px; padding: 2px 6px 0px 4px; font-size: 10px; font-weight: bold; font-family: tahoma;' + count_style + '">' + gen.count + '</div>'+a2+td2 +
               td1+a1+'<div style="background: url(http://vk.com/images/btns.png) -27px -42px; cursor:pointer; width: 2px; height: 21px;' + count_style + '"></div>'+a2+td2 +
               '</tr></table>';
      } else if (but.type == 'link') {
        return '<table style="position: relative; cursor:pointer; width: auto; line-height: normal;" onmouseover="this.rows[0].cells[1].firstChild.firstChild.style.textDecoration=\'underline\'" onmouseout="this.rows[0].cells[1].firstChild.firstChild.style.textDecoration=\'none\'" cellspacing="0" cellpadding="0"><tr style="line-height: normal;">' +
               td1+a1+'<img src="http://vk.com/images/vk16.png" style="vertical-align: middle;border:0;"/>'+a2+td2 +
               td1+a1+'<span style="padding: 0 0 0 5px;">' + but.text + '</span>'+a2+td2 +
               '</tr></table>';
      } else if (but.type == 'link_noicon') {
        return a3+'<span style="position: relative; font-family: tahoma; font-size: 11px; color: #2B587A; line-height: normal;" onmouseover="this.style.textDecoration=\'underline\'" onmouseout="this.style.textDecoration=\'none\'">' + but.text + '</span>'+a2;
      } else {
        return a3+'<span style="position: relative; padding:0;">' + but.text + '</span>'+a2;
      }
    },
    change: function(state, index) {
      var row = this._ge('vkshare' + index).rows[0];
      var elem = row.cells[1].firstChild.firstChild.firstChild;
      if (state == 0) {
        elem.style.backgroundColor = '#6d8fb3';
        elem.style.borderColor = '#7e9cbc #5c82ab #5c82ab';
      } else if (state == 1) {
        elem.style.backgroundColor = '#84a1bf';
        elem.style.borderColor = '#92acc7 #7293b7 #7293b7';
      } else if (state == 2) {
        elem.style.backgroundColor = '#6688ad';
        elem.style.borderColor = '#51779f #51779f #7495b8';
      }
      var left = row.cells[0].firstChild;
      if (left) {
        if (state == 0) {
          left.style.backgroundPosition = '-21px -42px';
        } else if (state == 1) {
          left.style.backgroundPosition = '-23px -42px';
        } else if (state == 2) {
          left.style.backgroundPosition = '-25px -42px';
        }
      }
    },
    click: function(index, el) {
      var e = window.event;
      if (e) {
        if (!e.which && el._btn) e.which = (el._btn & 1 ? 1 : (el._btn & 2 ? 3 : (el._btn & 4 ? 2 : 0)));
        if (e.which == 2) {
          return true;
        }
      }
      var details = this._gens[index];
      if (!details.shared) {
        VK.Share.count(index, details.count + 1);
        details.shared = true;
      }
      var undefined;
      if (details.noparse === undefined) {
        details.noparse = details.title && details.description && details.image;
      }
      details.noparse = details.noparse ? 1 : 0;

      var params = {url: details.url};
      var fields = ['title', 'description', 'image', 'noparse'];
      for (var i = 0; i < fields.length; ++i) {
        if (details[fields[i]]) {
          params[fields[i]] = details[fields[i]];
        }
      }

      var popupName = '_blank';
      var width = 554;
      var height = 349;
      var left = (screen.width - width) / 2;
      var top = (screen.height - height) / 2;
      var url = this._base_domain + 'share.php';
      var popupParams = 'scrollbars=0, resizable=1, menubar=0, left=' + left + ', top=' + top + ', width=' + width + ', height=' + height + ', toolbar=0, status=0';
      var popup = false;
      try {
        var doc_dom = '', loc_hos = '';
        try {
          doc_dom = document.domain;
          loc_hos = location.host;
        } catch (e) {
        }
        if (doc_dom != loc_hos) {
          var ua = navigator.userAgent.toLowerCase();
          if (!/opera/i.test(ua) && /msie/i.test(ua)) {
            throw 'wont work';
          }
        }
        popup = this._popups[index] = window.open('', popupName, popupParams);
        var text = '<form accept-charset="UTF-8" action="' + url + '" method="POST" id="share_form">';
        for (var i in params) {
          text += '<input type="hidden" name="' + i + '" value="' + params[i].toString().replace(/"/g, '&myquot;').replace(/&quot/ig, '&myquot') + '" />';
        }
        text += '</form>';
        text += '<script type="text/javascript">document.getElementById("share_form").submit()</script>';

        text = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' +
               '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">' +
               '<head><meta http-equiv="content-type" content="text/html; charset=windows-1251" /></head>' +
               '<body>' + text + '</body></html>';
        popup.document.write(text);
        popup.blur();
        popup.focus();
      } catch (e) { // ie with changed domain.
        try {
          if (popup) {
            popup.close();
          }
          url += '?';
          for (var i in params) {
            url += encodeURIComponent(i) + '=' + encodeURIComponent(params[i]) + '&';
          }
          popup = this._popups[index] = window.open(url, popupName, popupParams);
          popup.focus();
        } catch (e) {
        }
      }
      return false;
    },
    count: function(index, count) {
      this._gens[index].count = count;
      var elem = this._ge('vkshare' + index);
      if (elem) {
        var row = elem.rows[0];
        if (count) {
          row.cells[3].firstChild.firstChild.innerHTML = count;
          row.cells[2].firstChild.firstChild.style.width = '29px';
          row.cells[3].firstChild.firstChild.style.display = 'block';
          if (row.cells.length > 4) {
            row.cells[4].firstChild.firstChild.style.display = 'block';
          }
        } else {
          row.cells[2].firstChild.firstChild.style.width = '22px';
          row.cells[3].firstChild.firstChild.style.display = 'none';
          if (row.cells.length > 4) {
            row.cells[4].firstChild.firstChild.style.display = 'none';
          }
        }
      }
    }
  }
  try {
    VK.Share._loc = location.toString();
  } catch(e) {
    VK.Share._loc = 'http://vkontakte.ru/';
  }
}

if(window.ODKL===undefined){window.ODKL={P:{w:600,h:360,l:(screen.width/2)-(300),t:(screen.height/2)-(180)},Share:function(c){if(c.tagName.toLowerCase()!="a"){return;}var d=1000;var a=c.className?c.className.toLowerCase():null;if(a){if(a.indexOf("odkl-klass-stat")>-1){d="1";}else{if(a.indexOf("odkl-klass")>-1){d="0";}}}var b=a&&a.indexOf("odkl-current")>-1?window.location.href:c.href;ODKL.OpenShareWnd(d,b);},OpenShareWnd:function(e,b){if(!b||b.length<2){return;}if(b.charAt(b.length-1)=="/"){b=b.substring(0,b.length-1);}var c=ODKL.getShareHost()+"/dk?st.cmd=addShare&st.s="+e+"&st._surl="+encodeURIComponent(b);var a=window.open("","_blank","top="+ODKL.P.t+",left="+ODKL.P.l+",width="+ODKL.P.w+",height="+ODKL.P.h+",resizable=1");var d='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html lang="ru" xml:lang="ru" xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="content-type" content="text/html; charset=UTF-8" /><title>&#1054;&#1076;&#1085;&#1086;&#1082;&#1083;&#1072;&#1089;&#1089;&#1085;&#1080;&#1082;&#1080;.ru Îïï</title></head><body style="margin:0;padding:0;"><div style="width:100%;padding:17px 0;text-align:center;background-color:#F93;color:white;font:normal 14px/16px verdana">&#1055;&#1088;&#1086;&#1080;&#1089;&#1093;&#1086;&#1076;&#1080;&#1090; &#1079;&#1072;&#1075;&#1088;&#1091;&#1079;&#1082;&#1072;...</div></body></html>';a.document.write(d);a.location.href=c;},getShareHost:function(){if(!ODKL.shareUrl){if(!ODKL.HOST){ODKL.shareUrl="http://www.odnoklassniki.ru";}else{var a=ODKL.HOST.substring(0,7);if(a!="http://"){ODKL.shareUrl="http://"+ODKL.HOST;}else{ODKL.shareUrl=ODKL.HOST;}}}return ODKL.shareUrl;},showComments:function(d,a){if(d==null){return;}var c=document.getElementById(d);if(c==null){return;}c.style.position="relative";var f=document.createElement("span");var b=d+"C";f.id=b;c.appendChild(f);f.className="odkl-oc-comment-form";f.innerHTML=commentHtml;if(navigator.userAgent.indexOf("MSIE")>-1){if(navigator.userAgent.indexOf("7.0")||navigator.userAgent.indexOf("6.0")){f.style.height="81px";}f.style.width="192px";}ODKL.positionComments(f);f.style.visibility="visible";var e=f.getElementsByTagName("textarea");if(!window.opera&&e&&e.length>0){e[0].focus();}},postComment:function(d,c){var e=c.parentNode;var a=e.parentNode;var f=a.id;var j=e.getElementsByTagName("textarea");if(j){var g=j[0].value;if(g){g=escape(g);var b=ODKL.createMessageContainer(f,a,true);var i=ODKL.getShareHost()+"/dk?st.cmd=extOneClickLike&drt=1&uid="+f+"&ocsid="+d+"&occmnt="+g;var h=document.createElement("script");h.type="text/javascript";b.appendChild(h);h.src=i;}}return false;},hideComment:function(a){var d=document.getElementById(a);if(!d){return false;}var b=document.getElementById(a+"IF");if(b){d.removeChild(b);}return false;},touchContainer:function(a){if(!window.opera||!a){return;}a.style.position="absolute";window.setTimeout(function(){a.style.position="relative";},10);},commentsPosted:function(a,b){ODKL.hideComment(a);ODKL.showMessage(a,false,b);},submitFailure:function(a,c,b){ODKL.showMessage(a,true,c,b);},showMessage:function(f,g,h,a){var b=document.getElementById(f);var i=a==="c"?document.getElementById(f+"IF"):null;var d=f+"M";var e=document.getElementById(d);if(e){window.setTimeout(function(){b.removeChild(e);},500);}var c=document.createElement("span");c.id=d;c.className="odkl-oc-cmnt-hidden";b.insertBefore(c,b.firstChild);c.innerHTML=h;c.className=g?"odkl-oc-cmnt-err":"odkl-oc-cmnt-ok";ODKL.positionMessage(c,i,b);window.setTimeout("ODKL.hideMessage('"+d+"');",3000);},hideMessage:function(a){if(!a){return false;}var c=document.getElementById(a);if(c){c.style.display="none";var b=c.parentNode;b.removeChild(c);}return false;},positionMessage:function(l,q,b){var o=ODKL.getDistances(l);var g=240;var e=l.offsetHeight;var p="0px";var n;var a;var d;var k;var f=navigator.userAgent;if(navigator.userAgent.indexOf("Firefox")>-1){n="26px";a="26px";d="121px";k="123px";}else{if(navigator.userAgent.indexOf("Chrome")>-1){n="25px";a="25px";d="120px";k="121px";}else{if(navigator.userAgent.indexOf("MSIE")>-1){a="26px";k="120px";if(document.documentMode){if(document.documentMode==5){n="29px";d="122px";}else{if(document.documentMode==8){n="26px";d="124px";}else{n="26px";d="120px";}}}else{n="23px";d="100px";}}else{if(navigator.userAgent.indexOf("Opera")>-1){n="25px";a="26px";d="122px";k="124px";}else{if(navigator.userAgent.indexOf("Safari")>-1){n="24px";a="24px";d="120px";k="123px";}else{n="27px";a="22px";d="108px";k="120px";}}}}}if(!q){var m=ODKL.getPositionFlag(o,g,e);ODKL.assignDefaultPosition(l,m,n,p,a,"0px");return;}var c=ODKL.getDistances(q);if(c.top<o.top){o.top=c.top-e;}if(c.bottom<o.bottom){o.bottom=c.bottom-e;}if(c.left<o.left){o.left=c.left;}else{if(c.right>o.right){o.right=c.right;}}var i=ODKL.getAbsPosition(q.parentNode);var h=(i.y-c.top)>0;var m=ODKL.getPositionFlag(o,g,e,h);var j=false;switch(m){case 1:case 10:case 11:case 20:case 30:j=h;break;default:j=!h;}if(j){ODKL.assignDefaultPosition(l,m,d,p,k,"0px");}else{ODKL.assignDefaultPosition(l,m,n,p,a,"0px");}},positionComments:function(e){var c=ODKL.getDistances(e.parentNode);if(!c){e.style.bottom="27px";e.style.left="0px";}var b=210;var a=100;var d=ODKL.getPositionFlag(c,b,a);ODKL.assignDefaultPosition(e,d,"25px","0px","27px","0px");},assignDefaultPosition:function(f,c,e,b,a,d){switch(c){case 2:case 3:f.style.left=d;f.style.top=e;f.style.right="auto";f.style.bottom="auto";break;case 22:f.style.right=b;f.style.top=e;f.style.left="auto";f.style.bottom="auto";break;case 20:case 30:f.style.right=b;f.style.bottom=a;f.style.left="auto";f.style.top="auto";break;case 1:case 11:case 10:default:f.style.left=d;f.style.bottom=a;f.style.right="auto";f.style.top="auto";}},getPositionFlag:function(a,d,c,f){var e=0;var b=0;if(a.right&&d<a.right){e=1;}else{if(a.left&&d<a.left){e=20;}}if(f){if(a.top&&c<a.top){b=10;}else{if(a.bottom&&c<a.bottom){b=2;}}}else{if(a.bottom&&c<a.bottom){b=2;}else{if(a.top&&c<a.top){b=10;}}}return e+b;},getDistances:function(d){var f=ODKL.getAbsPosition(d);var e;var a;if(window.innerWidth){e=window.innerWidth,a=window.innerHeight;}else{if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientWidth!=0){e=document.documentElement.clientWidth,a=document.documentElement.clientHeight;}else{e=document.body.offsetWidth,a=document.body.offsetHeight;}}var b=new Object();b.left=f.x;b.top=f.y;b.right=e-f.x-d.offsetWidth;b.bottom=a-f.y-d.offsetHeight;return b;},getAbsPosition:function(a){var d=new Object();d.x=0;d.y=0;if(a==null){return d;}if(a.getBoundingClientRect){var b=a.getBoundingClientRect();d.x=b.left;d.y=b.top;}else{while(a!=null&&a!=document.body){d.x+=a.offsetLeft;d.y+=a.offsetTop;a=a.offsetParent;}d.x-=document.body.scrollLeft;d.y-=document.body.scrollTop;}return d;},updateCountForVoted:function(e,f,d){if(e==null||f==null){return;}var c=document.getElementById(e);if(c==null){return;}if(isNaN(f)||f<0){c.parentNode.className="odkl-klass-stat";c.innerHTML="0";}else{var a=c.parentNode;var g=document.createElement("span");a.parentNode.insertBefore(g,a);a.style.display="none";a.parentNode.removeChild(a);var b=ODKL.getBtnType(a);if(b==null){return;}g.id=e;g.className="odkl-"+b+"-oc-voted";g.innerHTML=d;}},votePostProcess:function(c,b){var d=document.getElementById(c);if(d==null){return;}var f=document.getElementById(c+"IF");if(f==null){return;}var e=document.createElement("span");d.insertBefore(e,f);var a=ODKL.getBtnType(d);if(a==null){return;}e.className="odkl-"+a+"-oc-voted";e.innerHTML=b;f.style.width="206px";f.style.height="91px";f.style.zIndex="999";d.style.width="auto";ODKL.positionComments(f);},updateCountOC:function(e,g,a,d){var c=document.getElementById(e);ODKL.updateCount(e,g);if(!a||a=="0"||ODKL.commScriptNA){var f=c?c.parentNode:null;if(f!=null){var b=ODKL.getBtnType(f);if(b==null){b="odkl-klass-stat";}f.className="odkl-"+b+"-stat";}}else{ODKL.prepareVotingButton(e);return;}},logMsg:function(b){if(ODKL.debug){try{console.log(b);}catch(a){}}},prepareVotingButton:function(a){if(window.ODKL_COM===undefined){if(!ODKL.loaderId){ODKL.loadCommScript();}if(!ODKL.postponedBtns){ODKL.postponedBtns=new Array();}ODKL.postponedBtns.push(a);return;}ODKL.createFrameButton(a);},loadCommScript:function(){var b=document.createElement("script");b.type="text/javascript";document.body.appendChild(b);var a=ODKL.HOST;if(!a){a="stg.odnoklassniki.ru";}b.src="http://"+a+"/share/odkl_com.js";document.body.appendChild(b);ODKL.logMsg("Comm script load started");ODKL.loaderId=window.setInterval(function(){if(window.ODKL_COM===undefined){return;}ODKL.logMsg("Comm script loaded");window.clearInterval(ODKL.loaderId);ODKL.loaderId=null;if(ODKL.postponedBtns){ODKL.processCollectedFBtns();ODKL.postponedBtns=null;}},100);window.setTimeout(function(){if(ODKL.loaderId){if(window.ODKL_COM!==undefined){ODKL.logMsg("Comm script loaded after timeout");ODKL.processCollectedFBtns();}else{ODKL.logMsg("Comm script NOT loaded, making all buttons regular");ODKL.commScriptNA=true;if(!ODKL.postponedBtns){return;}for(var d=0;d<ODKL.postponedBtns.length;d++){var f=ODKL.postponedBtns[d];var c=document.getElementById(f);var e=c?c.parentNode:null;if(e!=null){e.className="odkl-klass-stat";}}ODKL.postponedBtns=null;}}},2000);},getBtnType:function(a){if(!a.className){return null;}if(a.className.indexOf("odkl-klass-oc")>-1){return"klass";}else{if(a.className.indexOf("odkl-share-oc")>-1){return"share";}else{return null;}}},createFrameButton:function(g){var a=document.getElementById(g);var i=a.parentNode;var f=ODKL.getBtnType(i);if(f==null){return;}var b=i.href;if(!b){ODKL.logMsg("No href provided for counter with ID: %d",g);return;}if(b.charAt(b.length-1)=="/"){b=b.substring(0,b.length-1);}var k=i.offsetWidth+"px";var d=document.createElement("span");d.style.width=k;d.className="odkl-"+f+"-oc-fc-hidden";var c=document.createElement("iframe");c.scrolling="no";c.frameBorder=0;var h=g+"IF";c.id=h;c.name=h;d.appendChild(c);a.id=null;d.id=g;i.parentNode.insertBefore(d,i);var e=function(){ODKL_COM.setupFrameListener(ODKL.buttonListener,h,ODKL.getShareHost());if(i.parentNode){i.parentNode.removeChild(i);}d.className="odkl-"+f+"-oc-fc";};ODKL.addOnLoadListener(c,e);var j=ODKL.getShareHost()+"/dk?st.cmd=extOneClickLike&drt=2&uid="+g+"&bt="+f+"&ref="+encodeURIComponent(b);c.src=j;},buttonListener:function(event){if(event.data){eval(event.data);}},processCollectedFBtns:function(){if(!ODKL.postponedBtns){return;}for(var a=0;a<ODKL.postponedBtns.length;a++){ODKL.createFrameButton(ODKL.postponedBtns[a]);}},updateCount:function(b,c){if(b==null||c==null){return;}var a=document.getElementById(b);if(a==null){return;}if(isNaN(c)||c<0){a.innerHTML="0";}else{a.innerHTML=c;}},getStatNodes:function(d){if(document.getElementsByClassName){return document.getElementsByClassName(d);}if(document.getElementsByTagName){var c=document.getElementsByTagName("a");var a=new Array();for(var b=0;b<c.length;b++){var e=c[b].className;if(e&&e.toLowerCase().indexOf(d)>-1){a.push(c[b]);}}return a;}return null;},initBtns:function(g,c,o){var f=ODKL.getShareHost()+"/dk?st.cmd="+g+"&uid=";var k=ODKL.getStatNodes(c);if(k==null){return;}for(var j=0;j<k.length;j++){var n=k[j];var h=n.className?n.className.toLowerCase():null;var d=h&&h.indexOf("odkl-current")>-1?window.location.href:n.href;if(d==null){continue;}if(d.charAt(d.length-1)=="/"){d=d.substring(0,d.length-1);}var b;var e=n.getElementsByTagName("span");if(e&&e.length>0){b=e[0];}else{b=document.createElement("span");n.appendChild(b);b.innerHTML="0";}if(b.style.width!=""){b.style.width="";}if(b.id){continue;}b.id=o+j;var l=f+b.id+"&ref="+encodeURIComponent(d);var m=document.createElement("script");m.type="text/javascript";b.appendChild(m);m.src=l;}},addOnLoadListener:function(b,a){if(b.addEventListener){b.addEventListener("load",a,false);}else{if(b.attachEvent){b.attachEvent("onload",a);}else{if(document.getElementById){b.onload=a;}}}},init:function(a){if(ODKL.initialized){return;}ODKL.P.requests=null;if(typeof(a)=="string"){ODKL.HOST=a;}else{ODKL.HOST=null;}ODKL.initBtns("extLike","odkl-klass-stat","odklcnt");ODKL.initBtns("extOneClickLike","odkl-klass-oc","odklock");ODKL.initBtns("extOneClickLike","odkl-share-oc","odklocs");ODKL.initialized=true;}};}
