function _trim(str) {
	str = str.replace(/^\s*|\s*$/g, "");
	return str ;
}

function contientEmail(champ) {
	// A completer avec la regex !!
	e = new RegExp(/^.+@.+..+$/);
	return e.test(champ.value);
}

function contientSousDomaine(champ) {
	if (window.RegExp) {
		e = RegExp(/^[a-zA-Z]+$/);
		return e.test(champ.value);
	}
	else {
		return true;
	}
}

function getX(largeur) {
	width = screen.availWidth;
	return (width - largeur)/2;
}

function getY(hauteur) {
	height = screen.availHeight;
	return (height - hauteur)/2;
}

function showWindow(url, titre, w, h) {
	if (window.showModalDialog) {
		// Internet Explorer
		winModalWindow = window.open(url,titre,'dependent=yes,left=' + getX(w) + ',top=' + getY(h) + ',width=' + w + ',height=' + h + ',status=no,menubar=no,toolbar=no,scrollbars=yes,resizeable=yes');
	}	
	else {
		// Netscape
		winModalWindow = window.open(url,titre,'dependent=yes,screenX=' + getX(w) + ',screenY=' + getY(h) + ',width=' + w + ',height=' + h + ',status=no,menubar=no,toolbar=no,scrollbars=yes,resizeable=yes');
	}	
}
