function updateProfileThumbs()
{
  var url = '/findaphotographer/thumbs_for_portfolio.php';
  var pars = 'id=' + $('portfolio_id').value;
	disableProfilePulldown();
	var myAjax = new Ajax.Updater(
    'thumbnails', 
    url, 
    {
      method: 'get', 
      parameters: pars,
      onComplete: enableProfilePulldown
		});
}

function enableProfilePulldown(request)
{
  $('portfolio_id').disabled = false;
  Element.update('full_size_stuff', '<p>Click to enlarge.</p>');
}

function disableProfilePulldown(request)
{
	$('portfolio_id').disabled = true;
}

/*
function showFullPhoto(id) {
   jQuery('img.fullsize').attr('src', '/images/findaphotographer/loading.gif');
   jQuery('#full_size_stuff').load( '/findaphotographer/full_size_photo.php?id=' + id);
}
*/

function showFullPhoto(id)
{
  var url = '/findaphotographer/full_size_photo.php';
  var pars = 'id=' + id;
	Element.update('full_size_stuff', '<img src="/images/findaphotographer/loading.gif" class="fullsize" />');
	var myAjax = new Ajax.Updater(
    'full_size_stuff', 
    url, 
    {
      method: 'get', 
      parameters: pars
		});
}

function toggleCheckboxes1()
{
  if ($('has_photos').checked || document.findaphotographerform.has_photos.checked)
  {
    // leave it alone
  }
  else
  {
    $('has_photos_in_specialty').checked = false;
    document.findaphotographerform.has_photos_in_specialty.checked = false; 
  }
  return true;
}

function toggleCheckboxes2()
{
  if ($('has_photos_in_specialty').checked || document.findaphotographerform.has_photos_in_specialty.checked)
  {
    $('has_photos').checked = true;
    document.findaphotographerform.has_photos.checked = true; 
  }
  else
  {
    // leave it alone
  }
  return true;
}

function checkForSpecialty()
{
  // check to see if they are trying to match specialty photos without choosing a specialty.
  if ($('has_photos_in_specialty').checked || document.findaphotographerform.has_photos_in_specialty[1].checked)
  {
    if ($('search_value_1').value == 0 && $('search_value_2').value == 0 && $('search_value_3').value == 0)
    {
      alert('If you are looking for photos that have a specialty you must choose a specialty. Please select a specialty and try again.')
      return false;
    }
  }
  return true;
}








