function streamPublish(score, href){
	
	var publish = {
		method: 'stream.publish',
		attachment: {
			name: 'The Devil In You',
			caption: '{*actor*} has '+score+' of the Devil in them.',
			description: (
				'How morally corrupt are you? Go here to find out. '+href
			),
			href: href,
			media: [
				{ 'type': 'image', 
				'src': href+'/images/90x90.jpg', 
				'href': href }
			]
		},
		action_links: [
			{ text: 'Go to the Devil In You', href: href }
		]
	};

	FB.ui(publish);
 
}

function postToTwitter(score, href){
	LeftPosition = (screen.width) ? (screen.width-780)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-570)/2 : 0;
	window.open('http://twitter.com/home?status='+encodeURIComponent('I have '+score+' of the Devil in me. Are you more morally corrupt than I am? Click here to find out '+href),'sharer','toolbar=0,scrollbars=1,status=0,width=780,height=570,top='+TopPosition+',left='+LeftPosition);
	return false;
}
