okdv=true;
okos=false;
okto=false;
oktgo=false;
okurl=false;
okdn=location.href+'/';
okdn=okdn.substr(okdn.indexOf('://')+3);
okdn=okdn.substr(0,okdn.indexOf('/'));

function okh() {
	okos.visibility='hidden';
}

function okadd(s) {
	okurl='';
	okbmurl = location.href;
	okbmtitle = document.title;
	if (s=='mister-wong') okurl='http://www.mister-wong.de/index.php?action=addurl&bm_url='+encodeURIComponent(location.href)+'&bm_notice=&bm_description='+encodeURIComponent(document.title)+'&bm_tags=';
	if (s=='linkarena') okurl='http://linkarena.com/bookmarks/addlink/?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)+'&desc=&tags=';
	if (s=='oneview') okurl='http://www.oneview.de/quickadd/neu/addBookmark.jsf?URL='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);
	if (s=='seekxl') okurl='http://social-bookmarking.seekxl.de/?add_url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);
	if (s=='delicious') okurl='http://del.icio.us/post?v=2&url='+encodeURIComponent(location.href)+'&notes=&tags=&title='+encodeURIComponent(document.title);
	if (s=='google') okurl='http://www.google.com/bookmarks/mark?op=add&amp;hl=de&amp;bkmk='+encodeURIComponent(location.href)+'&amp;annotation=&amp;labels=&amp;title='+encodeURIComponent(document.title);
	if (s=='technorati') okurl='http://technorati.com/faves?add='+encodeURIComponent(location.href)+'&tag='	
	if (s=='su') okurl='http://www.stumbleupon.com/submit?url='+encodeURIComponent(location.href)+'&amp;title='+encodeURIComponent(document.title);

    if (s=='blinklist') okurl='http://www.blinklist.com/index.php?Action=Blink/addblink.php&Description=&Tag=&Url='+encodeURIComponent(location.href)+'&Title='+encodeURIComponent(document.title);
    if (s=='folkd') okurl='http://www.folkd.com/submit/'+(document.location.href);
    if (s=='simpy') okurl='http://www.simpy.com/simpy/LinkAdd.do?title='+encodeURIComponent(document.title)+'&tags=&note=&href='+encodeURIComponent(location.href);
    if (s=='reddit') okurl='http://reddit.com/submit?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);
    if (s=='yahoo') okurl='http://myweb2.search.yahoo.com/myresults/bookmarklet?t='+encodeURIComponent(document.title)+'&d=&tag=&u='+encodeURIComponent(location.href);
    if (s=='furl') okurl='http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(location.href)+'&keywords=&t='+encodeURIComponent(document.title);
			
	if (s=='digg') okurl='http://digg.com/submit?phase=2&amp;url='+encodeURIComponent(location.href)+'&amp;bodytext=&amp;tags=&amp;title='+encodeURIComponent(document.title);
	if (s=='netscape') okurl='http://www.netscape.com/submit/?U='+encodeURIComponent(location.href)+'&T='+encodeURIComponent(document.title);
	if (s=='favit') okurl='http://www.favit.de/submit.php?url='+encodeURIComponent(location.href);
	if (s=='icio') okurl='http://www.icio.de/add.php?url='+encodeURIComponent(location.href);
	if (s=='live') okurl='http://favorites.live.com/quickadd.aspx?marklet=1&top=0&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);
	if (s=='webnews') okurl='http://www.webnews.de/einstellen?url='+encodeURIComponent(location.href)+'&amp;title='+encodeURIComponent(document.title);
	if (s=='favoriten') okurl='http://www.favoriten.de/url-hinzufuegen.html?bm_url='+encodeURIComponent(location.href)+'&amp;bm_title='+encodeURIComponent(document.title);
	if (s=='bonitrust') okurl='http://www.bonitrust.de/account/bookmark/?bookmark_url='+encodeURIComponent(location.href);
	if (s=='newsklick') okurl='http://www.newskick.de/submit.php?url='+encodeURIComponent(location.href);
	if (s=='folkd') okurl='http://www.folkd.com/submit/'+encodeURIComponent(location.href);
	if (s=='yigg') okurl='http://yigg.de/neu?exturl='+encodeURIComponent(location.href);
	
	
	okgo();
//	if (okurl.length>0) {
//		oktgo=setTimeout('okgo()',3000);
//		scr=document.createElement('script'); 
//		scr.type='text/javascript'; 
//		scr.src='http://einklick.com/save/?domain='+okdn+'&system='+s; 
//		document.body.appendChild(scr);
//	}
}

function okgo() {
	if (oktgo) clearTimeout(oktgo);
//	if (okurl) location.href=okurl;
	if (okurl) {
//		window.open(okurl,'bookmark','scrollbars=yes,menubar=no,width=620,height=500,resizable=yes,toolbar=no,location=no,status=no');
		window.open(okurl);
	} else {
			if (document.all) window.external.AddFavorite(okbmurl,okbmtitle); 
			else if(window.sidebar) window.sidebar.addPanel(okbmtitle,okbmurl,''); 
	};
}

