//-------------------------------------------
//-- count number of chars in string passed in and
//-- compare with a maximumm value passed
function countChars(str,id,maxLen,formName){

//-- define form elements to use
charCountUsed = eval("document." + formName + ".charCountUsed"+id);
charCountRem	= eval("document." + formName + ".charCountRem"+id);

contactData = "email: info@heavenonearth.org.uk\rtel: 020 8868 3353"
	//-- check string length vs max length allowed
	//-- check for exceeded value (will happen if user pastes data into box)

	if(str.value.length > maxLen){
		alert("sorry - you have exceeded the maximum amount of text allowed in this field.");
		fullString = str.value;
		str.value = fullString.substring(0,maxLen-1);
		str.focus();
	}
	if(str.value.length == maxLen){
		alert("sorry - you have reached the maximum amount of text allowed in this field.");
		len = str.value.length;
		charCountUsed.value = len;
		charCountRem.value = maxLen - len;
		return false; 
	}else{
		//-- if its ok then increment thc counter
		len = str.value.length;
		charCountUsed.value = len;
		charCountRem.value = maxLen - len;
	}
}