function callFacebook(msg) {
	var fbk = msg.split(',');
    window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent('http://www.tv3.cat/elgrandictat/html/joc/f'+fbk[0]+'.html')+'&amp;t='+encodeURIComponent(msg),'sharer','toolbar=0,status=0,width=626,height=436');
};

function callTwitter(twit) {
    var tweet = twit.split(',');

    if (tweet[0]==0) {
		window.open('http://twitter.com/home?status=Si+es+tracta+de+destrossar+el+català,+sóc+el+millor.+No+he+fet+cap+encert+en+el+joc+d´El+Gran+Dictat+http://is.gd/7BVzi','Twitter','toolbar=0,status=0,width=900,height=600');
    } else if (12>tweet[0]) {
		window.open('http://twitter.com/home?status=De+15+paraules,+n´he+encertat+'+tweet[0]+'+i+he+obtingut+'+tweet[1]+'+punts+al+joc+d´El+Gran+Dictat+http://is.gd/7BVzi','Twitter','toolbar=0,status=0,width=900,height=600');
    } else if (15>tweet[0]) {
		window.open('http://twitter.com/home?status=Pompeu+Fabra+estaria+orgullós+de+mi,+de+15+paraules,+n´he+encertat+'+tweet[0]+'+i+he+obtingut+'+tweet[1]+'+punts+al+joc+d´El+Gran+Dictat+http://is.gd/7BVzi','Twitter','toolbar=0,status=0,width=900,height=600');
    } else if (tweet[0]==15) {
		window.open('http://twitter.com/home?status=Sóc+un+crack!+He+encertat+totes+les+paraules+i+he+obtingut+'+tweet[1]+'+punts+al+joc+d´El+Gran+Dictat+http://is.gd/7BVzi','Twitter','toolbar=0,status=0,width=900,height=600');
    };
};
