﻿var title=encodeURIComponent(document.title),url=encodeURIComponent(location.href),imd="/themes/default/i/";

function CoolOnFocus(t,field){if(field.value==t) field.value='';}
function CoolOnBlur(t,field){if(field.value=='') field.value=t;}

function Social(){
document.write('<table class="rss-reader-post"><tr><td class="text">Поделись с друзьями:</td>'+
'<td><a target="_blank" class="social" href="http://www.facebook.com/sharer.php?u='+url+'" id="facebook" onclick="window.open(this.href, \'Поделиться ссылкой в facebook\', \'width=800,height=300\'); return false" title="Добавить в Facebook"><img src="'+imd+'1x1.gif" width="16" height="16" alt="" class="ico-soc1"/></a></td>'+
'<td><a href="http://www.livejournal.com/update.bml?subject='+title+'&amp;event='+url+'" target="_blank" title="Добавить в ЖЖ"><img src="'+imd+'1x1.gif" width="16" height="16" alt="" class="ico-soc7"/></a></td>'+
'<td><a href="http://my.ya.ru/posts_add_link.xml?title='+title+'&amp;URL='+url+'" target="_blank" title="Добавить в Я.Яндекс"><img src="'+imd+'1x1.gif" width="16" height="16" alt="" class="ico-soc6"/></a></td>'+
'<td><a href="http://connect.mail.ru/share?share_url='+url+'" target="_blank" title="Добавить в Mail"><img src="'+imd+'1x1.gif" width="16" height="16" alt="" class="ico-soc3"/></a></td>'+
'<td><a href="http://vkontakte.ru/share.php?url='+url+'" target="_blank" title="Добавить в Вконтакте"><img src="'+imd+'1x1.gif" width="16" height="16" alt="" class="ico-soc5"/></a></td>'+
'<td><a href="http://twitter.com/home?status='+title+' '+url+'" target="_blank" title="Добавить в Twitter"><img src="'+imd+'1x1.gif" width="16" height="16" alt="" class="ico-soc4"/></a></td>'+
'<td><a href="http://www.blogger.com/blog_this.pyra?t&amp;u='+url+'&amp;n='+title+'&amp;a=ADD_SERVICE_FLAG&amp;passive=true&amp;alinsu=0&amp;aplinsu=0&amp;alwf=true&amp;hl=ru&amp;skipvpage=true&amp;rm=false&amp;showra=1&amp;fpui=2&amp;naui=8" target="_blank" title="Добавить в Blogger"><img src="'+imd+'1x1.gif" width="16" height="16" alt="" class="ico-soc8"/></a></td>'+
'<td><a href="http://www.google.com/buzz/post?message='+title+'&amp;url='+url+'" target="_blank" title="Добавить в Google Buzz"><img src="'+imd+'1x1.gif" width="16" height="16" alt="" class="ico-soc2"/></a></td></tr></table>');
}

