﻿function share(s,u,t,d){ // site, url, title, description
	if(!s) s = "";
	if(!u) u = "";
	if(!t) t = "";
	if(!d) d = "";
	switch(s){
		case "delicious":
			window.open('http://del.icio.us/post?v=4&noui&jump=close&url='+u+'&title='+t, 'delicious','toolbar=no,width=700,height=400');
			break;
		case "facebook":
			window.open('http://www.facebook.com/sharer.php?u='+u+'&amp;t='+t,'Share', 'toolbar=0,status=0,width=626,height=436');
			break;
		case "favorite":
			if(window.sidebar)
				window.sidebar.addPanel(document.title, location.href,""); // Mozilla Firefox Bookmark
			else if(window.external)
				window.external.AddFavorite(location.href, document.title); // IE Favorite
			break;
		case "linkedin":
			window.open('http://www.linkedin.com/shareArticle?mini=true&url='+u+'&title='+t+'&source=');
			break;
		case "myspace":
			window.open('http://www.myspace.com/Modules/PostTo/Pages/?u='+u+'&t='+t+'&l=1&c='+d);
			break;
		case "netlog":
			window.open('http://www.netlog.com/go/manage/links/view=save&origin=external&url='+u+'&title='+t+'&description='+d);
			break;
		case "hyves":
			if(d == ""){
				window.open('http://www.hyves.nl/profilemanage/add/tips/?name='+t+'&text='+u+'&rating=5');
			}
			else{
				window.open('http://www.hyves.nl/profilemanage/add/tips/?name='+t+'&text='+u+'+'+d+'&rating=5');
			}
			break;
		case "twitter":
			if(d == ""){
				window.open('http://twitter.com/home?status='+t+'+'+u);
			}
			else{
				window.open('http://twitter.com/home?status='+d);
			}
			break;
		}
}
