function twAller(_url,_cadre,_target) {
  if (_cadre) {
    parent._cadre.location.href = _url;
  } else if (_target) {
    _target = window.open(_url,_target);
  } else {
    window.location.href = _url;
  }
}

function twPopUp(_url,_nom,_larg,_haut,_defil) {
var op_scroll  = _defil;
var op_wid  = _larg;
var op_heigh = _haut;
var op_tool  = 0;
var op_loc_box  = 0
var op_dir  = 0;
var op_stat  = 0;
var op_menu  = 0;
var op_resize  = 0;                
var options = "left=0,top=26,toolbar="+ op_tool +",location="+ op_loc_box +",directories=" 
+ op_dir +",status="+ op_stat +",menubar="+ op_menu +",scrollbars="  
+ op_scroll +",resizable="  + op_resize +",width=" + op_wid +",height="+ op_heigh;
var wNom = window.open(_url, _nom, options);
if(_nom.focus){_nom.focus();}
}

function RS_PopUp800x600(_url,_nom)
{
var options = "left=0,top=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,alwaysRaised=1,width=800,height=400";
var wNom = window.open(_url, _nom, options);
if(_nom.focus){_nom.focus();}
}

function RS_PopUp640x480(_url,_nom)
{
var options = "left=0,top=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,alwaysRaised=1,width=640,height=480";
var wNom = window.open(_url, _nom, options);
if(_nom.focus){_nom.focus();}
}


function RS_PopUpGlossaire(_url,_nom)
{
var options = "left=0,top=" + (screen.height-270) + ",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=200,height=200";
var wNom = window.open(_url, _nom, options);
if(_nom.focus){_nom.focus();}
}

function ImageMax(chemin)
   {
   html = '<html> <head> <title>ImageMax</title> </head>  <body topmargin="5" leftmargin="5" rightmargin="5" bottommargin="5" marginwidth="0" marginheight="0"   oncontextmenu="return false;" onBlur="top.close()"><IMG src="'+chemin+'" BORDER=0 NAME=ImageMax onLoad="window.resizeTo(document.ImageMax.width+50, document.ImageMax.height+95)">   </body></html>';
   popupImage =    window.open('','_blank','left=0,top=0,toolbar=0, location=0, directories=0, menuBar=0, scrollbars=1, resizable=1');
   popupImage.document.open();
   popupImage.document.write(html);
   popupImage.document.close()
   }; 

var Largeur = 80;
var Hauteur = 80;
var Pos_X = 0; 
var Pos_Y = 0; 
var WinPopup = null; 
WinEvent=window.event; 
function Mouse_X(WinEvent)
	{ 
    if(document.layers) {return WinEvent.x;} 
    else {return event.clientX;} 
    } 
function Mouse_Y(WinEvent)
	{ 
    if(document.layers) {return event.y;} 
    else {return event.clientY;} 
    } 
function Coordonnees(WinEvent)
{ 
	Pos_X = Mouse_X(); 	
	Pos_Y = Mouse_Y();
	Pos_Y = Pos_Y + 150;
} 
function RS_Popup_Mobile(theURL,Largeur,Hauteur,DelaGauche,DuHaut) 
{ 
if (Largeur > 100)  {Largeur = 80;}
Largeur = Math.ceil(screen.width * (Largeur/100)*(screen.width/1024)); 
if(Largeur > screen.width) {Largeur = Math.ceil(Largeur*(95/100));} 
if((Largeur+DelaGauche) > screen.width-10) {DelaGauche = Math.ceil(screen.width - Largeur - 10);} 
Hauteur = Math.ceil(screen.height * (Hauteur/100)); 
if((Hauteur + DuHaut) > (screen.height-70)) {DuHaut = Math.ceil(screen.height - Hauteur - 70);} 
if (WinPopup) { WinPopup.close(); }
WinPopup = window.open(theURL,"WinPopup","scrollbars=yes,status=no,menubar=no,resizable=yes,width="+ Largeur +",height="+ Hauteur + ",top="+DuHaut+",left="+DelaGauche); 
WinPopup.focus(); 
} 

function RS_Popup_Texte(texte)
   {
   html = '<html> <head> <title>WinGlossaire</title> </head>  <body topmargin="5" leftmargin="5" rightmargin="5" bottommargin="5" marginwidth="0" marginheight="0"   oncontextmenu="return false;" onBlur="top.close()"> <p align="justify"> <font face="Trebuchet MS" size="1">' + texte + ' </font></p></body></html>';
   popupImage =    window.open('','_blank','left=0,top='+(screen.height -270) +',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=200,height=200');
   popupImage.document.open();
   popupImage.document.write(html);
   popupImage.document.close()
   }; 
   
function RS_PopUpURL(_url)
{
var options = "left=0,top=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=" +(Math.ceil(screen.width * 80 /100))+",height=" + (Math.ceil(screen.height * 80 /100));
var wNom = window.open(_url,"popup", options);
if(_nom.focus){_nom.focus();}
}
