var TabbedPanelOrgs   = new Spry.Widget.TabbedPanels("TabbedPanelsOrgs");
  var TabbedPanelGiving = new Spry.Widget.TabbedPanels("TabbedPanelsGiving");
  
  

  function goToTab(obj,action){
      var idx      = obj.currentTabIndex;
	  var myTabCnt = obj.getTabbedPanelCount();
	  
	  switch(action){
	      case 'prev':
		  if(idx > 0){
		      obj.showPanel(idx-1);
		  } else {
		      obj.showPanel(myTabCnt-1);
		  } break;
		  
		  case 'next':
		  if(idx < myTabCnt-1){
		      obj.showPanel(idx+1);
		  } else {
		      obj.showPanel(0);
		  } break;
		  
		  default:
		  obj.showPanel(idx+action);
	  }
  }