﻿     var zip = {
         tbZipcode: null,
         tbCity: null,
         a: [],
                  
         initialize : function(tbZipcode, tbCity){
             this.tbZipcode = $(tbZipcode);
             this.tbCity = $(tbCity);
             this.tbZipcode.observe('keyup', this.keypress.bind(this));
         },
         
         keypress: function(){
             if(this.tbZipcode.value.length == 4){
                 if(this.a[this.tbZipcode.value])this.tbCity.value = this.a[this.tbZipcode.value];
             }else{
                 this.tbCity.value = '';
             }            
         }
     }