function codeGen( number ) {
var base = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'.split( '' );
var result = '', quotient, remainder;
do {
quotient = Math.floor( number / base.length );
remainder = number % base.length;
number = quotient - 1;
result = base[ remainder ] + result;
} while ( quotient > 0 );
return result;
}