var ref;
var pathcmd='/frogcart/';


function remplace(text,find,repl){
  var found = text.indexOf(find);
  var retVal= ""; var start = 0;
  while(found != -1){
    retVal +=text.substring(start,found) +repl;
    start = found+find.length;
    found =text.indexOf(find,start);
  }
  retVal +=text.substring(start,text.length);
  return retVal;
}


function FcAddPanier(ref){
ref = remplace(ref,"+","%2B");
win2=window.open(pathcmd+"default.asp?langue=fr&ref="+ref,"article","location=no,menubar=no,scrollbars=yes,status=no,resizable=no,width=680,height=550");
win2.focus();
//win2.moveTo(0,0);
}

function FcAdd(ref){
ref = remplace(ref,"+","%2B");
win2=window.open(pathcmd+"default.asp?langue=fr&view=article&qte=1&ref="+ref,"article","location=no,menubar=no,scrollbars=yes,status=no,resizable=yes,width=680,height=325");
win2.focus();
//win2.moveTo(0,0);
}

function FcView(){
parent.Principal.document.location=pathcmd+"default.asp?langue=fr";
//win2.moveTo(0,0);
}

function FcViewOpener(){
win3=window.open(pathcmd+"default.asp?langue=fr","panier","location=no,menubar=no,scrollbars=yes,status=no,resizable=no,width=680,height=560");
win3.focus();
win3.moveTo(0,0);
}

function FcAddGravure(){

gravure = document.FormGravure.gravure.value;
prenom = "&prenom=" + document.FormGravure.prenom.value;
jour = "&jour=" + document.FormGravure.jour.value;
mois = "&mois=" + document.FormGravure.mois.value;
annee = "&annee=" + document.FormGravure.annee.value;

Chemin = pathcmd + "default.asp?langue=fr&view=article&qte=1&ref=" + gravure + prenom + jour + mois + annee, "article", "location=no,menubar=no,scrollbars=yes,status=no,resizable=yes,width=680,height=325";
//alert(Chemin);
win2=window.open(Chemin);
win2.focus();
//win2.moveTo(0,0);
}
