// JavaScript Document
var browserName = navigator.appName;
var browserVer = parseInt(navigator.appVersion);
var ns = (browserName == "Netscape");
var nsMore4 = (ns && browserVer >= 5);
var nsLess4 = (ns && browserVer < 5);
var ie4 = (browserName == "Microsoft Internet Explorer") && navigator.appVersion.indexOf('MSIE 4')>0;
var ie5 = (browserName == "Microsoft Internet Explorer") && navigator.appVersion.indexOf('MSIE 5')>0;
var ie6 = (browserName == "Microsoft Internet Explorer") && navigator.appVersion.indexOf('MSIE 6')>0;
var ie = (browserName == "Microsoft Internet Explorer");
var mac = (navigator.userAgent.indexOf("Mac") != -1);


var win1=null;
function openfenetre(mypage,myname,w,h,scroll,resizable,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable='+resizable+'';
win1=window.open(mypage,myname,settings);
win1.focus(myname);
}


var plateau=new Array;
plateau[1] = new Array("Pavé de Sandre, lentilles paysannes", "• Salade de rate au sérano<br>• Pavé de Sandre<br>• Lentilles paysannes<br>• Sélection du fromager<br>• Moelleux aux pruneaux et nougat de Montelimar", "Prix : 23,50 € TTC", "", "rest_plateau01.gif"); 
plateau[2] = new Array("Suprême de volaille au caramel", "• Salade d'artichaut à l'huile de noix<br>• Suprême de volaille au caramel balsamique<br>• Polenta<br>• Sélection du fromager<br>• Tarte exotique", "Prix : 24,50 € TTC", "", "rest_plateau02.gif"); 
plateau[3] = new Array("Confit de canard, Gratin Savoyard", "• Salade de haricots verts au sésame grillé<br>• Confit de canard<br>• Gratin Savoyard<br>• Sélection du fromager<br>• Financier aux noisettes et aux figues", "Prix : 26,00 € TTC", "", "rest_plateau03.gif");
plateau[4] = new Array("Joue de boeuf braisée", "• Marinade de St Jacques et sa compote de fenouil<br>• Joue de boeuf braisée<br>• Légumes verts<br>• Sélection du fromager<br>• Tarte poire amande", "Prix : 28,50 € TTC", "", "rest_plateau04.gif");
plateau[5] = new Array("Bar rôti, Fenouil", "• Marinade de dinde à la menthe et vanille  des îles<br>• Bar rôti<br>• Fenouil<br>• Sélection du fromager<br>• Financier aux noisettes et aux figues", "Prix : 34,00 € TTC", "", "rest_plateau05.gif");

plateau[6] = new Array("Jambon à l'os, Antipasti", "• Salade d'artichaut à l'huile de noix<br>• Jambon à l'os<br>• Antipasti<br>• Sélection du fromager<br>• Avola", "Prix : 17,50 € TTC", "", "rest_plateau06.gif");
plateau[7] = new Array("Canette au miel, Nouilles chinoises", "• Salade de rates au sérano<br>• Canette au miel d'acacia<br>• Nouilles chinoises<br>• Sélection du fromager<br>• Tarte poire amande", "Prix : 19,50 € TTC", "", "rest_plateau07.gif");
plateau[8] = new Array("Filet de Sandre et piperade", "• Marinade de dinde à la menthe et vanille des îles<br>• Filet de Sandre et Piperade<br>• Sélection du fromager<br>• Tarte exotique", "Prix : 21,50 € TTC", "", "rest_plateau08.gif");
plateau[9] = new Array("Saumon rôti à la badiane", "• Charlotte au potiron<br>• Saumon rôti à la badiane<br>• Semoule aux fruits secs<br>• Sélection du fromager<br>• Délice de Bourgogne", "Prix : 22 € TTC", "", "rest_plateau09.gif");
plateau[10] = new Array("Veau à l'anis, Riz aux petits légumes", "• Charlotte au potiron<br>• Veau à l'anis<br>• Riz aux petits légumes<br>• Sélection du fromager<br>• Moelleux aux pruneaux et nougat de Montelimar", "Prix : 23 € TTC", "", "rest_plateau10.gif");
plateau[11] = new Array("Poulet rôti tandoori", "• Salade de haricots verts au sésame grillé<br>• Poulet rôti tandoori<br>• Ecrasé de pommes de terre aux noix<br>• Sélection du fromager<br>• Tarte exotique", "Prix : 23,50 € TTC", "", "rest_plateau11.gif");
plateau[12] = new Array("Pot au feu de dinde", "• Tartare d'écrevisses<br>• Pot au feu de dinde<br>• Sélection du fromager<br>• Ananas rôti", "Prix : 24 € TTC", "", "rest_plateau12.gif");
plateau[13] = new Array("Faux Filet au poivre de Séchuan", "• Marinade de St Jacques et sa compote de fenouil<br>• Faux filet au poivre de Séchuan<br>• Moelleux de céleri aux chataîgnes<br>• Sélection du fromager<br>• Fôret Noire", "Prix : 27 € TTC", "", "rest_plateau13.gif");
plateau[14] = new Array("Filet d'agneau aux quatre épices", "• Raviole de Royanl<br>• Filet d'agneau aux quatre épices<br>• Haricots verts à l'ail en chemise<br>• Sélection du fromager<br>• Financier aux noisettes et aux figues", "Prix : 28,50 € TTC", "", "rest_plateau14.gif");



