var bml = document.getElementById( "bookmarkLayer" );

function showBookmarkLayer() {
	bml.style.position = 'absolute';
	bml.style.zIndex = '1000';
	bml.style.display = 'block';
}

function hideBookmarkLayer() {
	bml.style.display = 'none';
}

function changeName(name) {
	document.getElementById('service_name').innerHTML= name;
}

if (bml != null) {
	hideBookmarkLayer();
}

function setBookmark (where) { 
	burl = encodeURIComponent(location.href); 
	btitle = encodeURIComponent(document.title); 

	switch(where) { 
		case 'Twitter': window.open('http://twitter.com/home/?status='+btitle+' '+burl); break; 
		case 'Facebook': window.open('http://www.facebook.com/sharer.php?u='+burl+'&title='+btitle+'&amp;desc='); break; 
		case 'Delicious': window.open('https://secure.del.icio.us/post?url='+burl+'&amp;title='+btitle); break; 
		case 'Linkarena': window.open('http://linkarena.com/bookmarks/addlink/?url='+burl+'&title='+btitle); break; 
		case 'Mrwong': window.open('http://www.mister-wong.de/index.php?bm_url='+burl+'&bm_notice=&bm_description='+btitle+'&action=addurl'); break; 
		case 'Webnews': window.open('http://www.webnews.de/einstellen?url='+burl+'&title='+btitle); break; 
		case 'Yigg': window.open('http://yigg.de/neu?exturl='+burl); break; 
		} 
	} 

