I am trying to highlight certain bits of my javascript code. I have HTML which contains the text boxes, the code below basically calculates totals of information and outputs them.

I want to highlight the boxes when they are above a certain number.

FTw should highlight at 17 and above
FBw should highlight at 13 and above
FTp should highlight at 14 and above
FBp should highlight at 14 and above
FTt should highlight at 10 and above
FBt should highlight at 13 and above

Here is the code so far:

Code:
   }
   total();
}

/* Totals */

function total(){
 var t11 = document.getElementsByClassName("FTw1"),
     t12 = document.getElementsByClassName("FBw1"),
     t13 = document.getElementsByClassName("FTp1"),
     t14 = document.getElementsByClassName("FBp1"),
     t15 = document.getElementsByClassName("FTt1"),
     t16 = document.getElementsByClassName("FBt1"),
     t21 = document.getElementsByClassName("FTw2"),
     t22 = document.getElementsByClassName("FBw2"),
     t23 = document.getElementsByClassName("FTp2"),
     t24 = document.getElementsByClassName("FBp2"),
     t25 = document.getElementsByClassName("FTt2"),
     t26 = document.getElementsByClassName("FBt1"),
     tperc = document.getElementsByClassName("perc"),
     t1 = document.getElementById("FTw1").value,
     t2 = document.getElementById("FBw1").value,
     t3 = document.getElementById("FTp1").value,
     t4 = document.getElementById("FBp1").value,
     t5 = document.getElementById("FTt1").value,
     t6 = document.getElementById("FBt1").value,
     tt1 = document.getElementById("FTw2").value,
     tt2 = document.getElementById("FBw2").value,
     tt3 = document.getElementById("FTp2").value,
     tt4 = document.getElementById("FBp2").value,
     tt5 = document.getElementById("FTt2").value,
     tt6 = document.getElementById("FBt2").value,
     ttperc = document.getElementById("perc").value,
     s11 = "FTw1",
     s12 = "FBw1",
     s13 = "FTp1",
     s14 = "FBp1",
     s15 = "FTt1";
     s16 = "FBt1";
     s21 = "FTw2",
     s22 = "FBw2",
     s23 = "FTp2",
     s24 = "FBp2",
     s25 = "FTt2";
     s26 = "FBt2";
     sperc = "perc";
 sum(t11,t1,s11);
 sum(t12,t2,s12);
 sum(t13,t3,s13);
 sum(t14,t4,s14);
 sum(t15,t5,s15);
 sum(t16,t6,s16);
 sum(t21,tt1,s21);
 sum(t22,tt2,s22);
 sum(t23,tt3,s23);
 sum(t24,tt4,s24);
 sum(t25,tt5,s25);
 sum(t26,tt6,s26);
 sum(tperc,ttperc,sperc);
 
  if (document.getElementById("perc").value >= '66') {
     document.getElementById("perc").className = 'highlight';
 }else{
     document.getElementById("perc").className = ''; 
 }
 }

function sum(c,t,s){
 t = '0';
 for(var i = 0; i < c.length; i++){
  var a = c[i].value,
      b = 1*a+1*t;
  t = b;
  document.getElementById(s).value = t;
 }
}
Hope somebody can help with this, also I have already added to the HTML file the following line in the <head> area:

<style>
.highlight{
background-color:green;
}
</style>