// JavaScript Document

// Example: obj = findObj("image1");
function findObj(theObj, theDoc)
{
  var p, i, foundObj;
  if(!theDoc) theDoc = document;
  
  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  {
    theDoc = parent.frames[theObj.substring(p+1)].document;
    theObj = theObj.substring(0,p);
  }
  
  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  
  for (i=0; !foundObj && i < theDoc.forms.length; i++) 
    foundObj = theDoc.forms[i][theObj];

  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
    foundObj = findObj(theObj,theDoc.layers[i].document);

  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);

  return foundObj;
}


function display_pop (layer)
{
	var obj ;
	
  if (document.getElementById)
  {
    document.getElementById(layer).style.visibility="visible";
  }
	else
	{
		obj = findObj (layer) ;
		obj.style.visibility="visible";
	}
}

/*
function display_pop (layer,pos,taille,msg)
{
  if (document.getElementById)
  {
    document.getElementById(layer).style.visibility="visible";
  }
}
*/

function hide_pop (layer)
{
  if (document.getElementById)
  {
    document.getElementById(layer).style.visibility="hidden";
  }
	else
	{
		obj = findObj (layer) ;
		obj.style.visibility="hidden";
	}
}

/*
Propriétés			 				Effets 																Valeurs possibles 
directories 		Affichage de la barre de liens									 yes | no 
menubar					Affichage de la barre de menu										 yes | no 
status 					Affichage de la barre de statut 								 yes | no 
location 				Affichage de la zone d'adresse 									 yes | no 
scrollbars 			Affichage des barres de scrolling 							 yes | no | auto 
resizable 			Autorise le redimensionnement du popup 					 yes | no 
height 					Hauteur en pixels nombre entier 
width 					Largeur en pixels nombre entier 
left 						Position horizontale en pixels sur l'écran nombre entier 
top 						Position verticale en pixels sur l'écran nombre entier 
fullscreen 			Popup en plein écran (version 5 et +) 					 yes | no 

 option : 'directories=no, resizable=no, location=no, menubar=no, status=no, scrollbars=no, menubar=no, fullscreen=no'
 option : 'height=200, width=200, left=200, top=200'
*/
function popup(page,nom,option)
{
  window.open(page,nom,option);
}

