//pour la page index.html
var adresse='\'Societe/SocSecret.html\''

// rend visible ou non une section div
function visible(idName){
  var dd = document.getElementById(idName);
  if(dd.style.display == 'none')
  	dd.style.display = 'inline';
  else
  	dd.style.display = 'none';
}

function setInvisible(idName){
  var dd = document.getElementById(idName);
  dd.style.display = 'none';
}

function setVisible(idName){
  var dd = document.getElementById(idName);
  dd.style.display = 'inline';

}


//Controle access pour espace adherents
function controleacces (){
doc = document.form; //alert("controle");
if (doc.i_numadhe.value.length<1) {
  alert("Remplissez le champ code (6 signes)."); doc.i_numadhe.focus();return false;}
if (doc.i_password.value.length<6) {
  alert("Remplissez le mot de passe (6 signes)."); doc.i_password.focus();return false;}
}

//Controle mot de passe perdu
function controledem (){
doc = document.form; //alert("controle");
if (doc.i_numadhe.value.length<1) {
  alert("Remplissez le champ code (6 signes)."); doc.i_numadhe.focus();return false;}
if (doc.i_password.value.length<2) {
  alert("Indiquez votre nom."); doc.i_password.focus();return false;}
}

function nocache() {
 var a = Math.random();
 var b = '/4DLINK1/4DCGI/adhe.resejn';
 c=b+a;
//alert(c);
 cookies = document.cookie;
 if (cookies.indexOf("nwres=")>=0) {
 window.open(c);
 } else {
 self.location = c;
 }
}


var a=Math.random();
var b='/nl.acgi$adhe.resejn'
Cookies=document.cookie;

function NoCache(){
c=b+a;
alert(c);
if (Cookies.indexOf("nwres=")>=0)
window.open(c);
else
open(b);
}


function fenetre0(id,l,h){
window.open(id, "_blank", 'scrollbars=no,location=no,menubar=no,width='+l+',height='+h+',resizable=no');
}


function fenetre1(id,l,h,m)
{ 
	if (m=='no')
		{
		window.open(id, "_blank", 'scrollbars=no,location=no,menubar=no,width='+l+',height='+h+',resizable=no');
		}
	else if (m=='all') 
		{
		window.open(id, "_blank", 'directories=yes,location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=no,toolbar=yes,width='+l+',height='+h);
		}
	else
		{
		alert('erreur de fenetre');
		}
}

function fenetrepropos(id,l,h){
window.open(id, "_blank", 'scrollbars=yes,location=no,menubar=no,width='+l+',height='+h+',resizable=yes');
}

/*
//menus deroulants

function MM_findObj(n, d) { 
  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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n);
  return x;
  }



function P7_autoHide() { 
 var i,g,args=P7_autoHide.arguments;
 for(i=0;i<args.length;i++){if((g=MM_findObj(args[i]))!=null){
  g.p7aHide=true;if(document.layers){
  g.captureEvents(Event.MOUSEOUT);}g.onmouseout=P7_hideDiv;g.p7ahD=true;}}
}

function hideDiv(evt) { 
 var b,relT,mT=false; 
 if(document.layers)
 {b=evt.target;
 b.visibility="hidden";
 }
 else{routeEvent(evt);}
 }


function MM_showHideLayers() { 
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

//fin de menus deroulant
*/
// Pour l'impression de la iframe
<!-- Begin
function PrintMe(idFrame) {
	navig = navigator.appName;
	if (navig =='Microsoft Internet Explorer') {
	//	alert (navig);
		window.parent.sub.focus();
		window.print();
	}
/*	if (navig =='Opera') {
			alert (navig+' 2');
		edition();
	}
*/	
	else{
	//	alert (navig);
		window.parent.frames[idFrame].print();
	}
// End-->	
}
//
function imprimer(){
	window.parent.frames[idFrame].print();
	}
//