function socialNet(type) {
	var title = encodeURIComponent(window.document.title);
	var href = encodeURIComponent(window.document.location.href);
	
	var width = 850;
	var height = 400;
	
	switch(type)
	{
		case 'email':
			url = 'http://www.apttcb.com/enviar_amigo.php?url=http://www.apttcb.com/';
			height="250"; width="600";			
			break;		
		case 'facebook' :
			url = 'http://www.facebook.com/sharer.php?u='+href+'&t='+title;
			width="900"; height="600";
			break;
		case 'twitter' :
			url = 'http://twitter.com/home?status='+title+' http://bit.ly/s6twpR';			
			break;
		case 'linkedin':
			url = 'http://www.linkedin.com/shareArticle?mini=true&url='+href+'&title='+title+'&summary=Associació Professional de Tècnics Tributaris de Catalunya i Balears';			
			break;
	}
	window.open(url, type,"location=1,status=1,scrollbars=0, top=250, left=210, width="+width+", height="+height+"");
}
function socialNetUrl (type,href,title) {

	var width = 850;
	var height = 400;
	
	switch(type)
	{
		case 'email':
			url = 'http://www.apttcb.com/enviar_amigo.php?url=http://www.apttcb.com/';
			height="250"; width="600";			
			break;		
		case 'facebook' :
			url = 'http://www.facebook.com/sharer.php?u='+href+'&t='+title;
			width="900"; height="600";
			break;
		case 'twitter' :
			if (href=='') {
				url = 'http://twitter.com/home?status='+title+' http://bit.ly/s6twpR';
			} else {
				url = 'http://twitter.com/home?status='+title+' '+href;
			}
			break;
		case 'linkedin':
			url = 'http://www.linkedin.com/shareArticle?mini=true&url='+href+'&title='+title+'&summary=Associació Professional de Tècnics Tributaris de Catalunya i Balears';			
			break;
	}
	window.open(url, type,"location=1,status=1,scrollbars=0, top=250, left=210, width="+width+", height="+height+"");
}
