function ow(popurl,w,h) {
	var pointX = Math.floor((screen.width - w) / 2);
	var pointY = Math.floor((screen.height - h) / 2);
	if (screen.width && screen.height) {
		window.open(popurl,"imgtrauma","width="+w+",height="+h+",screenX="+pointX+",screenY="+pointY+",top="+pointY+",left="+pointX+",menubar=no,status=no,scrollbars=no,resizable=no,location=no");
	} else {
		window.open(popurl,"imgtrauma","width="+w+",height="+h+",screenX=150,screenY=200,top=150,left=200,menubar=no,status=no,scrollbars=no,resizable=no,location=no");
	}
	return false;
}

function owmax(popurl, ratio) {
	var winW = 0, winH = 0, winX = 0, WinY = 0;
	if ( (screen.width / screen.height) > ratio ) {
		winW = screen.width;
		winH = Math.floor(winW * ratio);
		winX = 0;
		winY = Math.floor((screen.height - winH) / 2);
	} else {
		winH = screen.height;
		winW = Math.floor(winH * ratio);
		winY = 0;
		winX = Math.floor((screen.width - winW) / 2);
	}
	if (screen.width && screen.height && winW && winH) {
		window.open(popurl,"popup"+Math.random()*10,"width="+winW+",height="+winH+",screenX="+winX+",screenY="+winY+",top="+winY+",left="+winX+",menubar=no,status=no,scrollbars=no,resizable=no,location=no");
	} else {
		window.open(popurl,"popup"+Math.random()*10,"fullscreen=yes,width="+screen.width+",height="+screen.height+",screenX=0,screenY=0,top=0,left=0,menubar=no,status=no,scrollbars=no,resizable=no,location=no");
	}
	return false;
}

function courriel(nom, dom) {
	if (dom == 'dar') {
		domaine = 'darbicetre.com';
	} else if (dom == 'aphp') {
		domaine = 'bct.aphp.fr';
	} else {
		domaine = 'mapar.org';
	}
	window.location.href = 'mailto:' + nom + '@' + domaine;
}

function formListeImgbanqVerif(leForm) {
	if (leForm.cat.value == "-") {
		alert("Vous n'avez pas selectionne une categorie mais son groupe.");
		return false;
	} else {
		return true;
	}
}
