function getpet () {



        var toyear = 1997;
        var birthyear = document.frm.inyear.value;
        var birthpet="Buey"

        if ( (isNaN(birthyear)) || (birthyear.length == 0) )
           { document.frm.birth.value = "???"; return false; }


        x = (toyear - birthyear) % 12
        if ((x == 1) || (x == -11)) {
            birthpet="Rata"      }
            else  {
             if (x == 0)             {
             birthpet="Buey"           }
             else  {
              if ((x == 11) || (x == -1)) {
              birthpet="Tigre"          }
              else  {
               if ((x == 10) || (x == -2)) {
               birthpet="Conejo"         }
               else  {
                if ((x == 9) || (x == -3))  {
                birthpet="Dragón"         }
                else  {
                 if ((x == 8) || (x == -4))  { 
                 birthpet="Serpiente"          }
                 else  {
                  if ((x == 7) || (x == -5))  { 
                  birthpet="Caballo"          }
                  else  {
                   if ((x == 6) || (x == -6))  { 
                   birthpet="Cabra"          }
                   else  {
                    if ((x == 5) || (x == -7))  {  
                    birthpet="Mono"         }
                    else  {
                     if ((x == 4) || (x == -8))  {
                     birthpet="Gallo"        }
                     else  {
                      if ((x == 3) || (x == -9))  {
                      birthpet="Perro"            }
                      else  {
                       if ((x == 2) || (x == -10))  {
                       birthpet="Cerdo"             }  
                      }
                     }
                    }
                   }
                  }
                 }
                }
               }
              }
             }
            }
        document.frm.birth.value = birthpet;
}