function checkString(entry){
	for(var i=0; i<entry.length; i++){
		if(entry.charAt(i) != " "){ return true; }
	}
	return false;
}

function emailCheck(emailStr){
	var emailPat=/^(.+)@(.+)$/
	var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
	var validChars="\[^\\s" + specialChars + "\]"
	var firstChars=validChars
	var quotedUser="(\"[^\"]*\")"
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
	var atom="(" + firstChars + 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){
		alert(alerte_prefixe + "Le champ 'E-mail' est incorrect.")
		return false
	}
	var user=matchArray[1]
	var domain=matchArray[2]
	if(user.match(userPat)==null){
		alert(alerte_prefixe + "Le champ 'E-mail' est incorrect.")
		return false
	}
	var IPArray=domain.match(ipDomainPat)
	if(IPArray!=null){
		for(var i=1;i<=4;i++){
			if(IPArray[i]>255){
				alert(alerte_prefixe + "Le champ 'E-mail' est incorrect.")
				return false
			}
		}
		return true
	}
	var domainArray=domain.match(domainPat)
	if(domainArray==null){
		alert(alerte_prefixe + "Le champ 'E-mail' est incorrect.")
		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>10){
		alert(alerte_prefixe + "Le champ 'E-mail' est incorrect.")
		return false
	}
	if(domArr[domArr.length-1].length==3 && len<2){
		var errStr=alerte_prefixe + "Le champ 'E-mail' est incorrect."
		alert(errStr)
		return false
	}
	return true;
}

function ouvre(theURL,winName,largeur,hauteur,features){
	var top = (screen.height-hauteur)/2;
	var left = (screen.width-largeur)/2;
	window.open(theURL,winName,"top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+features);
}


