//Bookmark on del.icio.us
function dbt_bookmark(targetURL, title) {
	//URL of this document
	var loc=location.href;
	if(targetURL && targetURL.length>0) loc = targetURL;
	//Strip out any anchors
	var apos=loc.indexOf('#');
	loc=(apos>0?loc.substring(0,apos):loc);
	//Redirect to del.icio.us
	/***
	location.href='http://del.icio.us/post?v=2&amp;url='
	+ encodeURIComponent(loc)
	+'&amp;title='
	+encodeURIComponent(document.title);
	****/
	window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url='
	+ encodeURIComponent(loc)
	+'&amp;title='
	+encodeURIComponent(title),'delicious','resizable=1,toolbar=0,width=750,height=520');
	//Return false so the link won't be activated.

	return false;
}

function facebook(targetUrl, title) {
	window.open("http://www.facebook.com/share.php?u="+encodeURIComponent(targetUrl)+"&t=" + encodeURIComponent(title), "share", "toolbar=0,status=0,width=770,height=450,resizable=1,scrollbars=1"); 
	return false;
}

function email(mainUrl, targetUrl, title) {
	window.open(mainUrl+'/email_page.php?u='+encodeURIComponent(targetUrl)+'&ptitle=' + encodeURIComponent(title), 'share', 'toolbar=0,status=0,width=770,height=450,resizable=1,scrollbars=1'); 
	return false;
}