function Feeder(){
var rss_lenta,tmp,clearurl,feed = /*1*/'future-mom'/*1*/;

clearurl = location.href.replace('http://','');
tmp = strpos(clearurl,'/',1); 
rss_lenta = (tmp == false) ? location.href+'/rss' : 'http://'+clearurl.substr(0,tmp)+'/rss';

document.write('<div class="top-block"><div class="inside">'+
'<table class="table-reader"><tr>						'+
'	<td width="40%"><a href="http://feeds.feedburner.com/'+feed+'" target="_blank"><img src="http://feeds.feedburner.com/~fc/'+feed+'?bg=FFCC33&fg=333333&anim=0" height="26" width="88" style="border:0" alt="" /></a></td>'+
'	<td width="60%">'+

'<div class="cnt-t" id="cnt-s" style="display:none;">'+
'  <div class="cnt-a">'+
'    <div class="cnt-a1" onMouseOver="cnt_on();" onMouseOut="cnt_off();"><a href="http://fusion.google.com/add?feedurl='+rss_lenta+'" target="blank"><img src="/themes/default/i/1x1.gif" width="104" height="17" alt="" class="ico-reader" /></a></div>'+
'    <div class="cnt-a2" onMouseOver="cnt_on();" onMouseOut="cnt_off();"></div>'+
'  </div>'+
'  <div class="cnt-b" onMouseOver="cnt_on();" onMouseOut="cnt_off();">'+
'		<table class="tab-reader">'+
'			<tr>'+
'				<td><img src="/themes/default/i/1x1.gif" width="16" height="16" alt="Google Reader" style="background:url(/themes/default/i/ji.gif) -376px 0px no-repeat;" /></td>'+
'				<td><a href="http://fusion.google.com/add?feedurl='+rss_lenta+'" target="_blank">Google Reader</a> &nbsp; Рекомендуем</td>'+
'			</tr>'+
'			<tr>'+
'				<td><img src="/themes/default/i/1x1.gif" width="16" height="16" alt="Яндекс" style="background:url(/themes/default/i/ji.gif) -360px 0px no-repeat;" /></td>'+
'				<td><a href="http://mail.yandex.ru/lenta/add?feed_url='+rss_lenta+'" target="_blank">Яндекс</a></td>'+
'			</tr>'+
'			<tr>'+
'				<td><img src="/themes/default/i/1x1.gif" width="16" height="16" alt="Пуск.ру" style="background:url(/themes/default/i/ji.gif) -584px 0px no-repeat;" /></td>'+
'				<td><a href="http://www.pusk.ru/#A:Rfeed='+rss_lenta+'?format=xml" target="_blank">Pusk.ru</a></td>'+
'			</tr>'+
'		</table>'+
'  </div>'+
'	<div class="cnt-c" onMouseOver="cnt_on();" onMouseOut="cnt_off();"><div class="cnt-c1"></div><div class="cnt-c2"></div></div>'+
'</div>'+
'<div class="cnh-t" id="cnt-h">'+
'  <div class="cnh-a">'+
'    <div class="cnh-a1" onMouseOver="cnt_on();" onMouseOut="cnt_off();"><a href="http://fusion.google.com/add?feedurl=http://biz24h.ru/rss.xml" target="blank"><img src="/themes/default/i/1x1.gif" width="104" height="17" alt="" class="ico-reader" /></a></div>'+
'  </div>'+
'</div>'+

'</td>'+
'</tr>'+
'<form action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open(\'http://feedburner.google.com/fb/a/mailverify?uri='+feed+'\', \'popupwindow\', \'scrollbars=yes,width=550,height=520\');return true">'+
'<tr>'+
'	<td colspan="2" class="txt">Подпишись на рассылку новостей:</td>'+
'</tr><tr>'+
'	<td colspan="2">'+
'		<input type="hidden" value="'+feed+'" name="uri"/>'+
'		<input type="hidden" name="loc" value="ru_RU"/>'+
'		Email: <input type="text" style="width:100px" class="inp" name="email"/>'+
'		<input type="submit" class="but" value="Ок" />'+
' </td>'+
'	</form>'+
'</tr></table>'+
'</div></div>');
}

function cnt_on()  {show_obj('cnt-s');close_obj('cnt-h');}
function cnt_off() {show_obj('cnt-h');close_obj('cnt-s');}

function strpos( haystack, needle, offset){	
	var i = haystack.indexOf( needle, offset );
	return i >= 0 ? i : false;
}


