var genres = new Array();  genres.push(new Array(2, "Blues", 8));  genres.push(new Array(2, "Electronic", 16));  genres.push(new Array(834, "Events", 835));  genres.push(new Array(2, "Experimental", 18));  genres.push(new Array(2, "Flamenco", 19));  genres.push(new Array(2, "Folk", 20));  genres.push(new Array(1, "Free Dance", 502));  genres.push(new Array(2, "Global", 442));  genres.push(new Array(794, "Italian Cuisine", 807));  genres.push(new Array(2, "Jazz", 23));  genres.push(new Array(2, "Latin", 24));  genres.push(new Array(2, "Lounge", 636));  genres.push(new Array(794, "Mexican Cuisine", 795));  genres.push(new Array(558, "Music", 559));  genres.push(new Array(4, "Painting", 435));  genres.push(new Array(2, "Pop", 31));  genres.push(new Array(2, "Rock", 36));var subgenres = new Array();  subgenres.push(new Array(8, " Rhythm And Blues", 580));  subgenres.push(new Array(36, "Acoustic", 578));  subgenres.push(new Array(36, "Alternative", 284));  subgenres.push(new Array(8, "Alternative", 649));  subgenres.push(new Array(23, "American Jazz", 463));  subgenres.push(new Array(23, "Big Band", 741));  subgenres.push(new Array(636, "Blues", 658));  subgenres.push(new Array(8, "Blues", 691));  subgenres.push(new Array(23, "Blues", 185));  subgenres.push(new Array(795, "Cebicheria Peruana", 818));  subgenres.push(new Array(36, "Classic", 287));  subgenres.push(new Array(50, "Club", 367));  subgenres.push(new Array(835, "Clubs", 836));  subgenres.push(new Array(24, "Cumbia", 200));  subgenres.push(new Array(16, "Deep Techno", 591));  subgenres.push(new Array(502, "Disco", 809));  subgenres.push(new Array(16, "Dj", 664));  subgenres.push(new Array(36, "DJs", 791));  subgenres.push(new Array(502, "Electro", 811));  subgenres.push(new Array(16, "Electro", 140));  subgenres.push(new Array(36, "Experimental", 288));  subgenres.push(new Array(19, "Fandagos", 166));  subgenres.push(new Array(435, "Gallery", 734));  subgenres.push(new Array(807, "Gourmet Pizza Restaurant", 808));  subgenres.push(new Array(23, "Gypsy Jazz", 665));  subgenres.push(new Array(31, "Hip Hop", 686));  subgenres.push(new Array(20, "Hip Hop", 692));  subgenres.push(new Array(16, "Hip Hop", 720));  subgenres.push(new Array(16, "House", 143));  subgenres.push(new Array(36, "Indie", 640));  subgenres.push(new Array(31, "Indie", 252));  subgenres.push(new Array(442, "International", 778));  subgenres.push(new Array(20, "Irish", 445));  subgenres.push(new Array(8, "Jazz", 82));  subgenres.push(new Array(636, "Jazz", 659));  subgenres.push(new Array(31, "Latin", 254));  subgenres.push(new Array(835, "Limo", 837));  subgenres.push(new Array(442, "Live Music", 805));  subgenres.push(new Array(16, "Lounge", 144));  subgenres.push(new Array(559, "Lounge", 724));  subgenres.push(new Array(559, "Marathon", 723));  subgenres.push(new Array(36, "Metal", 647));  subgenres.push(new Array(16, "Minimal", 145));  subgenres.push(new Array(16, "Minimal Techno", 698));  subgenres.push(new Array(5, "Pop", 65));  subgenres.push(new Array(16, "Pop", 721));  subgenres.push(new Array(36, "Progressive", 296));  subgenres.push(new Array(36, "Punk", 297));  subgenres.push(new Array(31, "Punk", 255));  subgenres.push(new Array(36, "Reggae", 646));  subgenres.push(new Array(795, "Restaurant", 797));  subgenres.push(new Array(23, "Restaurant", 595));  subgenres.push(new Array(795, "Restaurant/Bar", 806));  subgenres.push(new Array(8, "Rock", 85));  subgenres.push(new Array(20, "Rock", 179));  subgenres.push(new Array(31, "Rock", 253));  subgenres.push(new Array(36, "Rock And Roll", 298));  subgenres.push(new Array(24, "Salsa", 655));  subgenres.push(new Array(24, "Samba", 207));  subgenres.push(new Array(23, "Smooth Jazz", 571));  subgenres.push(new Array(36, "Soul", 300));  subgenres.push(new Array(31, "Soul", 687));  subgenres.push(new Array(23, "Soul", 464));  subgenres.push(new Array(23, "Straight Ahead/Classic", 584));  subgenres.push(new Array(23, "Swing", 623));  subgenres.push(new Array(16, "Tech House", 454));  subgenres.push(new Array(502, "Techno", 810));  subgenres.push(new Array(16, "Techno", 149));  subgenres.push(new Array(18, "Tequila", 792));  subgenres.push(new Array(16, "Trance", 150));  subgenres.push(new Array(23, "Vintage Jazz", 626));function artSelected() {  art_id = $('taxonomy_art_id').getValue();  options = $('taxonomy_genre_id').options;    if (options[0].value == "") { 								// If the first option is the prompt option then...  	//options.length = 1;  	// For Safari 4	  while(options.length > 1) { $('taxonomy_genre_id').options[$('taxonomy_genre_id').options.length - 1] = null; }   } else { 																			// else it is a preselected value.  	//options.length = 0;   	// For Safari 4  	while(options.length > 0) { $('taxonomy_genre_id').options[$('taxonomy_genre_id').options.length - 1] = null; }  }    genres.each(function(genre) {    if (genre[0] == art_id) {      options[options.length] = new Option(genre[1], genre[2]);    }  });  if (options.length == 1) {    $('taxonomy_genre_id').disabled = true;  } else {    $('taxonomy_genre_id').disabled = false;    new Effect.Highlight("taxonomy_genre_id",{duration:0.5});  }    genreSelected();}function genreSelected() {  genre_id = $('taxonomy_genre_id').getValue();  options = $('taxonomy_subgenre_id').options;    if (options[0].value == "") { 								// If the first option is the prompt option then...  	//options.length = 1;  	// For Safari 4	  while(options.length > 1) { $('taxonomy_subgenre_id').options[$('taxonomy_subgenre_id').options.length - 1] = null; }   } else { 																			// else it is a preselected value.  	//options.length = 0;   	// For Safari 4  	while(options.length > 0) { $('taxonomy_subgenre_id').options[$('taxonomy_subgenre_id').options.length - 1] = null; }  }    subgenres.each(function(subgenre) {    if (subgenre[0] == genre_id) {      options[options.length] = new Option(subgenre[1], subgenre[2]);    }  });  if (options.length == 1) {    $('taxonomy_subgenre_id').disabled = true;  } else {    $('taxonomy_subgenre_id').disabled = false;    new Effect.Highlight("taxonomy_subgenre_id",{duration:0.5});  }}document.observe('dom:loaded', function() {  artSelected();  $('taxonomy_art_id').observe('change', artSelected);  $('taxonomy_genre_id').observe('change', genreSelected);});