You have at least nine of these, with various "o#" and letters.
if (document.getElementById("o1").disabled=false == "P") ocr = ocr + 21;
They will always evaluate to false, since
document.getElementById("o1").disabled=false
doesn't return a character value
So the incrementing of ocr will never occur and the value will never be correct.