var shareLink = function(linkName,photoID) {

	var shareURL = null;
	var shareLink = 'http://www.thegoodliferecipe.com/goodlife-gallery/share-photo.aspx?photoid='+photoID;
	var shareTitle = encodeURIComponent('The Goodlife Recipe(R) Brand: Photo Gallery: Comic-ize Your Pet');
	var shareDescription = encodeURIComponent('Now your pet can have his or her own comic! Upload a picture of your cat or dog to the comic creator with some witty dialogue and a caption. Don\'t forget to share your comic-ized creation with all your friends!');
	
	switch (linkName) {
		case 'MYSPACE':				shareURL = 'http://www.myspace.com/index.cfm?fuseaction=postto&t='+shareTitle+'&c='+shareDescription+'&u='+shareLink+'&l=2';	break;
		case 'FACEBOOK':			shareURL = 'http://www.facebook.com/sharer.php?u='+shareLink+'&t='+shareTitle;																								break;
		case 'DEL.ICIO.US':		shareURL = 'http://del.icio.us/post?url='+shareLink+'&title='+shareTitle;																											break;
		case 'DIGG':					shareURL = 'http://www.digg.com/submit?phase=2&url='+shareLink;																																break;
		case 'LIVE':					shareURL = 'https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url='+shareLink+'&title='+shareTitle;								break;
		case 'YAHOO':					shareURL = 'http://myweb.yahoo.com/myresults/bookmarklet?t='+shareTitle+'&u='+shareLink+'&ei=UTF';														break;
		case 'GOOGLE':				shareURL = 'http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk='+shareLink+'&title='+shareTitle;									break;
		case 'TWITTER':				shareURL = 'http://twitter.com/home?status=Why does your dog love being a cesar® dog? '+shareLink;														break;
		case 'STUMBEUPON':		shareURL = 'http://www.stumbleupon.com/submit?url='+shareLink+'&title='+shareTitle;																						break;
	}
	
	popupWindow(shareURL,'share_pedigree',850,600,'yes');
	
};

var popupWindow = function(url,name,width,height,scroll) {
	if (scroll==null) { scroll = 'no'; }
	leftPosition = (screen.width) ? (screen.width-width) / 2 : 0;
	topPosition = (screen.height) ? (screen.height-height) / 2 : 0;
	settings = 'height='+height+',width='+width+',top='+topPosition+',left='+leftPosition+',scrollbars='+scroll+',resizable';
	win = window.open(url,name,settings)
};

function popupTerms(){
    alert("popupTerms");
}
