function bookmark(a, url, title){
  a.href = url;
  a.rel = "sidebar";
  a.title = title;
}

function SlogerKnop() {
this.domain=location.href+'/';
this.domain=this.domain.substr(this.domain.indexOf('://')+3);
this.domain=this.domain.substr(0,this.domain.indexOf('/'));
this.location=false;
this.selection=function() {
var sel;
if (window.getSelection) sel=window.getSelection();
else if (document.selection) sel=document.selection.createRange();
else sel='';
if (sel.text) sel=sel.text;
return encodeURIComponent(sel);
}
this.url=function(system) {

var title=encodeURIComponent(this.mtitle);
var url=encodeURIComponent(this.murl);
var _title=this.mtitle;
var _url=this.murl;


switch (system) {
case 1: return 'http://bobrdobr.ru/addext.html?url='+url+'&title='+title;
case 2: return 'http://memori.ru/link/?sm=1&u_data[url]='+url+'&u_data[name]='+title;
case 3: return 'http://www.mister-wong.ru/index.php?action=addurl&bm_url='+url+'&bm_description='+title;
case 4: return 'http://del.icio.us/post?v=4&noui&jump=close&url='+url+'&title='+title;
case 5: return 'http://zakladki.yandex.ru/userarea/links/addfromfav.asp?bAddLink_x=1&lurl='+url+'&lname='+title;
case 6: return 'http://www.google.com/bookmarks/mark?op=add&bkmk='+url+'&title='+title;
case 11: return 'http://myscoop.ru/add/?URL='+url+'&title='+title;
case 12: return 'http://moemesto.ru/post.php?url='+url+'&title='+title;
case 13: return 'javascript:bookmarksite(\''+_title+'\',\''+_url+'\')';
case 14: return _title;
case 15: return _url;
case 16: return 'javascript:bookmarksite(\''+_title+'\',\''+_url+'\')';
}
}
this.redirect=function() {
if (this.location) location.href=this.location;
this.location=false;
}
this.go=function(i) {
this.location=this.url(i);
setTimeout('slogoKnop.redirect()',800);
}
this.init=function(a, b) {
this.murl = b;
this.mtitle = a;
var titles=new Array('&#1041;&#1086;&#1073;&#1088;&#1044;&#1086;&#1073;&#1088;','Memori','&#1052;&#1080;&#1089;&#1090;&#1077;&#1088; &#1042;&#1086;&#1085;&#1075;','del.icio.us','&#1071;&#1085;&#1076;&#1077;&#1082;&#1089;.&#1047;&#1072;&#1082;&#1083;&#1072;&#1076;&#1082;&#1080;','&#1047;&#1072;&#1082;&#1083;&#1072;&#1076;&#1082;&#1080; Google','&#1058;&#1077;&#1082;&#1089;&#1090; 2.0','&#1055;&#1080;&#1089;a&#1083;&#1080;','News2','&#1057;&#1052;&#1048; 2','AddScoop','&#1052;&#1086;&#1105;&#1052;&#1077;&#1089;&#1090;&#1086;','RuSpace','&#1057;&#1090;&#1086; &#1047;&#1072;&#1082;&#1083;&#1072;&#1076;&#1086;&#1082;','RUmarkz','&#1042;&#1072;&#1072;&#1091;!');
var html='<div>';
for (i=0;i<16;i++) {
if ( ((i>5) && (i<10)) || (i>11)) continue;
html+='<a href="'+this.url(i+1)+'" onclick="slogoKnop.go('+(i+1)+');return false"><img src="http://sloger.net/js/blank.gif" width="16" height="16" alt="#" title="'+titles[i]+'" style="border:0;padding:0;margin:0 4px 0 0;background:url(http://sloger.net/js/icons.gif) -'+(i*16)+'px"/></a>';
}

var ua = navigator.userAgent.toLowerCase();
isIE = (ua.indexOf("msie") != -1 && ua.indexOf("opera") == -1 && ua.indexOf("webtv") == -1);
isOpera = (ua.indexOf("opera") != -1);
isGecko = (ua.indexOf("gecko") != -1);
isSafari = (ua.indexOf("safari") != -1);
isKonqueror = (ua.indexOf("konqueror") != -1);

var bro="";
if (isIE) bro = "ie.gif";
if (isOpera) bro = "opera.gif";
if (isGecko) bro = "mozilla.gif";
if (isSafari) bro = "safari.gif";
if (isKonqueror) bro = "kon.ico";

if (isSafari || isKonqueror)
{
	html += '<a href="javascript:void(0);" onclick="bookmark(this, \'' + this.url(15) + '\', \'' + this.url(14) + '\')"><img src="http://sloger.net/icon_' + bro + '" width="16px" alt="#" title="Добавить в закладки" style="border:0;padding:0;margin:0 4px 0 0;" /> Нажмите Ctrl+D для того чтобы добавить в избранное</a>';	
} else if (isOpera)
{
	html += '<a href="javascript:void(0);" onclick="bookmark(this, \'' + this.url(15) + '\', \'' + this.url(14) + '\')"><img src="http://sloger.net/icon_' + bro + '" width="16px" alt="#" title="Добавить в закладки" style="border:0;padding:0;margin:0 4px 0 0;" /></a>';	
} else if (isIE)
{
	html += "<a href=\"" + this.url(16) + "\"><img src='http://sloger.net/icon_" + bro + "' width='16px' alt='#' title='Добавить в закладки' style='border:0;padding:0;margin:0 4px 0 0;' /></a>";
}
else
	html += "<a href=\"" + this.url(13) + "\"><img src='http://sloger.net/icon_" + bro + "' width='16px' alt='#' title='Добавить в закладки' style='border:0;padding:0;margin:0 4px 0 0;' /></a>";

html+='</div>';
document.write(html);
}
}
slogoKnop=new SlogerKnop();