﻿function share(val, u, t, c)
{
   if (u == undefined)
	   u="http://www.bonzai-i.com/";
   if (t == undefined)
	   t="Bonzaï Interactive";
   if (c == undefined)
	   c = "";
   switch(val)
   {
      case "facebook" : window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t)+'&c='+encodeURIComponent(c),'sharer','toolbar=0,status=0,width=626,height=436,resizable=1'); break;
      case "google" : window.open('http://www.google.com/bookmarks/mark?op=edit&bkmk='+encodeURIComponent(u)+'&title='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=750,height=520,resizable=1'); break;
      case "twitter" : window.open('http://twitter.com/?status='+encodeURIComponent(t)+' : '+encodeURIComponent(u),'sharer','toolbar=0,status=0,width=800,height=450,resizable=1'); break;
      case "myspace" : window.open('http://www.myspace.com/Modules/PostTo/Pages/?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t)+'&c='+encodeURIComponent(c),'sharer','toolbar=0,status=0,width=626,height=436,resizable=1'); break;
   }
   return false;
}
