03// JavaScript Document var lastArtist = ''; var moreArtist = ''; function show_div(newdiv) { $("[id*=divArtist]").css('display', 'none'); // hide all div's with an id that starts wiith "divArtist" $('#' + newdiv).css('display', 'block'); // show the specified one } function menu_action(artist, action) { switch (action) { case 'over': if (artist.id != lastArtist) { artist.className = "navhover"; artist.style.cursor='pointer'; artist.style.cursor='hand'; } break; case 'out': if (artist.id != lastArtist) artist.className = "navlink"; break; case 'down': $("[id*=itemArtist]").attr('className', 'navlink'); artist.className = "navactive"; lastArtist = artist.id } } function show_artist() { document.location = "artists.html?artist=" + moreArtist; } function show_hover(artist) { artist.style.cursor='pointer'; artist.style.cursor='hand'; } function set_active(artist) { moreArtist = artist; } function set_artist() { var temp = window.location.search.substring(1); if (temp) { var arr = new Array(); arr = temp.split('='); temp = arr[1]; if (temp) { var showdiv = 'divArtist' + temp; arr = $('#itemArtist' + temp); artist = arr[0]; menu_action(artist,'down'); show_div(showdiv); } } }