function getId(id) {
  if(!document.getElementById && document.all) return document.all[id];
  else return document.getElementById(id);
}

function affiche(){
  for (var i=0;i<affiche.arguments.length;i++)
    document.all[affiche.arguments[i]].style.display='block';
}
function cache(){
  for (var i=0;i<cache.arguments.length;i++)
    document.all[cache.arguments[i]].style.display='none';
}

function calcLen(objMsg, msglen, maxLength){
	var cr=getId(msglen);
	var restant=0;
	
	if (objMsg.value.length > maxLength) objMsg.value=objMsg.value.substring(0, maxLength);
	else restant=maxLength-objMsg.value.length;
	
	cr.value=restant;
}
function oubli(){
  url="Oubli.php"

  window.open(url,'Oubli','width=400,height=270,left=50,top=130')
}
function protection(){
  url="popProtection.htm"

  window.open(url,'Protection','width=690,height=450,left=50,top=130,scrollbars=yes')
}
function condition(){
  url="popConditions.htm"

  window.open(url,'Conditions','width=690,height=450,left=50,top=130,scrollbars=yes')
}
function reglement(){
  url="popReglement.htm"

  window.open(url,'Réglement','width=450,height=250,left=50,top=130,scrollbars=yes')
}
function abus(type, ref){
  url="Abus_form.php?type="+type+"&ref="+ref

  window.open(url,'Abus','width=400,height=280,left=50,top=130')
}
