function go(destination){
  document.location.href='/'+destination;
}
function activateInput(inputControl){
  if(inputControl.value=='Keyword' || inputControl.value=='Search this site ...'){
    inputControl.value='';
    inputControl.style.color='#000000';
  }
}
function activateSelect(inputControl){
  if(inputControl.selectedIndex==0){
    inputControl.style.color='#000000';
  }
}
function mOver(tdId,bgColour){
	if(document.getElementById){
		document.getElementById(tdId).style.backgroundColor = bgColour;}
	else if(document.all){
		document.all.item(tdId).style.backgroundColor = bgColour;}
	}

function mOut(tdId,bgColour){
	if(document.getElementById){
		document.getElementById(tdId).style.backgroundColor = bgColour;}
	else if(document.all){
		document.all.item(tdId).style.backgroundColor = bgColour;}
	}
	
function go(filename){
  document.location.href='/'+filename;
}

  function validatePostcode(controlName){
    var exp = /(GIR 0AA|[A-PR-UWYZ]([0-9]{1,2}|([A-HK-Y][0-9]|[A-HK-Y][0-9]([0-9]|[ABEHMNPRV-Y]))|[0-9][A-HJKS-UW]) [0-9][ABD-HJLNP-UW-Z]{2})/;
    if(exp.test(controlName.value) || controlName.value.indexOf(" ")>0){
      return true;
    }
    else {
      return false;
    }
  }
  
  function validateEmailAddress(controlName){
    var exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
    if(exp.test(controlName.value)){
      return true;
    }
    else {
      return false;
    }
  }
  
  function upperCase(controlName){
    controlName.value=controlName.value.toUpperCase();
  }
  
  function lowerCase(controlName){
    controlName.value=controlName.value.toLowerCase();
  }
  
  function toProperCase(controlName){
    //controlName.value = controlName.value.toLowerCase().replace(/^(.)|\s(.)/g, function($1) { return $1.toUpperCase(); });
    controlName.value = controlName.value.capitalize()
  }
  
  String.prototype.capitalize = function(){ //v1.0
    return this.replace(/\w+/g, function(a){
      return a.charAt(0).toUpperCase() + a.substr(1).toLowerCase();
    })
  }
  
  function numbersOnly(controlName){
    var carCode = event.keyCode;
    if ((carCode < 48) || (carCode > 57)){
      event.cancelBubble = true;
      event.returnValue = false;
    }
  }
  
  function validateMobile(controlName){
    var exp = /^07([0-9])+\s?([0-9])+$/;
    if(exp.test(controlName.value) || controlName.value==''){
      return true;
    }
    else {
      return false;
    }
  }

  function validatePassword(controlName){
    if(controlName.value.length<5){
      return false;
    }
    else {
      return true;
    }
  }

