var urlu = window.location.href;

var exp=urlu.indexOf("?cc=",0);
var cc=urlu.substring(exp+4,exp+12);

var nomfi="";
var nompa="";
var locate="";
function ok() {
  nomfi = document.getElementById("nomfib").value
 
  if (nomfi == "XYZ99999"  )
	       {this.location.href="magas2.html?cc="+nomfi+"&ph=1";}

  else { 
    alert("Mot de passe invalide!");document.getElementById("nomfib").value="";focusOnnomfi();
 }
}
function accepte() {
  if ( cc != "cc"  )
  {
  alert("Mot de passe invalide");
  this.location.href="magas.html";
  }
}