var windowHeight = 500;
function shareTwitter(URL, text, hashtag) {
	hashtag = encodeURIComponent(hashtag);
	text = text+' ';
	urlShare = 'http://twitter.com/intent/tweet?url='+URL+'&text='+text;
	windowWidth = 500;
	openWindow(hashtag);
}

function openWindow(hashtag) {
		
    var finalUrl = encodeURI(urlShare) + (hashtag ? hashtag : '');
	
	var posX  = (window.screen.width/2) - (windowWidth/2);		
	var posY  =  (window.screen.height/2)- (windowHeight/2);
		
	window.open(finalUrl,'','left='+posX+',top='+posY+',width='+windowWidth+',height='+windowHeight+',toolbar=no,resizable=0,scrollbars=yes');
}
