Сначала сверяет правильно, а потом например Октябрь меньше чем Ноябрь по списку, а выводит что как-будто больше.
var go = Array( "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "0");
var goimage = Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", "January");
var goimage2 = Array("January2", "February2", "March2", "April2", "May2", "June2", "July2", "August2", "September2", "October2", "November2", "December2", "January2");
if (a1 > a2) {
document.getElementById('img1').innerHTML = "<img src=\"images/result/" + goimage[a1] + "-result.png\" alt=\"" + "\" /> ";
}
else {
document.getElementById('img1').innerHTML = "<img src=\"images/result/" + goimage2[a2] + "-result.png\" alt=\"" + "\" />";
}
<div id="img1"> </div>