// branch is the specific branch to close or open
// the two img_ vars are for the swapImage function
function showInfo() {
	document.getElementById("imageInfo").style.display='';
	document.getElementById("imageInfoBtn").onClick='javascript:hideInfo();';
}
function hideInfo() {
	document.getElementById("imageInfo").style.display='none';
}

function sendmail(t,n,d) { 
	window.location = 'mai' + 'lto:' + n + '@' + d + '.' + t;
}

// Image rolover script
<!--  //
 
NAVarr = new Array("hatton","furniture","landscaping","about","contact","about_gr","contact_gr","blog_gr","blog","gallery","gallery_gr","press","press_gr");
 
if (document.images) {
  for (var NAVitem in NAVarr) {
    for (var NAVicount=0; NAVicount < 2; NAVicount++) {
      eval("b" + NAVarr[NAVitem] + NAVicount + " = new Image()");
      eval("b" + NAVarr[NAVitem] + NAVicount + ".src = '_assets/img_nav_" + NAVarr[NAVitem] + "_" + NAVicount + ".gif'");
    }
  }
}
 
 
var activeImg;
activeImg = "off";
 
function BturnOn(imageName) {
  if (document.images) { document [imageName].src = eval("b" + imageName + "1.src");  }
  }
 
function BturnOff(imageName) {
  if (document.images) { if (imageName != activeImg) {
    document [imageName].src = eval("b" + imageName + "0.src");  }
  }
  }
 
function BcLick(imageName) {
  if (document.images) { if ((activeImg != "off") && (activeImg != imageName)) {
    document [activeImg].src = eval("b" + activeImg + "0.src"); }
    document [imageName].src = eval("b" + imageName + "1.src");
    activeImg = imageName;
     }
  }
 
//  -->
 
function sendmail(t,n,d) { 
	window.location = 'mai' + 'lto:' + n + '@' + d + '.' + t;
}


function validateEmail(field,alerttxt)
{
with (field)
  {
  apos=value.indexOf("@");
  dotpos=value.lastIndexOf(".");
  if (apos<1||dotpos-apos<2)
    {alert(alerttxt);return false;}
  else {return true;}
  }
}

function validateForm(thisform)
{
with (thisform)
  {
  if (validateEmail(usrEmail,"Please enter a valid email address.")==false)
    {usrEmail.focus();return false;}
  }
}
