function getShareUrlNew(uri, newId) {
	u = uri + "/permalink/news/" + newId;
	return u;
}
function getThisNews(T, C, U, L) {
	var targetUrl = 'http://www.myspace.com/index.cfm?fuseaction=postto&'
			+ 't=' + encodeURIComponent(T) + '&c=' + encodeURIComponent(C)
			+ '&u=' + encodeURIComponent(U) + '&l=' + L;
	window.open(targetUrl);
}

//SHARE NEWS

// SHARE FACEBOOK
function fbShareNew(uri, id) {
	var url = getShareUrlNew(uri,id);
	var t = document.title;
	window.open('http://www.facebook.com/sharer.php?u='
			+ encodeURIComponent(url) + '&t=' + encodeURIComponent(t),
			'sharer', 'toolbar=0,status=0,width=626,height=436');
	return false;
}

// MYSPACE SHARE
function myspaceShareNew(uri,id) {
	var t = document.title;
	var url = getShareUrlNew(uri,id);
	var htmlText = "<a href='" + url + "'>" + t + "</a> ";
	var source = url;

	getThisNews(url, htmlText, source, 3);
}

function twitterShareNew(uri, newId, username, password, text) {
	t = document.title;
	var url = getShareUrlNew(uri, newId);
	var action = "http://scripts.hollybyte.com/twitter/updatestatus/";
	var data = 'u/' + username + '/p/' + password + '/s/ver_noticia/url/'
			+ escape(url)
	//alert(action + data);
	var action = "http://twitter.com/home?status="+escape(t);
	
	window.open(action);
	return;
	$.ajax( {
		type : "POST",
		url : action + data,

		success : function(datos) {

		},
		error : function(request, error) {

		}
		
	});

}




