//--------------------------------
//Functions used on Public sites
//--------------------------------

//Standard function for clearing text of an email input box
function clearfield(){
if (document.maillist.email.value == "Your email address")
	document.maillist.email.value = "";
}

//Subscribe to the mailing list
function subscribeAction(action)
{
	form = document.maillist;
	if (form.email.value == "") 
	{
		alert("Please enter an email address.")
	}
	else if (form.email.value == "Your email address") 
	{
		alert("Please enter a valid email address.")
	}
	else
	{
		alert('Thank you for subscribing. Your email address will be added to our mailing list.');
		form.action.value = action;
		form.submit();
	}	
}

//Required function for photo gallery image switcher
function showPic (whichpic) {
 if (document.getElementById) {
  document.getElementById('placeholder').src = whichpic.href;
  if (whichpic.title) {
   document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
  } else {
   document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
  }
  return false;
 } else {
  return true;
 }
}
