var aryQuote = new Array();

	aryQuote[0] = 'Look what our clients are saying.';
	aryQuote[1] = '&quot;Their efforts made a great difference to the outcome of our case. Under difficult circumstances they shone.&quot;';
	aryQuote[2] = '&quot;They explain our options very clearly and deliver exceptional levels of customer service.&quot;';
	aryQuote[3] = '&quot;It&acute;s hard to get to the city to meet with any professional adviser, but Bennett Carroll come to us.&quot;';
	aryQuote[4] = '&quot;Our relationship with Bennett Carroll goes back 20 years. They are people you can trust to do it right.&quot;';
	aryQuote[5] = '&quot;Everybody I dealt with gave me total confidence in your firm; you will see me in the future.&quot;';
	aryQuote[6] = '&quot;Our confidence was quickly gained and if we need any more legal assistance we will come back to you again.&quot;';
	aryQuote[7] = '&quot;Well done for caring about your clients.&quot;';
	aryQuote[8] = '&quot;I will continue to use your services and recommend you to anyone seeking legal advice.&quot;';
	aryQuote[9] = '&quot;Thanks for a great meeting. You are so very helpful and friendly and I am most grateful that somebody understands how these mystifying processes work and is prepared to share that knowledge in a simple and clear way. I feel lucky to have found such a good solicitor.&quot;';
	
var currentPos = aryQuote.length;

function fncPullQuotes() {
	usePos = currentPos + 1;
	if (usePos >= aryQuote.length) {
		usePos = 0;
	}
	displayObj = document.getElementById('pullQuote');
	displayObj.innerHTML = aryQuote[usePos];
	currentPos = usePos;
	setTimeout("fncPullQuotes();", 8000)
}



// isEmpty
function isEmpty (strValue) {
	return (! strValue.replace (/^(\s*)/, "", strValue));
}

// isValidEmail
function isValidEmail (emailStr) {

	var emailPat=/^(.+)@(.+)$/; 
	var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]";
	var validChars="\[^\\s" + specialChars + "\]"; 
	var quotedUser="(\"[^\"]*\")";
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
	var atom=validChars + '+'; 
	var word="(" + atom + "|" + quotedUser + ")";
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");

	var matchArray=emailStr.match(emailPat)
	if (matchArray==null) {
		return false;
	}
	
	var user=matchArray[1];
	var domain=matchArray[2];
	
	if (user.match(userPat)==null) {
		return false;
	}
	
	var IPArray=domain.match(ipDomainPat)
	if (IPArray!=null) {
		for (var i=1;i<=4;i++) {
			if (IPArray[i]>255) {
				return false;
			}
		}
		return true;
	}
	
	var domainArray=domain.match(domainPat)
	if (domainArray==null) {
		return false;
	}

	var atomPat=new RegExp(atom,"g")
	var domArr=domain.match(atomPat)
	var len=domArr.length
	if (domArr[domArr.length-1].length<2 || 
		domArr[domArr.length-1].length>4) {
		return false;
	}

	if (len<2) {
		return false;
	}

	return true;
}


function checkCompleteConditionRequestForm(formObj) {  
	var alert_message = ""; // string to hold error messages

	//----------------------------------------------------------------
	if (isEmpty(formObj.emlName.value)) {
		alert_message = alert_message + "   Your Name\n";
	}

	if (!isValidEmail(formObj.emlEmail.value)) {
		alert_message = alert_message + "   Valid Email Address\n";
	}

	if (isEmpty(formObj.emlName.value)) {
		alert_message = alert_message + "   Your Contact Number\n";
	}


	if (alert_message) {
		alert ("Your form is incomplete.\n" +
			   "You must supply the following information:\n" +
				alert_message);
		return false;
	} else {
		return true;
	}
}