if(!window.VK){window.VK={}}if(!VK.Share){VK.Share={_popups:[],_gens:[],_base_domain:"",_ge:function(a){return document.getElementById(a)},button:function(d,f,e){if(!d){d={}}if(d===d.toString()){d={url:d.toString()}}if(!d.url){d.url=location.toString()}if(!f){f={type:"round"}}if(f===f.toString()){f={type:"round",text:f}}if(!f.text){f.text="Сохранить"}var a=true,h="display: none",i=22;if(e===undefined){d.count=0;d.shared=(f.type=="button"||f.type=="round")?false:true;this._gens.push(d);this._popups.push(false);e=this._popups.length-1;a=false}else{if((d.count=this._gens[e].count)&&(f.type=="button"||f.type=="round")){h="";i=29}d.shared=this._gens[e].shared;this._gens[e]=d}var g=document.getElementsByTagName("head")[0];if(!this._base_domain){for(var c=g.firstChild;c;c=c.nextSibling){var b;if(c.tagName&&c.tagName.toLowerCase()=="script"&&(b=c.src.match(/(http:\/\/(?:[a-z0-9_\-]*\.)?(?:vk\.com|vkontakte\.ru)\/)js\/api\/share\.js(?:\?|$)/))){this._base_domain=b[1]}}}if(!this._base_domain){this._base_domain="http://vkontakte.ru/"}if(!a&&(f.type=="button"||f.type=="round")){var c=document.createElement("script");c.src=this._base_domain+"share.php?act=count&index="+e+"&url="+encodeURIComponent(d.url);g.appendChild(c)}if(f.type=="button"||f.type=="button_nocount"){return'<table cellspacing="0" cellpadding="0" id="vkshare'+e+'" onmouseover="VK.Share.change(1, '+e+');" onmouseout="VK.Share.change(0, '+e+');" onmousedown="VK.Share.change(2, '+e+');" onmouseup="VK.Share.change(1, '+e+');" onclick="VK.Share.click('+e+');" style="width: auto; cursor: pointer; border: 0px;"><tr style="line-height: normal;"><td></td><td style="vertical-align: middle;"><div style="border: 1px solid #3b6798;"><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;">'+f.text+'</div></div></td><td style="vertical-align: middle;"><div style="background: url(http://vk.com/images/btns.png) 0px 0px no-repeat; width:'+i+'px; height: 21px"></div></td><td style="vertical-align: middle;"><div style="border: 1px solid #a2b9d3; border-left: 0px; background-color: #dee6f1; height: 15px; padding: 2px 4px 0px 2px; font-size: 10px; font-family: tahoma;'+h+'">'+d.count+"</div></td></tr></table>"}else{if(f.type=="round"||f.type=="round_nocount"){return'<table cellspacing="0" cellpadding="0" id="vkshare'+e+'" onmouseover="VK.Share.change(1, '+e+');" onmouseout="VK.Share.change(0, '+e+');" onmousedown="VK.Share.change(2, '+e+');" onmouseup="VK.Share.change(1, '+e+');" onclick="VK.Share.click('+e+');" style="width: auto; cursor: pointer; border: 0px;"><tr style="line-height: normal;"><td style="vertical-align: middle;"><div style="height: 21px; width: 2px; background: url(http://vk.com/images/btns.png) no-repeat -21px -42px;"></div></td><td style="vertical-align: middle;"><div style="border: 1px solid #3b6798; 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;">'+f.text+'</div></div></td><td style="vertical-align: middle;"><div style="background: url(http://vk.com/images/btns.png) 0px -21px no-repeat; width:'+i+'px; height: 21px"></div></td><td style="vertical-align: middle;"><div style="border: 1px solid #a2b9d3; border-width: 1px 0px; background-color: #dee6f1; height: 15px; padding: 2px 3px 0px 2px; font-size: 10px; font-family: tahoma;'+h+'">'+d.count+'</div></td><td style="vertical-align: middle;"><div style="background: url(http://vk.com/images/btns.png) -27px -42px; width: 2px; height: 21px;'+h+'"></div></td></tr></table>'}else{if(f.type=="link"){return'<table style="width: auto; cursor: pointer; line-height: normal;" onmouseover="this.rows[0].cells[1].firstChild.style.textDecoration=\'underline\'" onmouseout="this.rows[0].cells[1].firstChild.style.textDecoration=\'none\'" onclick="VK.Share.click('+e+')" cellspacing="0" cellpadding="0"><tr style="line-height: normal;"><td style="vertical-align: middle;"><img src="http://vk.com/images/vk16.png" style="vertical-align: middle;"/></td><td style="vertical-align: middle;"><span style="padding-left: 5px; color: #2B587A; font-family: tahoma; font-size: 11px;">'+f.text+"</span></td></tr></table>"}else{if(f.type=="link_noicon"){return'<span style="cursor: pointer; font-family: tahoma; font-size: 11px; color: #2B587A; line-height: normal;" onmouseover="this.style.textDecoration=\'underline\'" onmouseout="this.style.textDecoration=\'none\'" onclick="VK.Share.click('+e+');">'+f.text+"</span>"}else{return'<span style="cursor: pointer" onclick="VK.Share.click('+e+');">'+f.text+"</span>"}}}}},change:function(c,a){var e=this._ge("vkshare"+a).rows[0];var b=e.cells[1].firstChild.firstChild;if(c==0){b.style.backgroundColor="#6d8fb3";b.style.borderTopColor="#7e9cbc";b.style.borderLeftColor=b.style.borderRightColor=b.style.borderBottomColor="#5c82ab"}else{if(c==1){b.style.backgroundColor="#84a1bf";b.style.borderTopColor="#92acc7";b.style.borderLeftColor=b.style.borderRightColor=b.style.borderBottomColor="#7293b7"}else{if(c==2){b.style.backgroundColor="#6688ad";b.style.borderBottomColor="#7495b8";b.style.borderLeftColor=b.style.borderRightColor=b.style.borderTopColor="#51779f"}}}var d=e.cells[0].firstChild;if(d){if(c==0){d.style.backgroundPosition="-21px -42px"}else{if(c==1){d.style.backgroundPosition="-23px -42px"}else{if(c==2){d.style.backgroundPosition="-25px -42px"}}}}},click:function(l){var a=this._gens[l];if(!a.shared){VK.Share.count(l,a.count+1);a.shared=true}var g;if(a.noparse===g){a.noparse=a.title&&a.description&&a.image}a.noparse=a.noparse?1:0;var h={url:a.url};var k=["title","description","image","noparse"];for(var j=0;j<k.length;++j){if(a[k[j]]){h[k[j]]=a[k[j]]}}var o="_blank";var d=554;var q=349;var f=(screen.width-d)/2;var n=(screen.height-q)/2;var c="scrollbars=0, resizable=1, menubar=0, left="+f+", top="+n+", width="+d+", height="+q+", toolbar=0, status=0";var b=this._popups[l]=window.open("",o,c);try{var p='<form accept-charset="UTF-8" action="'+this._base_domain+'share.php" method="post" id="share_form">';for(var j in h){p+='<input type="hidden" name="'+j+'" value="'+h[j].toString().replace(/"/g,"&quot;")+'" />'}p+="</form>";p+='<script type="text/javascript">document.getElementById("share_form").submit()<\/script>';p='<!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>'+p+"</body></html>";b.document.write(p)}catch(m){}b.blur();b.focus()},count:function(a,c){this._gens[a].count=c;var b=this._ge("vkshare"+a);if(b){var d=b.rows[0];if(c){d.cells[3].firstChild.innerHTML=c;d.cells[2].firstChild.style.width="29px";d.cells[3].firstChild.style.display="block";if(d.cells.length>4){d.cells[4].firstChild.style.display="block"}}else{d.cells[2].firstChild.style.width="22px";d.cells[3].firstChild.style.display="none";if(d.cells.length>4){d.cells[4].firstChild.style.display="none"}}}}}};
