function BattOnOff_Callback(src,eventdata)
global BattMode;
global LD_sp;

if(BattMode == 1)  %Is on
   err = BK_LoadOn(LD_sp,0);
   err = BK_EnableRemote(LD_sp,0);
   if(~err) 
    BattMode = 0;  %Set to off
    src.String = 'Turn On';
    src.BackgroundColor = 'r';
   end
else  %Is currently off
     err = BK_EnableRemote(LD_sp,1);  
   err = err+BK_SetCCMode(LD_sp);
   err = err+BK_SetMaxCurrent(LD_sp,5);
   err = err+BK_SetCurrent(LD_sp,1);
   err = err+BK_LoadOn(LD_sp,1);
   if(~err) 
    BattMode = 1;  %Set to on
    src.BackgroundColor = 'g';
    src.String = 'Turn Off';
   end
end