javascript to deal with select address