function oks(el) {
	if (okto) clearTimeout(okto);
	rx=-175;
	ry=0;
	while (el) {
		rx+=el.offsetLeft;
		ry+=el.offsetTop;
		el=el.offsetParent;
	}
	okos.left=rx+'px';
	okos.top=(ry+16)+'px';
	okos.visibility='visible';
}

if (okdv) {
	var tabelle = new Array();
	if (document.all) tabelle[0] = ['explorer','Favoriten','-160'];
	else tabelle[0] = ['firefox','Lesezeichen','-176'];
	tabelle[1] = ['mister-wong','Mr. Wong','-16'];
		
	tabelle[2] = ['blinklist','Blinklist','-48'];	tabelle[3] = ['delicious','Del.icio.us','-224'];
	tabelle[4] = ['simpy','Simpy','-240'];			tabelle[5] = ['yahoo','Yahoo MyWeb','-112'];
	tabelle[6] = ['oneview','Oneview','-64'];		tabelle[7] = ['technorati','Technorati','-144'];
	tabelle[8] = ['seekxl','seekXL','-128'];		tabelle[9] = ['reddit','reddit','-208'];
	tabelle[10] = ['folkd','Folkd','-32'];			tabelle[11] = ['su','StumbleUpon','-96'];
	tabelle[12] = ['linkarena','Linkarena','-80'];	tabelle[13] = ['google','Google','-192'];
	
	s='<div style="position:relative;width:150px;height:16px;padding:1px;border:0px;margin:0px;margin-bottom:2px;overflow:hidden;';
	e='onmouseover="this.style.background=\'#eee\';" onmouseout="this.style.background=\'#fff\';"';
	oktd=document.createElement('div');

	okHTML='<div id="bm_tabelle" style="position:absolute;max-width:310px;left:0px;top:0px;z-index:100;visibility:hidden;background-color:#fff;border:1px solid #aaa;font-family:arial;font-size:14px;color:#555;font-weight:normal;" onmouseout="okto=setTimeout(\'okh()\',500);" onmouseover="if (okto) clearTimeout(okto);">';
//	+'<div style="border:0px;margin:0px;background:#ccc;">'+s+'float:left;text-align:left;background:#ccc;font-family:arial;font-weight:normal;font-size:12px;color:#555;text-decoration:none;">&nbsp;Speicher Bookmark bei den:</div>'+
//	s+'text-align:right;background:#ccc;"><a href="http://einklick.com/" style="font-family:arial;font-weight:normal;font-size:12px;color:#555;text-decoration:none;">&copy Ein Klick&nbsp;</a></div></div>';
	for(var okI=0; okI<tabelle.length; okI++) {
		if(okI%2==0) {
//			alert(tabelle[okI][1]);
			okHTML += s+'float:left;"><div style="position:relative;width:16px;height:16px;padding:0px;margin:0px;border:0px;cursor:pointer;background-image:url(\'http://raddiscount.de/js/all.gif\');background-position:'+tabelle[okI][2]+'px 0px;float:left;" title="'+tabelle[okI][1]+'" onclick="okadd(\''+tabelle[okI][0]+'\');"></div><div style="position:relative;height:16px;padding:0px;margin:0px;border:0px;">&nbsp;<a href="#" style="font-family:arial;font-weight:normal;font-size:14px;color:#555;text-decoration:none;" onclick="okadd(\''+tabelle[okI][0]+'\');return false;" '+e+'>'+tabelle[okI][1]+'</a></div></div>';
		} else {
			okHTML += s+'"><div style="position:relative;width:16px;height:16px;padding:0px;border:0px;cursor:pointer;margin-left:2px;background-image:url(\'http://raddiscount.de/js/all.gif\');background-position:'+tabelle[okI][2]+'px 0px;float:left;" title="'+tabelle[okI][1]+'" onclick="okadd(\''+tabelle[okI][0]+'\');"></div><div style="position:relative;height:16px;padding:0px;border:0px;">&nbsp;<a href="#" style="font-family:arial;font-weight:normal;font-size:14px;color:#555;text-decoration:none;" onclick="okadd(\''+tabelle[okI][0]+'\');return false;" '+e+'>'+tabelle[okI][1]+'</a></div></div>';
		};
	};	
	okHTML += '</div>';

	oktd.innerHTML = okHTML;
	document.body.insertBefore(oktd,document.body.firstChild);
	okos=document.getElementById('bm_tabelle').style;
	okdv=false;
}

if (okbutton) {
	document.write('<a href="#" onmouseover="oks(this);return false;" onmouseout="okto=setTimeout(\'okh()\',500);"><img src="http://raddiscount.de/js/bm_button.gif" width="125" height="16" alt="Ein Klick" border="0"></a>');
};
