function fnEmailCheck (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(emailStr=="")
    {
        alert("Please enter your email address.");
        return false;
    }
    else if (matchArray==null) 
    {
        alert("Email address is incorrect.");
        return false
    }
    var user=matchArray[1]
    var domain=matchArray[2]
    
    // See if "user" is valid
    if (user.match(userPat)==null) {
        // user is not valid
        alert("Email address doesn't seem to be valid.")
        return false
    }
    
    /* if the e-mail address is at an IP address (as opposed to a symbolic
       host name) make sure the IP address is valid. */
    var IPArray=domain.match(ipDomainPat)
    if (IPArray!=null) {
        // this is an IP address
          for (var i=1;i<=4;i++) {
            if (IPArray[i]>255) {
                alert("Destination IP address is invalid!")
            return false
            }
        }
        return true
    }
    
    // Domain is symbolic name
    var domainArray=domain.match(domainPat)
    if (domainArray==null) {
        alert("The domain name doesn't seem to be valid.")
        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) {
       // the address must end in a two letter or three letter word.
       alert("The address must end in a three-letter domain, or two letter country.")
       return false
    }
    
    // Make sure there's a host name preceding the domain.
    if (len<2) {
       var errStr="This address is missing a hostname!"
       alert(errStr)
       return false
    }
    
    // If we've got this far, everything's valid!
    return true;
}

function validate(frm)
{
		if(frm.name.value == 'name' ||  frm.name.value == '' )
		{
			alert("Please add your Name.");

			frm.name.focus();

			return false;
		}

		if(frm.email.value == 'email address' ||  frm.email.value == '' )
		{
			alert("Please add your Email Address.");

			frm.email.focus();

			return false;
		}

		if( ! fnEmailCheck(frm.email.value ) )
		{
			frm.email.focus();

			return false;
		}

		if(frm.bring.value == 'what you do' ||  frm.bring.value == '' )
		{
			alert("Please add what you do");

			frm.bring.focus();

			return false;
		}

		
		if(frm.role.value == 'what can you bring to The Trilogy?' ||  frm.role.value == '' )
		{
			alert("Please add what can you bring to The Trilogy?");

			frm.role.focus();

			return false;
		}
return true;
}
var ImgHeight = 0;
var ImgWidth  = 0;

var myInterval;

function onOverT(eve,imgCur)
	{

		var x=eve.clientX;
		
		var y=eve.clientY - 50;
		var ctrl  = document.getElementById("large");

		var img  = document.getElementById("largeImage");

		img.title = imgCur.title; 

		var src = imgCur.src ;
		if( src.search(/photoblock.gif/) > 0 )
		{
			return;
		}
		var src1 = src.replace(/small/,"large");
		
		img.src=src1;
	
		ctrl.style.left=(x - 30)+ "px";
		ctrl.style.top=(y+20) + "px";
		ctrl.style.display = "";	
		
		ImgHeight = 50;
		ImgWidth  = 50;
		
		img.height= ImgHeight;
		img.width= ImgWidth;
		
		myInterval = window.setInterval("showZoomOut()",2);
		

	}
function showZoomOut()
{

	var img  = document.getElementById("largeImage");

	ImgHeight +=5;
	ImgWidth  +=5;

	if( ImgHeight <= 200 )
	{
		img.height = ImgHeight  ;
		img.width  = ImgWidth;

	}
	
	if( ImgHeight > 200 )
	{
		clearInterval(myInterval);
	}

}


	function onOut()
	{
		var ctrl  = document.getElementById("large");

		var img  = document.getElementById("largeImage");
		
		img.src='';
		img.height= '0';
		img.width=  '0';

		ImgHeight = 0;
		ImgWidth  =0;
		clearInterval(myInterval);
		
		ctrl.style.display = "none";
	
	}