/* The Tooltip script
originally written by Paul Sowden <paul@idontsmoke.co.uk> | http://idontsmoke.co.uk/
modified and localized by Alexander Shurkayev <alshur@ya.ru> | http://htmlcoder.visions.ru/
modified by Alexey B. Sapegin <alexey@sapegin.com> | http://sapegin.com/
*/
var ttp={opt:{an:"ttp",c:null,g:false,cv:null,
nl:" ,",bt:"(откроется в новом окне)",stg:["link","style"],sid:["abs","htp","lfs","mlb"]},
t:document.createElement("DIV"),
m:function(e){if(ttp.g){
var x=window.event?event.clientX+(ttp.cv.scrollLeft||document.body.scrollLeft):e.pageX
var y=window.event?event.clientY+(ttp.cv.scrollTop||document.body.scrollTop):e.pageY
ttp.a(x,y)}},
d:function(){
ttp.cv=document.getElementsByTagName(document.compatMode&&document.compatMode=="CSS1Compat"?"HTML":"BODY")[0]
ttp.t.setAttribute("id","ttp")
document.body.appendChild(ttp.t)
brdr()
var a=document.all&&!window.opera?document.all:document.getElementsByTagName("*")
var l=a.length
for(var i=0;i<l;i++){
if(!a[i]||ttp.opt.stg.in_array(a[i].tagName.toLowerCase())||ttp.opt.sid.in_array(a[i].id))continue
var ttt=a[i].getAttribute("title")
if(ttt&&typeof ttt!="string")ttt=""
var tta=a[i].getAttribute("alt")
var ttb=a[i].getAttribute("target")&&a[i].getAttribute("target")=="_blank"&&ttp.opt.bt
if(ttt||ttb){a[i].setAttribute(ttp.opt.an,ttb?(ttt?ttt+" "+ttp.opt.bt:ttp.opt.bt):ttt)
if(a[i].getAttribute(ttp.opt.an)){a[i].removeAttribute("title")
if(tta&&a[i].complete)a[i].removeAttribute("alt")
ttp.l(a[i],"mouseover",ttp.s)
ttp.l(a[i],"mouseout",ttp.h)}}
else if(tta&&a[i].complete){
a[i].setAttribute(ttp.opt.an,tta)
if(a[i].getAttribute(ttp.opt.an)){
a[i].removeAttribute("alt")
ttp.l(a[i],"mouseover",ttp.s)
ttp.l(a[i],"mouseout",ttp.h)}}}
document.onmousemove=ttp.m
window.onscroll=ttp.h
window.onunload=ttp.h
ttp.a(-99,-99)},
_:function(s){
s=s.replace(/\&/g,"&amp;")
s=s.replace(/\</g,"&lt;")
s=s.replace(/\>/g,"&gt;")
return s},
s:function(e){if(typeof ttp=="undefined")return
var d=window.event?window.event.srcElement:e.target
if(!d.getAttribute(ttp.opt.an))return
var s=d.getAttribute(ttp.opt.an)
if(ttp.opt.nl){var s=ttp._(s)
s=s.replace(eval("/"+ttp._(ttp.opt.nl)+"/g"),"<br/>")
ttp.t.innerHTML=s}else{
if(ttp.t.firstChild)ttp.t.removeChild(ttp.t.firstChild)
ttp.t.appendChild(document.createTextNode(s))}
ttp.o=0
ttp.g=true
ttp.t.style.visibility="visible"
opy()},
h:function(e){
if(typeof ttp=="undefined")return
ttp.t.style.visibility="hidden"
if(!ttp.opt.nl&&ttp.t.firstChild)ttp.t.removeChild(ttp.t.firstChild)
clearTimeout(ttp.c)
ttp.g=false
ttp.a(-99,-99)},
l:function(o,e,a){
if(o.addEventListener)o.addEventListener(e,a,false)
else if(o.attachEvent)o.attachEvent("on"+e,a)
else return null},
a:function(x,y){
var w_w=ttp.cv.clientWidth?ttp.cv.clientWidth+(ttp.cv.scrollLeft||document.body.scrollLeft):window.innerWidth+window.pageXOffset
var w_h=window.innerHeight?window.innerHeight+window.pageYOffset:ttp.cv.clientHeight+(ttp.cv.scrollTop||document.body.scrollTop)
var t_w=ttp.t.offsetWidth
var t_h=ttp.t.offsetHeight
ttp.t.style.left=x+8+"px"
ttp.t.style.top=y+8+"px"
if(x+t_w>w_w)ttp.t.style.left=w_w-t_w+"px"
if(y+t_h>w_h)ttp.t.style.top=w_h-t_h+"px"}}
Array.prototype.in_array=function(value){
var l=this.length
for (var i=0;i<l;i++)
if(this[i]===value)return true
return false}
var root=window.addEventListener||window.attachEvent?window:document.addEventListener?document:null
if(root){if(root.addEventListener)root.addEventListener("load",ttp.d,false)
else if(root.attachEvent)root.attachEvent("onload",ttp.d)}
function brdr(){
ttp.t.style.borderRadius="4px"
ttp.t.style.MozBorderRadius="4px"
ttp.t.style.WebkitBorderRadius="4px"}
function opy(){
if(ttp.o<97){if(ttp.o>92)ttp.o=92
ttp.t.style.opacity=ttp.o/100
ttp.t.style.filter='alpha(opacity='+ttp.o+')'
ttp.o+=6
ttp.c=setTimeout(opy,21)}}
/*
Social Media Share script
Written by Alexey B. Sapegin <alexey@sapegin.com> | http://sapegin.com/
*/
function sms(){var u=encodeURIComponent(location.href), t=encodeURIComponent(document.title)
var p=new Array(
'http://vkontakte.ru/share.php?url='+u+'&title='+t+'" title="В Контакте ,',
'http://www.facebook.com/sharer.php?u='+u+'&t='+t+'" title="Facebook ,',
'http://connect.mail.ru/share?share_url='+u+'" title="Мой Мир@Mail.Ru ,',
'http://www.blogger.com/blog_this.pyra?t&u='+u+'&n='+t+'" title="Blogger ,',
'http://www.livejournal.com/update.bml?subject='+t+'&event='+u+'" title="LiveJournal ,',
'http://my.ya.ru/posts_add_link.xml?URL='+u+'&title='+t+'" title="Я.ру ,')
for(i=0;i<p.length;i++)
document.write('<a style="background-position: '+-24*i+'px 0" href="'+p[i]+'" rel="nofollow" target="_blank"></a>')}
// Other scripts
function hs(rfid){if(location.hash==rfid){history.back();return false}return true}
function wc(url){if (opener){if (opener.closed){window.open(url,"")}
self.close();return false}return true}
