function ouvrephoto(img)
{
        w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=yes');
        w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+12,document.images[0].height+100); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
        w.document.write("<BODY bgcolor='EEEEEE' onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><FORM><IMG src='"+img+"' border=0>");
        w.document.write("<div align=center><INPUT TYPE='button' value='Fermer' onClick='parent.close()'></div>");
        w.document.write("</FORM></BODY></HTML>");
        w.document.close();
}
function popup_color_picker(wchamp,wex)
		{
			var width = 140;
			var height = 100;
                        var top=(screen.height-height)/2;
                        var left=(screen.width-width)/2;
			window.open('color_picker.php?wchamp='+wchamp+'&wex='+wex, 'cp', 'resizable=no, location=no, top='+top+', left='+left+', width='
						+width+', height='+height+', menubar=no, status=no, scrollbars=no, menubar=no');
		}
function popup_color_picker_ok(wchamp,wex)
		{
			var width = 400;
			var height = 300;
			window.open('colpick/color_picker.php?wchamp='+wchamp+'&wex='+wex, 'cp', 'resizable=no, location=no, width='
						+width+', height='+height+', menubar=no, status=yes, scrollbars=no, menubar=no');
		}
function voir_img(liste)
{
   var wimg = document.getElementById(liste).options[document.getElementById(liste).selectedIndex].value;
   ouvrephoto("../image/"+wimg);
}
function change_style(wtaille,wcoul,wstyle,walign)
		{
			var width = 400;
			var height = 300;
			window.open('change_style.php?wtaille='+wtaille+'&wcoul='+wcoul+'&wstyle='+wstyle+'&walign='+walign,
            'cp', 'resizable=no, location=no, width=400, height=300, menubar=no, status=yes, scrollbars=no, menubar=no');
		}
function upload_fichier(rep)
                {
                        var hauteur=100;
                        var largeur=400;
                        var top=(screen.height-hauteur)/2;
                        var left=(screen.width-largeur)/2;
                        window.open('upload_fichier.php?rep='+rep,'cp','resizeable=no,location=no,top='+top+',left='+left+',width='+largeur+', height='+hauteur+', status=no,menubar=no');
                }
function help(wlibelle)
                {
                        var hauteur=400;
                        var largeur=600;
                        var top=(screen.height-hauteur)/2;
                        var left=(screen.width-largeur)/2;
                        window.open('admin_help.php?libelle='+wlibelle,'cp','resizeable=no,location=no,top='+top+',left='+left+',width='+largeur+', height='+hauteur+', status=no,menubar=no,scrollbars=yes');
                }
function chgpage(formulaire)
    {
    if (formulaire.listepages.selectedIndex != 0)
    {
    location.href = formulaire.listepages.options[formulaire.listepages.selectedIndex].value;
    }
    }
function popup_liste_image(wchamp)
		{
			var width = 620;
			var height = 450;
                        var top=(screen.height-height)/2;
                        var left=(screen.width-width)/2;
			window.open('choix_image.php?wchamp='+wchamp, 'cp', 'resizable=yes, location=no, top='+top+', left='+left+', width='
						+width+', height='+height+', menubar=no, status=no, scrollbars=yes, menubar=no');
		}
function cond_gene(wok)
{ 
  if(document.panier.condition.checked==false){alert("Vous n'avez pas validé les conditions générales de vente");}
  else
  {document.panier.submit();};
}
