﻿var URL = encodeURIComponent("http://www.mapcraigs.com/");
var title = encodeURIComponent("MapCraigs - Free maps of current Craigslist Housing ads");
var body = encodeURIComponent("Craigslist classified housing ads displayed on Google Maps");
var tags = encodeURIComponent("Craigslist map housing MapCraigs");

function sharePop(url, width, height, name) {
	testwindow= window.open(url, name, "location=1,status=1,scrollbars=1,resizable=1,width=" + width + ",height=" + height);
}

function shareDelicious() {
	sharePop('http://del.icio.us/post?v=2&url='+URL+'&title='+title+'&bodytext=' + body + '&tags='+tags, 850, 600, 'deliciousPopup');
}

function shareDigg() {
    sharePop('http://digg.com/submit?url=' + URL + '&title=' + title + '&bodytext=' + body + '&tags=' + tags + '&topic=shopping', 850, 600, 'diggPopup');
}

function shareFacebook() {
    sharePop('http://www.facebook.com/sharer.php?u=' + URL + '&t=' + title, 850, 600, 'facebookPopup');
}

function shareLinkedIn() {
	sharePop('http://www.linkedin.com/shareArticle?mini=true&url='+URL+'&title='+title+'&summary='+body+ '&source=MapCraigs.com', 850, 600, 'linkedinPopup');
}


function shareProp() {
	sharePop('http://www.propeller.com/submit/?T='+title+'&U='+URL+'&D='+body+'&tag='+tags , 850, 540, 'propPopup');
}

function shareYahoo() {
	sharePop('http://buzz.yahoo.com/submit?submitUrl=' + URL+ '&submitHeadline=' + title + '&submitSummary=' + body, 980, 540, 'yahooPopup');
}