// JavaScript Document
var fenetrefixe=0;
function fenetre_fix(URLStr, left, top, width, height)
{ 
  if(fenetrefixe)
  {
    if(!fenetrefixe.closed) fenetrefixe.close();
  }
  fenetrefixe = open(URLStr, 'fenetre_fixe', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');

}
var fenetrefixe2=0;
function fenetre_fix2(URLStr, left, top, width, height)
{ 
  if(fenetrefixe2)
  {
    if(!fenetrefixe2.closed) fenetrefixe2.close();
  }
  fenetrefixe2 = open(URLStr, 'fenetre_fixe2', 'toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');

}

var fenetrefixe3 = 0;
function fenetre_fix3(URLStr, left, top, width, height)
{ 
  if(fenetrefixe3)
  {
    if(!fenetrefixe3.closed) fenetrefixe.close();
  }
  fenetrefixe3 = open(URLStr, 'fenetre_fixe3', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');

}

/* fonction pour retailler l'ecran à l'ouverture de la fenetre
Appeler cette foncton par :
<body onLoad="resizing(700,720);"> 
*/
		function resizing(newwidth,newheight) {
			self.moveTo((screen.availWidth/2)-(width/2),0);
			if (document.layers) {
					width < screen.availWidth;
					height < screen.availHeight;
			} else {
					var width = screen.availWidth;
					var height = screen.availHeight;
			}
			if (width > newwidth) {
				width = newwidth;
				}
			if (height > newheight) {
				height = newheight;
				}
 			// self.resizeTo(width, height);
 			self.resizeTo(width, screen.availHeight);
			// self.moveTo((screen.availWidth/2)-(width/2), (screen.availHeight/2)-(height/2));
			self.moveTo((screen.availWidth/2)-(width/2),0);
		}

// remplacement des caracteres speciaux		
function htmlspecialchars(ch) {
   ch = ch.replace(/&/g,"&amp;");
   ch = ch.replace(/\"/g,"&quot;");
   ch = ch.replace(/\'/g,"&#039;");
   ch = ch.replace(/</g,"&lt;");
   ch = ch.replace(/>/g,"&gt;");
   return ch;
}
function replacehtmlspecialchars(ch) {
   ch = ch.replace("&amp;", "&");
   ch = ch.replace("&quot;", "\"");
   ch = ch.replace("&#039;", "'");
   ch = ch.replace("&lt;", "<");
   ch = ch.replace("&gt;", ">");
   return ch;
}
		