function CoolBM(){
this.burl=function(system){
switch(system){
case 1:return'http://del.icio.us/post?v=4&noui&jump=close&url='+url+'&title='+title;
case 2:return'http://bobrdobr.ru/addext.html?url='+url+'&title='+title;
case 3:return'http://memori.ru/link/?sm=1&u_data[url]='+url+'&u_data[name]='+title;
case 4:return'http://mister-wong.ru/index.php?action=addurl&bm_url='+url+'&bm_description='+title;
case 5:return'http://links.i.ua/add/?url='+url+'&title='+title;
case 6:return'http://myscoop.ru/add/?URL='+url+'&title='+title;
case 7:return'http://moemesto.ru/post.php?url='+url+'&title='+title;
case 8:return'http://100zakladok.ru/save/?bmurl='+url+'&bmtitle='+title;
case 9:return'http://connotea.org/add?continue=confirm&uri='+url+'&title='+title+'&description=';
case 10:return'http://technorati.com/faves?add='+url;
case 11:return'http://zakladki.yandex.ru/userarea/links/addfromfav.asp?bAddLink_x=1&lurl='+url+'&lname='+title;
case 12:return'http://google.com/bookmarks/mark?op=add&bkmk='+url+'&title='+title;
case 13:return'http://digg.com/submit?phase=2&url='+url+'&title='+title;
case 14:return'http://ru.reddit.com/submit?url='+url+'&title='+title;
case 15:return'http://news2.ru/add_story.php?url='+url;
case 16:return'http://smi2.ru/add?url='+url+'&title='+title;
case 17:return'http://mynews.com.ua/submit.php?url='+url;
case 18:return'http://vaau.ru/submit/?action=step2&url='+url;
case 19:return'http://news.privet.ru/add?source='+url+'&title='+title;
case 20:return"javascript:x=document;a=encodeURIComponent(x.location.href);t=encodeURIComponent(x.title);d=encodeURIComponent(window.getSelection());open('http://url.org/bookmarks/?action=add&popup=1&address='+a+'&title='+t+'&description='+d,'URL.ORGanizer','modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=730,height=465,left='+(screen.width-730)/2+',top='+(screen.height-425)/2);void%200;"
case 21:return'http://pisali.ru/load_article/';
case 22:return'http://socialposter.com/index.php?url='+url;
case 23:return'http://sloger.net/submit.php?url='+url;
case 24:return'http://www.netvibes.com/share?url='+url+'&title='+title;
}
}
this.hide=function(){
if (this.timeout) clearTimeout(this.timeout);
document.getElementById('coolb').style.visibility='hidden';
}
this.show=function(element){
if(this.timeout)clearTimeout(this.timeout);
var left=0,top=0;
var style=document.getElementById('coolb').style;
while(element){
left+=element.offsetLeft;
top+=element.offsetTop;
element=element.offsetParent;
}
style.left=left+'px';style.top=(top+12)+'px';style.visibility='visible';
}
var titles=new Array('del.icio.us','Бобр Добр','Memori','Mister Wong','i.ua','MyScoop','Моё место','100 закладок','Connotea','Technorati','Яндекс закладки','Google закладки','Digg','reddit','News2','СМИ 2','MYNEWS','Вауу!','Привет.ру','URL.ORGanizer','Pisali.ru','Social poster','Sloger','Netvibes');

if (!document.getElementById('coolb')){
var div=document.createElement('div');
var style=div.style;
div.id='coolb';
div.innerHTML='';
div.className='bookmark';

for(i=0;i<24;i++){
	div.innerHTML+='<a rel="nofollow" href="'+this.burl(i+1)+'" onclick="go('+(i+1)+');return false"><img src="'+imd+'1x1.gif" width="16" height="16" alt="" title="'+titles[i]+'" style="border:0;padding:0;margin:2px;float:left;background:url('+imd+'ji.gif) -'+(200+i*16)+'px 0"/></a><a href="'+this.burl(i+1)+'" style="float:left;width:138px;color:#333;text-align:left;font:normal 11px arial;line-height:20px;border:0" onmouseover="this.style.background=\'#f3f7ff\'" onmouseout="this.style.background=\'#fdfdfd\'" onclick="go('+(i+1)+');return false">'+titles[i]+'</a><br />';
}

div.onmouseover=function(){if(timeout)clearTimeout(timeout)}
div.onmouseout=function(){timeout=setTimeout('hide()',500)};
style.position='absolute';
style.visibility='hidden';
style.border='1px solid #b7b6b7';
style.background='#fbfbfb';
style.font='normal 12px arial';
style.lineHeight='20px';
style.margin='0';
style.padding='5px';
style.overflow='hidden';
style.zIndex='1001';
document.body.insertBefore(div,document.body.firstChild);
}

document.write('<a onclick="show(this);" onmouseout="timeout=setTimeout(\'hide()\',500);" title="Добавить в закладки"><img src="'+imd+'1x1.gif" width="82" height="40" style="background:url('+imd+'bookmark.gif);" alt="Добавить в закладки" style="border:0;margin:0;padding:0"></a>');
}

function Translate(){
this.hidet=function(){
if(this.timeout)clearTimeout(this.timeout);
document.getElementById('transb').style.visibility='hidden';
}
this.showt=function(element){
if(this.timeout)clearTimeout(this.timeout);
var left=0,top=0;
var style=document.getElementById('transb').style;
var width=document.getElementById('transb').offsetWidth;
while(element){
left+=element.offsetLeft;
top+=element.offsetTop;
element=element.offsetParent;
}
style.left=(left-width+8)+'px';style.top=(top+12)+'px';style.visibility='visible';
}
var langsid=new Array('ar','bg','nl','el','da','iw','id','es','it','zh-TW','zh-CN','ko','lv','lt','de','no','pl','pt','ro','sr','sk','fi','fr','hi','hr','cs','sv','ja');
var langs=new Array('العربية','Български','Nederlands','Ελληνικά','Danske','עברית','Indonesia','Español','Italiano','繁體中文','简体中文','한국의','Latvijas','Lietuvos','Deutsch','Norsk','Polski','Português','Română','Српски','Slovenský','Suomi','Français','हिन्दी','Hrvatski','Český','Svenska','日本語');
if(!document.getElementById('transb')){
var div=document.createElement('div');
var style=div.style;
div.id='transb';
div.className='bookmark';
div.innerHTML='';
for(i=0;i<28;i++){
div.innerHTML+='<a style="color: #333;" href="http://translate.google.com/translate_c?hl=ru&langpair=ru%7C'+langsid[i]+'&u='+url+'">'+langs[i]+'</a><br />';
}
div.onmouseover=function(){if (timeout)clearTimeout(timeout)}
div.onmouseout=function(){timeout=setTimeout('hidet()',500)};
style.position='absolute';
style.visibility='hidden';
style.color='#000';
style.Width='200px';
style.border='1px solid #b7b6b7';
style.background='#fbfbfb';
style.font='normal 12px arial';
style.lineHeight='20px';
style.margin='';
style.padding='5px';
style.overflow='hidden';
style.zIndex='1001';
document.body.insertBefore(div,document.body.firstChild);
}
document.write('<a style="color:#93a4c6;font-size:10px;" href="#" onclick="showt(this);" onmouseout="timeout=setTimeout(\'hidet()\',500);"><img src="'+imd+'arrow.gif" alt="" />Translation</a>');
}
