var ShareEntryWithSNS = {
  services: ['yozm', 'twitter', 'me2day', 'facebook'],
  actionUrl: '/plugin/sendSNS_Message',
  popupSize: {
	normal: {
	  w: 800,
	  h: 500
	},
	small: {
	  w: 472,
	  h: 340
	}
  },
  share: function(service, entryId, entryTitle) {
	if(service && entryId && entryTitle) {
	 for(var i = 0, s; s = this.services[i]; i++) {
	   if(service == s) {
		 this.post(service, entryId, entryTitle);
		 break;
	   }
	  }
	}
  },
  post: function(service, entryId, entryTitle) {
		var popupWidth = this.popupSize.normal.w, popupHeight = this.popupSize.normal.h;
		if(service === "yozm"){
		  popupWidth = this.popupSize.small.w, popupHeight = this.popupSize.small.h;
		}
		window.open(this.actionUrl + '?service=' + service + '&entryId=' + entryId + '&title=' + encodeURIComponent(entryTitle), service, 'width=' + popupWidth + ', height=' + popupHeight + ',resizable=yes,scrollbars=yes');
  }
};
