// Pop up taille VARIABLE AVEC ascenceur et NOM DE FENETRE
function pop_va(URL,larg,haut) {
	window.open(URL,larg+haut,'location=no,toolbar=no,directories=no,menubar=no,resizable=no,scrollbars=yes,status=no,width=' + larg + ',height=' + haut);
}
// Pop up taille VARIABLE AVEC ascenceur et NOM DE FENETRE et redimensionnement et menubar et url
function pop_vb(URL,larg,haut) {
	window.open(URL,larg+haut,'location=yes,toolbar=yes,directories=yes,menubar=yes,resizable=yes,scrollbars=yes,status=no,width=' + larg + ',height=' + haut);
}

// Popup a taille variable SANS ascenceur
function pop_v(URL,larg,haut) {
	window.open(URL,'','location=no,toolbar=no,directories=no,menubar=no,resizable=no,scrollbars=no,status=no,width=' + larg + ',height=' + haut);
}

function findObj(theObj, theDoc)
{
  var p, i, foundObj;
  
  if(!theDoc) theDoc = document;

  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 DisplayLayers(){
	
	var i, visStr, obj, args = DisplayLayers.arguments;
	for (i=0; i<(args.length-2); i+=3)
	{
		if ((obj = document.getElementById(args[i])) != null)
		{
		  visStr = args[i+2];
		  if (obj.style)
		  {
			obj = obj.style;
			if(visStr == 'show') visStr = 'block';
			else if(visStr == 'hide') visStr = 'none';
		  }
		  obj.display = visStr;
		}
	}
}
function getCarte()
{
	var index = document.formulaire.programme.selectedIndex;
	var carte = document.formulaire.programme.options[index].value;
	return carte;
}

function adherer(lang)
{
	var carte = getCarte();
    
	if (carte.length == 0)
	   alert("Choisissez d'abord un programme");
	else
	   location.href="/ident.svlt?&urlTarget=/subscribe" + carte;
}
 
function informer(lang)
{
	var carte = getCarte();
	if (carte.length == 0)
	   alert("Choisissez d'abord un programme");
	else
	   location.href="/ident.svlt?&urlTarget=/info" + carte;
}

/*Permet de savoir si le navigateur a Flash Player*/
function detectFlash()
{
	if( navigator.mimeTypes.length > 0 )
	{
		if(typeof(navigator.mimeTypes["application/x-shockwave-flash"])=="undefined"){
			return false;
		}
		else{
			return navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin != null;
		}
	}
	else if( window.ActiveXObject )
	{
		try
		{
			new ActiveXObject( "ShockwaveFlash.ShockwaveFlash" );
			return true;
		}
		catch( oError )
		{
			return false;
		}
	}
	else
	{
		return false;
	}
}
