/* validate the registration form */
function validateRegister(oForm) {
	if (oForm.terms.checked == false) {
		alert('You must state that you agree to the terms and conditions to register.');
		return false;
	} else {
		var bValid = true;

		//check for security code
		if (oForm.code.value.length < 4) {
			alert('Please enter the security code');
			return false;
		}

		//check for registration and password
		if (oForm.password.value.length < 5) {
			alert('Your password must be 5 or more characters');
			return false;
		}
		if (oForm.password.value != oForm.confirm.value) {
			alert('Your password and confirmation do not match');
			return false;
		}

		//check normal form
		if (oForm.name.value == '' || 
			oForm.company.value == '' ||
			oForm.address1.value == '' || 
			oForm.postcode.value == '' ||
			oForm.telephone.value == '' ||
			oForm.country.value == '') {
			bValid = false;
		}
		//check email
		if (oForm.email.value == '') {
			bValid = false;
		}

		//return correctly
		if (bValid == false) {
			alert('Please fill out all required fields *');
			return false;
		}
	}
}

function addScrollers() {
// code each scroller as follows:
// startScroll('id of scroller div','content of scroller');
startScroll('myscroller','<h2>Testimonials</h2><p>An excellent course delivered at the right pitch by very knowledgeable instructors<br/>- OGD’s</p><p>Good timings (not to long) on the power points, very good tactical advise, great structure to course finishing with valuable practical exercise.<br/>-Police</p><p>Very well delivered course the depth of knowledge was very apparent. The use of planning modules was new to me and I found them very useful and will most certainly use them in the future. Course had much more content than I imagined<br/>- Military</p><p>Excellent course, information set at the right pace, gave me things to think about in my own area of work not just on the covert side.<br/>- Police</p><p>Great delivery that provided real world examples that can easily be related to current HMRC operations. Course content was given weight by the experience of the instructor<br/>- Customs and Excise</p><p>Very productive course. The team obviously know their job to a very high standard and they deliver knowledge in an easy learning package. Hopefully will benefit from future training in the future<br/>- Customs and Excise</p><p>As someone with no prior knowledge of the subject, I now feel confident to take on these tasks in an operational role. Very informative, delivered in a constructive and positive manner. Exercises very realistic and relevant to my work role<br/>- Police</p><p>All aspects of the course were excellent. The on the ground input during the exercises was particularly useful and was delivered in a way that the content will not be forgotten. Some slides power points on actual hide exploitation and evidential handling would be useful<br/>- Customs and Excise</p><p>I found the course really informative providing quality instruction with current best practise. Also it was really enjoyable and delivered in a relaxed way that made learning a mainly new subject (for me) easy. Looking forward to using the skills learnt for real when I get back. Good week. Hopefully will be back<br/>- Police</p><p>The benefit of real operational experience is invaluable, the whole course was thoroughly enjoyed <br/>- Police</p><p>Overall an excellent course, both informal and professionally delivered, could easily be two weeks<br/>- OGD’s</p><p>A thoroughly informative and enjoyable course. The levels of knowledge and professionalism displayed by both trainers was  exemplary<br/>- Military</p><p>Thank you, a great course it makes a big difference being taught by instructors who have operational experience<br/>- Military</p>');
}

var speed=30; // scroll speed (bigger = faster)
var dR=false; // reverse direction

// Vertical Scroller Javascript
// copyright 24th September 2005, by Stephen Chapman
// permission to use this Javascript on your web page is granted
// provided that all of the code below (as well as these
// comments) is used without any alteration
var step = 1; function objWidth(obj) {if(obj.offsetWidth) return obj.offsetWidth; if (obj.clip) return obj.clip.width; return 0;} function objHeight(obj) {if(obj.offsetHeight) return obj.offsetHeight; if (obj.clip) return obj.clip.height; return 0;} function scrF(i,sH,eH){var x=parseInt(i.top)+(dR? step: -step); if(dR && x>sH)x=-eH;else if(x<2-eH)x=sH;i.top = x+'px';} function startScroll(sN,txt){var scr=document.getElementById(sN); var sW = objWidth(scr)-6; var sH = objHeight(scr); scr.innerHTML = '<div id="'+sN+'in" style="position:absolute; left:3px; width:'+sW+';">'+txt+'<\/div>'; var sTxt=document.getElementById(sN+'in'); var eH=objHeight(sTxt); sTxt.style.top=(dR? -eH : sH)+'px'; sTxt.style.clip='rect(0,'+sW+'px,'+eH+'px,0)'; setInterval(function() {scrF(sTxt.style,sH,eH);},1000/speed);}
