                        for(var i=0;i<input.length;i++)
                          {                  
                            if(isNaN(input[i])){
                            continue;
                             }
                              total += Number(input[i]);
                           }
                         return total;
                        }

<?php if(@$_SESSION['username'] != null){
  echo "function MyDiv(Sessao,Dono,ImgWeapon,NameW,UltimoL,PrecoL) {
  $('#caseWin2').modal('show');
  $('#DedorLeilao').text(Dono+' ');