<!--
//  Copyright © 2004 Siti Tous droits réservés


function VersionNavigateur(Netscape, Explorer)
{
  if (( (navigator.appVersion.substring(0,3) >= Netscape) && (navigator.appName == 'Netscape')) ||
  ( (navigator.appVersion.substring(0,3) >= Explorer) && (navigator.appName.substring(0,9) == 'Microsoft') ))
      return true;
  else return false;
}


function fenetre(url,name,features)
{
  var smallwindow = window.open(url,name,features);
  smallwindow.focus();
}
function resizescreen()
{
    window.resizeTo(screen.width,screen.height);
}

// confirmer

function ConfirmPopupForm(form,mess)
{
    if (window.confirm(mess))
    {
        form.submit();
    }

}
function Client_Menu(form,form2)
{
    form.submit();
    //form2.submit();
}
function Client_Forms(form,form2)
{
    form.submit();
    //form2.submit();
}
function imp_flash(win,fic,w,h,design)
{
    var toth = h + 30 + 40;
    var totw = w + 30;
    var smallwindow = win.open('','_blank',"toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width="+totw+",height="+toth);
    var doc = smallwindow.document;
    doc.clear();
    doc.write("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1 \"><title>Coupon</title>");
    doc.write("</head>");
    doc.write("<body background=\"#FFFFFF\" >\n") ;
    doc.write("<div align=\"center\"><center><table border=\"0\" width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" height=\"100%\">");
    doc.write("<tr>");
    doc.write("<td colspan=\"2\" width=\""+w+"\" height=\""+h+"\">");
    doc.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"" +w + "\" height=\""+ h + "\" id=\"plan\" align=\"middle\">");
    doc.write("<param name=\"allowScriptAccess\" value=\"sameDomain\" />");
    doc.write("<param name=\"movie\" value=\""+ fic + "\" />");
    doc.write("<param name=\"quality\" value=\"high\" />");
    doc.write("<param name=\"wmode\" value=\"transparent\" />");
    doc.write("<param name=\"bgcolor\" value=\"#ffffff\" />");
    doc.write("<embed src=\""+ fic + "\" quality=\"high\" wmode=\"transparent\" bgcolor=\"#ffffff\" width=\""+w+"\" height=\""+h+"\" name=\"plan\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" /></object>");
    doc.write("</td>");
    doc.write("</tr>");
    doc.write("<tr>");
    doc.write("<td width=\"30%\" height=\"30\">");
    //doc.write("<a href=\"javascript:window.close()\"><img name=\"Imgfermer\" align=\"absmiddle\" border=0 OnMouseOver=\"Imgfermer.src='"+design+"/bt_quit_on.png'\" OnMouseOut=\"Imgfermer.src='"+design+"/bt_quit_off.png'\" src=\""+design+"/bt_quit_off.png\" OnLoad=\"tempImg=new Image(0,0); tempImg.src='"+design+"/bt_quit_on.png'\" alt=\"Fermer\"></a>");
    doc.write("<a href=\"javascript:window.close()\"><img name=\"Imgfermer\" align=\"absmiddle\" border=0 src=\""+design+"/client_fermer.png\" width=\"20\" height=\"20\" alt=\"Fermer\"></a>");
    doc.write("</td>");
    doc.write("<td width=\"70%\" height=\"30\">");
    doc.write("&nbsp;");
    doc.write("</td>");
    doc.write("</tr>");
    doc.write("</table>");
    doc.write("</center></div>");
    doc.write("</body>");
    doc.write("</html>");
    doc.close();
    smallwindow.focus();
}
function imp_image(win,img,w,h,design)
{
    var toth = h + 30 + 40;
    var totw = w + 30;
    var smallwindow = win.open('','_blank',"toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width="+totw+",height="+toth);
    var doc = smallwindow.document;
    doc.clear();
    doc.write("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1 \"><title>Image</title>");
    doc.write("</head>");
    doc.write("<body background=\"#FFFFFF\" >\n") ;
    doc.write("<div align=\"center\"><center><table border=\"0\" width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" height=\"100%\">");
    doc.write("<tr>");
    doc.write("<td colspan=\"2\" width=\""+w+"\" height=\""+h+"\"><img src=\"");
    doc.write(img);
    doc.write("\" width=\""+w+"\" height=\""+h+"\"></td>");
    doc.write("</tr>");
    doc.write("<tr>");
    doc.write("<td width=\"100%\" height=\"30\" align=\"left\">");
    doc.write("<a href=\"javascript:window.close()\"><img name=\"Imgfermer\" align=\"absmiddle\" border=0 src=\""+design+"/client_fermer.png\" width=\"20\" height=\"20\" alt=\"Fermer\"></a>");
    doc.write("</td>");
    doc.write("</tr>");
    doc.write("</table>");
    doc.write("</center></div>");
    doc.write("</body>");
    doc.write("</html>");
    doc.close();
    smallwindow.focus();
}

