function showCatLabel(sCatLabelID) {
  hideAllCatLabels();
  showCL(sCatLabelID);
}

function hideCatLabel(sCatLabelID) {
  hideCL(sCatLabelID);
  showSelectedCatLabel();
}

function showCL(sCatLabelID) {
  oLabel = jphloc.ge(sCatLabelID)
  if (oLabel) {
    jphloc.show(oLabel);
  }
}

function hideCL(sCatLabelID) {
  oLabel = jphloc.ge(sCatLabelID)
  if (oLabel) {
    jphloc.hide(oLabel);
  }
}

function hideAllCatLabels() {
  hideCL("cat_label_a");
  hideCL("cat_label_f");
  hideCL("cat_label_w");
  hideCL("cat_label_v");
}

function showSelectedCatLabel() {
  showCatLabelIfSelected("cat_label_a");
  showCatLabelIfSelected("cat_label_f");
  showCatLabelIfSelected("cat_label_w");
  showCatLabelIfSelected("cat_label_v");
}

function showCatLabelIfSelected(sCatLabelID) {
  var e = jphloc.ge(sCatLabelID);
  if (e && jphloc.hasClass(e, "selected"))
    showCL(sCatLabelID);
}

function customerOnStartGallery()
{
  var aMP3 = jphloc.ge("mp3player");
  if (aMP3)
  {
    jphloc.addClass(aMP3, "hidden");
  }
}

function customerOnCloseGallery()
{
  var aMP3 = jphloc.ge("mp3player");
  if (aMP3)
  {
    jphloc.removeClass(aMP3, "hidden");
  }
}

