Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- birthday.js
- Copyright 2011 (C) Ephasic.org
- */
- var lists = new Array();
- lists['months'] = new Array();
- lists['months'][0] = new Array(
- 'Jan', 'Feb', 'March', 'April', 'May', 'June', 'July', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
- );
- lists['months'][1] = new Array(
- 'jan', 'feb', 'march', 'april', 'may', 'june', 'july', 'aug', 'sep', 'oct', 'nov', 'dec'
- );
- lists['days'] = new Array();
- lists['days']['jan'] = new Array(
- '1', '2', '3', '4', '5', '6', '7', '8', '9', '10',
- '11', '12', '13', '14', '15', '16', '17', '18', '19', '20',
- '21', '22', '23', '24', '25', '26', '28', '29', '30', '31'
- );
- lists['days']['feb'] = new Array(
- '1', '2', '3', '4', '5', '6', '7', '8', '9', '10',
- '11', '12', '13', '14', '15', '16', '17', '18', '19', '20',
- '21', '22', '23', '24', '25', '26', '28'
- );
- lists['days']['march'] = new Array(
- '1', '2', '3', '4', '5', '6', '7', '8', '9', '10',
- '11', '12', '13', '14', '15', '16', '17', '18', '19', '20',
- '21', '22', '23', '24', '25', '26', '28', '29', '30', '31'
- );
- lists['days']['april'] = new Array(
- '1', '2', '3', '4', '5', '6', '7', '8', '9', '10',
- '11', '12', '13', '14', '15', '16', '17', '18', '19', '20',
- '21', '22', '23', '24', '25', '26', '28', '29', '30'
- );
- lists['days']['may'] = new Array(
- '1', '2', '3', '4', '5', '6', '7', '8', '9', '10',
- '11', '12', '13', '14', '15', '16', '17', '18', '19', '20',
- '21', '22', '23', '24', '25', '26', '28', '29', '30', '31'
- );
- lists['days']['june'] = new Array(
- '1', '2', '3', '4', '5', '6', '7', '8', '9', '10',
- '11', '12', '13', '14', '15', '16', '17', '18', '19', '20',
- '21', '22', '23', '24', '25', '26', '28', '29', '30'
- );
- lists['days']['july'] = new Array(
- '1', '2', '3', '4', '5', '6', '7', '8', '9', '10',
- '11', '12', '13', '14', '15', '16', '17', '18', '19', '20',
- '21', '22', '23', '24', '25', '26', '28', '29', '30', '31'
- );
- lists['days']['aug'] = new Array(
- '1', '2', '3', '4', '5', '6', '7', '8', '9', '10',
- '11', '12', '13', '14', '15', '16', '17', '18', '19', '20',
- '21', '22', '23', '24', '25', '26', '28', '29', '30', '31'
- );
- lists['days']['sep'] = new Array(
- '1', '2', '3', '4', '5', '6', '7', '8', '9', '10',
- '11', '12', '13', '14', '15', '16', '17', '18', '19', '20',
- '21', '22', '23', '24', '25', '26', '28', '29', '30'
- );
- lists['days']['oct'] = new Array(
- '1', '2', '3', '4', '5', '6', '7', '8', '9', '10',
- '11', '12', '13', '14', '15', '16', '17', '18', '19', '20',
- '21', '22', '23', '24', '25', '26', '28', '29', '30', '31'
- );
- lists['days']['nov'] = new Array(
- '1', '2', '3', '4', '5', '6', '7', '8', '9', '10',
- '11', '12', '13', '14', '15', '16', '17', '18', '19', '20',
- '21', '22', '23', '24', '25', '26', '28', '29', '30'
- );
- lists['days']['dec'] = new Array(
- '1', '2', '3', '4', '5', '6', '7', '8', '9', '10',
- '11', '12', '13', '14', '15', '16', '17', '18', '19', '20',
- '21', '22', '23', '24', '25', '26', '28', '29', '30', '31'
- );
- function clear_lists(box) {
- while (box.options.length) box.options[0] = null;
- }
- function fill_daylist(list, array, m) {
- for (i = 0; i < array['days'][m].length; i++) {
- option = new Option(array['days'][m][i], array['days'][m][i]);
- list.options[list.length] = option;
- }
- list.selectedIndex = 0;
- }
- function change_List(box) {
- list = lists[box.options[box.selectedIndex].value];
- clear_lists(box.form.day);
- month = document.forms['signup']['month'].value;
- fill_daylist(box.form.day, lists, month);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement