
function OpenWin(URL,width,height,nom)
  {
	window.open(URL,nom,"toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=" + width + ",height=" + height + ",resizable=no");
  }

function OpenWin2(URL,width,height,nom)
  {
	window.open(URL,nom,"toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=" + width + ",height=" + height + ",resizable=yes");
  }

function AfficheMaxi(URL,nom_jv, descproduit_jv, ficsec, ficcat)
  {
  i1 = new Image();
  i1.src = URL;
  nom = stripslashes(nom_jv);
  descproduit=stripslashes(descproduit_jv);
  

    html = '<html><head><title>JetSpice : '+nom+'</title><LINK href=styleNEW.css type=text/css rel=stylesheet><script language="javascript">function Min (a, b){if (a < b) {return a;} else {return b;}}function autoSize(){self.resizeTo(Min((document.images[0].width+350), screen.width-10),Min((document.images[0].height+160), screen.height-25));}</script></head><body  leftMargin="0" topMargin="0" rightMargin="0" bottomMargin="0" MARGINHEIGHT="0" MARGINWIDTH="0" onLoad="javascript:autoSize();"> <center><table width="100%" cellpadding="0" cellspacing="0" align="center"><tr><td > &nbsp;&nbsp;&nbsp;&nbsp;<b>'+nom+'<br>'+descproduit+'</b></td><td align="center"><font class="jauneik"><br></font><img src="'+URL+'"</td></tr>'+
	'<tr><td height="5">&nbsp;'+
	'</td></tr>'+
	'</table></center></body></html>';

  popupImage = window.open('','_blank','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0, width=300, height=30, left=180, top=50');
  popupImage.document.open();
  popupImage.document.write(html);
  //popupImage.document.write("<a href='javascript:window.self.close();'>self</a>" );
  //window.open("http://www.microsoft.com/");

  popupImage.document.close();
  }
  
 function AfficheMaxisave(URL,nom_jv,CSS)
  {
  i1 = new Image();
  i1.src = URL;
  nom = stripslashes(nom_jv);

    html = '<html><head><title>JetSpice</title><script language="javascript">function Min (a, b){if (a < b) {return a;} else {return b;}}function autoSize(){self.resizeTo(Min((document.images[0].width+50), screen.width-10),Min((document.images[0].height+160), screen.height-25));}</script></head><body bgcolor="#EFE7D6" leftMargin="0" topMargin="0" rightMargin="0" bottomMargin="0" MARGINHEIGHT="0" MARGINWIDTH="0" onLoad="javascript:autoSize();"> <center><table width="100%" cellpadding="0" cellspacing="0" align="center"><tr><td ><FONT FACE="Comic Sans MS" SIZE=2 COLOR=#663333> &nbsp;&nbsp;&nbsp;&nbsp;<b>'+nom+'</b></FONT></td></tr><tr><td align="center"><font class="jauneik"><br></font><img src="'+URL+'"</td></tr><tr><td height="5">&nbsp;</td></tr><tr><td align="center"><a href="javascript:close()"><img SRC="./images/fermer.jpg" BORDER="0"></a></td></tr></table></center></body></html>';

  popupImage = window.open('','_blank','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0, width=300, height=30, left=180, top=50');
  popupImage.document.open();
  popupImage.document.write(html);
  popupImage.document.close()
  }

function expandingWindow(website, id_author)
    {
    var id_auth = id_author;
    var sizer = window.open('','_blank','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=1,resizable=1, width=400, height=350, left=70, top=50');
    sizer.location = website + "?id_auth=" + id_auth;
    }

function stripslashes(ch)
    {
    return ch.replace(/(\\)([\\\'\"])/g,"$2")
    }

