




function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}










addLoadEvent(function() {
	// 10-19-07 - this is for the genre drop down box in the sidebar at monkeyclaus.org/store.php. 
	// This is to cause the drop down box to activate onchange. What we want: 	
	//
	// http://www.monkeyclaus.org/search.php?listAllGenres=Latin
			  
	  if (document.getElementById("listAllGenres")) {
		  var refToGenreDropDownBox = document.getElementById("listAllGenres");
		  refToGenreDropDownBox.onchange = function() {
			var valueOfDropDownBox = refToGenreDropDownBox.value;
			location.href = "http://www.monkeyclaus.org/search.php?listAllGenres=" + valueOfDropDownBox;
		  }
	  }
});



addLoadEvent(function() {
	// 10-19-07 - this is for the styles drop down box in the sidebar at monkeyclaus.org/store.php. 
	// This is to cause the drop down box to activate onchange. What we want: 	
	//
	// http://www.monkeyclaus.org/search.php?listAllStyles=Alternative

			  
	  if (document.getElementById("listAllStyles")) {
		  var refToGenreDropDownBox = document.getElementById("listAllStyles");
		  refToGenreDropDownBox.onchange = function() {
			var valueOfDropDownBox = refToGenreDropDownBox.value;
			location.href = "http://www.monkeyclaus.org/search.php?listAllStyles=" + valueOfDropDownBox;
		  }
	  }
});



addLoadEvent(function() {
	// 10-19-07 - this is for the styles drop down box in the sidebar at monkeyclaus.org/store.php. 
	// This is to cause the drop down box to activate onchange. What we want: 	
	//
	// http://www.monkeyclaus.org/search.php?listAllStyles=Alternative

			  
	  if (document.getElementById("artists")) {
		  var refToGenreDropDownBox = document.getElementById("artists");
		  refToGenreDropDownBox.onchange = function() {
			var valueOfDropDownBox = refToGenreDropDownBox.value;
			location.href = "http://www.monkeyclaus.org/search.php?artists=" + valueOfDropDownBox;
		  }
	  }
});




