function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail Address entered, please correct")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail Address entered, please correct")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail Address entered, please correct")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail Address entered, please correct")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail Address entered, please correct")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail Address entered, please correct")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail Address entered, please correct")
		    return false
		 }

 		 return true					
	}
	
function checkform (conferences)
{
    // ** START **
    if ((conferences.RealName.value == "") || (conferences.RealName.value == " " )) {
        alert( "Sorry, we need as much information as possible for this enquiry. Please enter your name." );
        conferences.RealName.focus();
        return false ;
    }
	// ** START **
    if ((conferences.CompanyName.value == "") || (conferences.CompanyName.value == " " )) {
        alert( "Sorry, we need as much information as possible for this enquiry. Please enter your company name." );
        conferences.CompanyName.focus();
        return false ;
    }
	// ** START **
    if ((conferences.Telephone.value == "") || (conferences.Telephone.value == " " )) {
        alert( "Sorry, we need as much information as possible for this enquiry. Please enter your phone number." );
        conferences.Telephone.focus();
        return false ;
    }
    // ** START **
    if ((conferences.Fax.value == "") || (conferences.Fax.value == " " )) {
        alert( "Sorry, we need as much information as possible for this enquiry. Please enter your fax number." );
        conferences.Fax.focus();
        return false ;
    }
		// ** START **
    if ((conferences.ConferenceVenue.value == "") || (conferences.ConferenceVenue.value == "non selected" )) {
        alert( "Sorry, we need as much information as possible for this enquiry. Please enter your Conference Venue selection." );
        conferences.ConferenceVenue.focus();
        return false ;
    }

	// ** START **
    if ((conferences.EmailAddress.value == "") || (conferences.EmailAddress.value == " " )) {
        alert( "Sorry, we need as much information as possible for this enquiry. Please enter your e-mail address." );
        conferences.EmailAddress.focus();
        return false ;
    }
    if (echeck(conferences.EmailAddress.value)==false){
		conferences.EmailAddress.value=""
		conferences.EmailAddress.focus()
		return false
	}
	// ** END **
	return true ;
}

function MM_popupMsg(msg) { //v1.0
  alert(msg);
}
