<!--

sfHover = function() {
	var sfEls = document.getElementById("oUlNavigation").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

if (document.all&&document.getElementById) window.onload=sfHover;

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}



function checkscript()
{
		
		if (document.frmBooking.email.value == '' )
		{
			alert('Please enter your email address');
			return false;
		}else if (document.frmBooking.date.value == '' )
		{
			alert('Please enter your the date you want to attend');
			return false;
		}else if (document.frmBooking.name.value == '' )
		{
			alert('Please enter your name');
			return false;
		}else if ( document.frmBooking.company.value == '' )
		{
			alert('Please enter your company name');
			return false;
		}else if ( document.frmBooking.telephone.value == '' )
		{
			alert('Please enter your telephone number');
			return false;
		}else if (document.frmBooking.email.value != '' )
		{
			return CyJS_Utils_IsEmailValidcf (document.frmBooking.email.value);
		} 
}

function checkContactForm()
{
	if (document.frmContact.email.value == ''){
		alert('Please enter your email address');
		return false;
	}else if (document.frmContact.name.value == ''){
		alert('Please enter your name');
		return false;
	}else if (document.frmContact.company.value == ''){
		alert('Please enter your company name');
		return false;
	}else if (document.frmContact.enquiry.value == ''){
		alert('Please enter an enquiry');
		return false;
	}else if (document.frmContact.email.value != ''){
		return CyJS_Utils_IsEmailValidcf (document.frmContact.email.value);
	}
}

function CyJS_Utils_IsEmailValidcf(checkThisEmail)
{
	var myEMailIsValid = true;
	var myAtSymbolAt = checkThisEmail.indexOf('@');
	var myLastDotAt = checkThisEmail.lastIndexOf('.');
	var mySpaceAt = checkThisEmail.indexOf(' ');
	var myLength = checkThisEmail.length;


	// at least one @ must be present and not before position 2
	// @yellow.com : NOT valid
	// x@yellow.com : VALID

	if (myAtSymbolAt < 1 )
 		{myEMailIsValid = false}


	// at least one . (dot) afer the @ is required
	// x@yellow : NOT valid
	// x.y@yellow : NOT valid
	// x@yellow.org : VALID

	if (myLastDotAt < myAtSymbolAt)
	 {myEMailIsValid = false}

	// at least two characters [com, uk, fr, ...] must occur after the last . (dot)
	// x.y@yellow. : NOT valid
	// x.y@yellow.a : NOT valid
	// x.y@yellow.ca : VALID

	if (myLength - myLastDotAt <= 2)
	 {myEMailIsValid = false}


	// no empty space " " is permitted (one may trim the email)
	// x.y@yell ow.com : NOT valid

	if (mySpaceAt != -1)
	 {myEMailIsValid = false}


	if (myEMailIsValid == true)
	 {
		
		return true
			 
	}
	else
	 {alert("Please check that your email address is entered correctly")
	 return false;}

}



//-->