if (parent != self) {
  top.location.href = self.location.href;
}
function printit(){  
	if (window.print) {
    	window.print() ;  
	} else {
    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH="0" HEIGHT="0" CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
	document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";  
	}
}
  var newWindow = null;
 function OpenWindow (Url,Title, Width, Height) {
  var win_opt= "toolbar=0,location=0,directories=0,status=0,menubar=0,";
  win_opt += "scrollbars=1,resizable=1,copyhistory=0,";
  win_opt += "width=" + Width + ",height=" + Height;
  newWindow = window.open('',Title,win_opt);
  if (newWindow != null) {
    if (newWindow.opener == null)
      newWindow.opener = self;
    newWindow.location.href = Url;
    if (newWindow.focus) newWindow.focus();
  }
 }
/*function go(list) {
	if(list.selectedIndex != 0)	{
   		location.href = list.options[list.selectedIndex].value;
	}
}*/
function verif_entier(leChamp,nomChamp) {
 if (leChamp.value.length == 0) return true;
	ok = true; i=0;
	while ((i < leChamp.value.length) && (ok)) {
			    caract = leChamp.value.substring(i,i+1);
			if ((caract<'0') || (caract>'9')) ok = false;
		 i++;
 }
 if (!ok) {
		 alert('Le champ ' + nomChamp +' doit être un nombre.');
			return false;
	}
return true;
}
function changeColor(pObject, pColor) {
			document.getElementById(pObject).style.backgroundColor = pColor;
		}