function Changetxt(id) {
  document.getElementById('titre').innerHTML = plateau[id][0];
  document.getElementById('texte').innerHTML = plateau[id][1];
  document.getElementById('prix1').innerHTML = plateau[id][2];
  document.getElementById('prix2').innerHTML = plateau[id][3];
  document.getElementById('fotoplato').src = "imgs/" + plateau[id][4];
}

function delLien(monLien,TXT){
  if (confirm(TXT)){
     window.location=monLien;
  }
}
/*
function Changetxt(titre,txt,prix1,prix2,img) {
  document.getElementById('titre').innerHTML = titre;
  document.getElementById('texte').innerHTML = txt;
  document.getElementById('prix1').innerHTML = prix1;
  document.getElementById('prix2').innerHTML = prix2;
  document.getElementById('fotoplato').src = "imgs/" + img;
}
*/
function MM_findObj(n, d) { //v4.01
  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 YY_checkform() { //v4.71
//copyright (c)1998,2002 Yaromat.com
  var a=YY_checkform.arguments,oo=true,v='',s='',err=false,r,o,at,o1,t,i,j,ma,rx,cd,cm,cy,dte,at;
  for (i=1; i<a.length;i=i+4){
    if (a[i+1].charAt(0)=='#'){r=true; a[i+1]=a[i+1].substring(1);}else{r=false}
    o=MM_findObj(a[i].replace(/\[\d+\]/ig,""));
    o1=MM_findObj(a[i+1].replace(/\[\d+\]/ig,""));
    v=o.value;t=a[i+2];
    if (o.type=='text'||o.type=='password'||o.type=='hidden'){
      if (r&&v.length==0){err=true}
      if (v.length>0)
      if (t==1){ //fromto
        ma=a[i+1].split('_');if(isNaN(v)||v<ma[0]/1||v > ma[1]/1){err=true}
      } else if (t==2){
        rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-zA-Z]{2,4}$");if(!rx.test(v))err=true;
      } else if (t==3){ // date
        ma=a[i+1].split("#");at=v.match(ma[0]);
        if(at){
          cd=(at[ma[1]])?at[ma[1]]:1;cm=at[ma[2]]-1;cy=at[ma[3]];
          dte=new Date(cy,cm,cd);
          if(dte.getFullYear()!=cy||dte.getDate()!=cd||dte.getMonth()!=cm){err=true};
        }else{err=true}
      } else if (t==4){ // time
        ma=a[i+1].split("#");at=v.match(ma[0]);if(!at){err=true}
      } else if (t==5){ // check this 2
            if(o1.length)o1=o1[a[i+1].replace(/(.*\[)|(\].*)/ig,"")];
            if(!o1.checked){err=true}
      } else if (t==6){ // the same
            if(v!=MM_findObj(a[i+1]).value){err=true}
      }
    } else
    if (!o.type&&o.length>0&&o[0].type=='radio'){
          at = a[i].match(/(.*)\[(\d+)\].*/i);
          o2=(o.length>1)?o[at[2]]:o;
      if (t==1&&o2&&o2.checked&&o1&&o1.value.length/1==0){err=true}
      if (t==2){
        oo=false;
        for(j=0;j<o.length;j++){oo=oo||o[j].checked}
        if(!oo){s+='* '+a[i+3]+'\n'}
      }
    } else if (o.type=='checkbox'){
      if((t==1&&o.checked==false)||(t==2&&o.checked&&o1&&o1.value.length/1==0)){err=true}
    } else if (o.type=='select-one'||o.type=='select-multiple'){
      if(t==1&&o.selectedIndex/1==0){err=true}
    }else if (o.type=='textarea'){
      if(v.length<a[i+1]){err=true}
    }
    if (err){s+='* '+a[i+3]+'\n'; err=false}
  }
  if (s!=''){alert('!!! ATTENTION !!!\t\t\t\t\t\n\n'+s)}
  document.MM_returnValue = (s=='');
}

