var addthis_url    = location.href;   
var addthis_title  = document.title;  
var addthis_pub    = 'CG86HTE1ESNGSF0B';

function bookmarkOver(text){
	if (text == '') {
		text = 'Klicken Sie ein Icon an!';
	} else {
		text='&nbsp;<strong>'+text+'</strong>';
	}
	document.getElementById('bookmarkText').innerHTML=text;
}
function bookmark(was) {
	bookmarkurl=encodeURIComponent(location.href);
	bookmarktitle=encodeURIComponent(document.title);
    var meta = document.getElementsByName('meta')
    for(var i=0; i < meta.length; i++) {
      if (meta.name=='desciption') {
        bookmarkdesc=encodeURIComponent(meta.content);
      }
    } 
	
	switch(was) {
		case 'delicious':
			window.open('http://del.icio.us/post?url='+bookmarkurl+'&title='+bookmarktitle);
			break;
		case 'wong':
			window.open('http://www.mister-wong.de/index.php?action=addurl&bm_url='+bookmarkurl+'&bm_description='+bookmarktitle);
			break;
		case 'blinkList':
			window.open('http://www.blinklist.com/index.php?Action=Blink/addblink.php&Description=&Url='+bookmarkurl+'&Title='+bookmarktitle);
			break;
		case 'yahoo':
			window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?u='+bookmarkurl+'&t='+bookmarktitle);
			break;
		case 'yigg':
			window.open('http://yigg.de/neu?exturl='+bookmarkurl+'&exttitle='+bookmarktitle);
			break;
		case 'furl':
			window.open('http://www.furl.net/storeIt.jsp?u='+bookmarkurl+'&t='+bookmarktitle);
			break;
		case 'alltagz':
			window.open('http://www.alltagz.de/bookmarks/?action=add&popup=1&address='+bookmarkurl+'&title='+bookmarktitle+'&description='+bookmarkdesc,'alltagz','modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=730,height=465,left='+(screen.width-730)/2+',top='+(screen.height-425)/2);
			break;
		case 'folkd':
			window.open('http://www.folkd.com/submit/page/'+bookmarkurl);
			break;
		case 'linkarena':
			window.open('http://linkarena.com/bookmarks/addlink/?url='+bookmarkurl+'&title='+bookmarktitle+'&desc=&tags=');
			break;
		case 'google':
			window.open('http://www.google.com/bookmarks/mark?op=add&hl=de&bkmk='+bookmarkurl+'&title='+bookmarktitle);
			break;
	}
}