
function showDiv (divId) {
  Logger.debug("showDiv started =>" + divId );
  Element.show(divId);
  
  return false;
}


function hideDiv (divId) {
  Logger.debug("tring to hide" + divId );
  Element.hide(divId);
  return false;
}

function toggler (divId) {
  Logger.debug("tring to hide/show " + divId );
  Logger.debug("element.style.display => " + $('searchBox_right').style.display );
  

  if($('searchBox_right').style.display == 'none') {
	 Logger.debug("Setting Block" );
	 $('searchBox_right').style.display = 'block';
  }
  else if ($('searchBox_right').style.display == '') {
  //special case for first click

	 Logger.debug("Setting Block" );
	 $('searchBox_right').style.display = 'block';
  }
  else {
	 Logger.debug("Setting None" );
	 $('searchBox_right').style.display = 'none';
  }

  return false;
}
  
function itemType () {
  Logger.debug("itemType Started" );
  var selectBox = document.frmSearch.item_type;
  var item_type = selectBox.options[selectBox.selectedIndex].value;

  if (item_type == 'channel') {
	 $('src_gender').style.display = 'block';
  }
  else {
	 Logger.debug("Setting None" );
	 $('src_gender').style.display = 'none';
  }

  return false;
}



function locationCheck () {
  Logger.debug("locationCheck Started" );
  var location_id;
  if (document.frmSearch.location_id) {
	 var selectBox = document.frmSearch.location_id;
	 location_id = selectBox.options[selectBox.selectedIndex].value; 
  }
  else {
	 location_id = null;
  }
  var textField = document.frmSearch.postal_code;
  var postal_code = textField.value;


  if ((location_id) || (postal_code)) {
	 
	 $('searchBox_right').style.display = 'block';
  }
  else {
	 Logger.debug("Setting None" );
	 $('searchBox_right').style.display = 'none';
  }

  return false;
}



function startup () {
  itemType();
  //  locationCheck ();

  return false;
}
