// JavaScript Document
function overIt(element){
	 element.style.textDecoration = "underline";
}

function outIt(element){
 	element.style.textDecoration = "none";
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

winRef = null;
winIsOpen = false;
function openWin(theURL,winName,features,winWidth,winHeight) {//v2.0
  if(winWidth > 0 && winHeight > 0){
  	monitorWidth = screen.width;
	monitorHeight = screen.height;
	xPos = Math.round(monitorWidth - winWidth) / 2;	
	yPos = Math.round(monitorHeight - winHeight) / 2;
	features += ',left='+xPos+',top='+yPos;	
  }
  winRef = window.open(theURL,winName,features);
  winIsOpen = true;
}

function closeWin(){
	if(winIsOpen){
		winRef.close();
		winIsOpen = false;	
	}
}

function checkField(reqFields){
	for(x = 0; x < reqFields.length; x++){
		if(document.getElementById(reqFields[x]).value.length == 0){
			document.getElementById(reqFields[x]).focus();
			alert("Veuillez remplir tous les champs obligatoires!");
			return false;
		}
	}
	return true;
}