var textischanged = false;

function OnChangeText(form)
{
    //form.Reserver.disabled = true;
    textischanged = true;
}

function ContinueCommande()
{
    if (!textischanged)
        document.continueform.submit()
    else alert("Vous devez cliquer sur le bouton 'Modifier les quantités' avant de pouvoir continuer");
}

function ValideCaddie()
{
    document.caddieform.submit()
}


function EnvoyerDate(col,day,month,year)
{
    //window.opener.document.forms["mainform"].elements[col + "_year"].value=year;
    //window.opener.document.forms["mainform"].elements[col + "_mon"].value=month;
    //window.opener.document.forms["mainform"].elements[col + "_day"].value=day;
    ChangeSelect(col + "_DAY",day);
    ChangeSelect(col + "_MON",month);
    ChangeSelect(col + "_YEAR",year);

    window.close();
}

function ChangeSelect(col,val)
{
    var opt;
    model = window.opener.mainform.elements[col];
    bfound = false;
    for (i = 0; i < model.options.length; i++)
    {
            if (model.options[i].value == val)
            {
               model.options[i].selected = true;
               bfound = true;
               break;
            }
    }
}

function start(){
if (document.all) iemarquee(slider);
else if (document.getElementById)
ns6marquee(document.getElementById('slider'));
else if(document.layers)
ns4marquee(document.slider1.document.slider2);
}
function iemarquee(whichdiv){
iediv=eval(whichdiv)
iediv.innerHTML=wholemessage 
iediv.style.pixelTop=sheight
sizeup=iediv.offsetHeight
ieslide()
}
function ieslide(){
if (iediv.style.pixelTop>=sizeup*(-1)){
iediv.style.pixelTop-=sspeed
setTimeout("ieslide()",100)
}
else{
iediv.style.pixelTop=sheight
ieslide()
}
}
function ns4marquee(whichlayer){
ns4layer=eval(whichlayer)
ns4layer.document.write(wholemessage)
ns4layer.document.close()
sizeup=ns4layer.document.height
ns4layer.top-=sizeup
ns4slide()
}
function ns4slide(){
if (ns4layer.top>=sizeup*(-1)){
ns4layer.top-=sspeed
setTimeout("ns4slide()",100)
}
else{
ns4layer.top=sheight
ns4slide()
}
}
function ns6marquee(whichdiv){
ns6div=eval(whichdiv)
ns6div.innerHTML=wholemessage
ns6div.style.top=sheight
sizeup=ns6div.offsetHeight
ns6slide()
}
function ns6slide(){
if (parseInt(ns6div.style.top)>=sizeup*(-1)){
ns6div.style.top=parseInt(ns6div.style.top)-sspeed
setTimeout("ns6slide()",100)
}
else{
ns6div.style.top=sheight
ns6slide()
}
}

var current = 0; 
function changecouleur(col,apercu)
{ 
document.getElementById(apercu).src = "/images/"+col.value+".jpg";
} 

function Ouvrir_Spplus()
{
    // Largeur et hauteur préconisées de la fenêtre SPPLUS
    var PopupSpplus_largeur = 750;
    var PopupSpplus_hauteur = 560;

    // Position haut et gauche de la fenêtre SPPLUS pour affichage centré dans l'écran
    var PopupSpplus_top =((screen.height-PopupSpplus_hauteur)/2);
    var PopupSpplus_left    =((screen.width-PopupSpplus_largeur)/2);

    // Ouverture du popup SPLUS avec barre état uniquement et focus sur la fenêtre
    var win = window.open('', "SPPLUS","status=yes,top="+PopupSpplus_top+",left="+PopupSpplus_left+",width="+PopupSpplus_largeur+",height="+PopupSpplus_hauteur);
    win.focus();
}
//-->



