//<!--


function toggleVisibilityObjAll(id)
{
  if (obj = findObjAll(id))
  {
    if (obj.style)
      obj=obj.style;

//alert(obj.visibility);

    if (obj.visibility == 'hidden' || obj.visibility == '')
if (obj.display == 'none' || obj.display == '')
//      obj.visibility= 'visible';
      obj.display = 'block';
    else
      obj.display = 'none';
//      obj.visibility='hidden';
  }
}


 function stop_rclic(){alert('Copyright');return false;}


function findObjAll(n, d) { //v4.0
        var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}


function HideAll(mnu)
{

  obj = findObjAll(mnu);
  if (!obj)
    return 0;

    if (obj.style)
      obj=obj.style;
    obj.visibility='hidden';
//obj.display='none';
    obj.zindex=0;
}

function ShowAll(mnu)
{



//alert('!!');

      obj = findObjAll(mnu);
  if (!obj)
    return 0;



      if (obj.style)
        obj=obj.style;
      obj.visibility='visible';
//	obj.display='inline';
obj.zindex=100;
}



function open_popup(url,width,height)
{
 if (screen.height < 700)
   height=400;	

  winref = window.open(url,"", 'width='+width+', height='+height+', scrollbars=yes, alwaysRaised=yes bgcolor=0 menubar=no');
  winref.focus();
}


function open_mobile()
{
  open_popup('/tel_mobile.php',320,620);
}


function open_carnet(type,input_dest)
{
  winref = window.open('/carnet_adresse.php?lang=fra&type='+type+'&input_dest='+input_dest+'&from_cartes=1',"Carte", "width=250, height=280, scrollbars=no, alwaysRaised=yes bgcolor=0 menubar=no");
  winref.focus();
}

function open_login(path,from)
{
  winref = window.open(path+'login.php?lang=fra&from='+from,"Carte","width=250,height=280,menubar=no,copyhistory=no");
  winref.focus();
}

function VerifForm()
{
  adresse = document.form1.mail_from.value;
  var place = adresse.indexOf("@",1);
  var point = adresse.indexOf(".",place+1);
  if ((place > -1)&&(adresse.length >2)&&(point > 1))
  {
    adresse = document.form1.mail_to.value;
    var place = adresse.indexOf("@",1);
    var point = adresse.indexOf(".",place+1);
    if ((place > -1)&&(adresse.length >2)&&(point > 1))
      document.form1.submit();
    else
      alert('l\'email du destinataire est invalide');
  }
  else
    alert('l\'email de l\'expedieur est invalide');
}


function VerifMail(adresse)
{
  var place = adresse.indexOf("@",1);
  var point = adresse.indexOf(".",place+1);
  if ((place > -1)&&(adresse.length >2)&&(point > 1))
    return true;
  else
    return false;
}

//-->
