
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="The images of this site are copyright of Oxford Botanica.\nCopying is not permitted.";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")





function toggleTextLink(id, textLink){ 
  ID = document.getElementById(id);
  button = document.getElementById(textLink);
     
  if(ID.style.display == "") {
    ID.style.display = "none";
    button.innerHTML="Show Text";
    button.style.color="#FB6614";
  }
          
  else {
    ID.style.display = "";
    button.innerHTML="Hide Text";
    button.style.color="orange";
  }
}

function togglePicLink(id, picLink){ 
  ID = document.getElementById(id);
  button = document.getElementById(picLink);
     
  if(ID.style.display == "") {
    ID.style.display = "none";
    button.innerHTML="View Pics";
    button.style.color="#FB6614";
  }
          
  else {
    ID.style.display = "";
    button.innerHTML="Hide Pics";
    button.style.color="orange";
  }
}


function toggleTextPicLinks(imgContainer, txtContainer, buttonClicked, textLink, picLink, ss) { 
  imgArea = document.getElementById(imgContainer);
  txtArea = document.getElementById(txtContainer);
  txtButton = document.getElementById(textLink);
  imgButton = document.getElementById(picLink);

  button = document.getElementById(buttonClicked);

  slide = document.getElementById(ss);


  if (buttonClicked == textLink) {
    displayArea = txtArea;
  } else {
    displayArea = imgArea;
  }
     
  if(displayArea.style.display == "") {
    displayArea.style.display = "none";
    if (displayArea == imgArea) {
      txtButton.innerHTML="Show Text";
      txtButton.style.color="#FB6614";
      imgButton.innerHTML="Show Pics";
      imgButton.style.color="#FB6614";

    } else if (displayArea == txtArea) {

      txtButton.innerHTML="Show Text";
      txtButton.style.color="#FB6614";
    }
  } else {
    displayArea.style.display = "";
    if (displayArea == imgArea) {
      txtArea.style.display = "none";

      imgButton.innerHTML="Hide Pics";
      imgButton.style.color="orange";
      txtButton.innerHTML="Show Text";
      txtButton.style.color="#FB6614";

    } else if (displayArea == txtArea) {
      imgArea.style.display = "none";

      txtButton.innerHTML="Hide Text";
      txtButton.style.color="orange";
      imgButton.innerHTML="View Pics";
      imgButton.style.color="#FB6614";
    }
  }

}



function validate() {
  name=contactForm.ContactName.value;
  email=contactForm.ContactEmail.value
  if (name=='') {
    alert('Your name is a required field. Please try again.');
    event.returnValue=false;
    return;
  }

  if (email=='') {
    alert('Your email address is a required field. Please try again.');
    event.returnValue=false;
    return;
  }

  apos=email.indexOf("@");
  dotpos=email.lastIndexOf(".");
  if (apos<1||dotpos-apos<2) {
    alert('Please enter a valid email address');
    event.returnValue=false;
    return;
  }
}


function showText(textID) {
    var text = document.getElementById(textID);
    var rbContatiner = document.getElementById('rightBorderContainer');

    if (text.style.display == "") {
	text.style.display = "none";
        rbContatiner.style.display="";
    } else {
        text.style.display = "";
        rbContatiner.style.display="none";
    }
  }

