function poppic(pic,w,h,size)
{
	Formw=(w-0)+30
	Formh=(h-0)+30
	eval("newwin1 = window.open('/pop_pic.aspx?ID='+ pic+ '&Size=' + size,'_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=1,resizable=1, left=0,top=0,width="+Formw+",height="+Formh+"');newwin1.focus();");
}

function ScrollDown()
{
scrollspeed=1; 
}

function ScrollUp()
{
scrollspeed=-1;
}

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 MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//******************IMPRIMER
<!--
var da = (document.all) ? 1 : 0;
var pr = (window.print) ? 1 : 0;
var mac = (navigator.userAgent.indexOf("Mac") != -1);

function printPage()
{
  
  if (pr) // NS4, IE5
    window.print()
  else if (da && !mac) // IE4 (Windows)
    vbPrintPage()
  else // other browsers
    alert("Désolé, votre fureteur ne permet pas cette fonction.");
  //return false;
}

if (da && !pr && !mac) with (document)
{
  writeln('<OBJECT ID="WB" WIDTH="0" HEIGHT="0" CLASSID="clsid:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>');
  writeln('<' + 'SCRIPT LANGUAGE="VBScript">');
  writeln('Sub window_onunload');
  writeln('  On Error Resume Next');
  writeln('  Set WB = nothing');
  writeln('End Sub');
  writeln('Sub vbPrintPage');
  writeln('  OLECMDID_PRINT = 6');
  writeln('  OLECMDEXECOPT_DONTPROMPTUSER = 2');
  writeln('  OLECMDEXECOPT_PROMPTUSER = 1');
  writeln('  On Error Resume Next');
  writeln('  WB.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER');
  writeln('End Sub');
  writeln('<' + '/SCRIPT>');
}

function txtRoll(id,out){
	i = document.getElementById(id).style;
	if (out == 0){
		i.color = "#000";
		i.cursor ="hand";
	} else {
		i.color = "#824A34";
	}
}

function gotoEss(id){ window.location = id; }
function gotoEssHr(id){ window.location = "prod_souscat_ess_ts_hr.aspx?ID="+id; }		

if (document.images) { // Preloaded images
	img1 = new Image();
	img2 = new Image();
	img3 = new Image();
	img4 = new Image();
	
	img1.src = "/medias/communs/gears_ani_1.gif";
	img2.src = "/medias/communs/gears_ani_2.gif";
	img3.src = "/medias/communs/gears_ani_3.gif";
	img4.src = "/medias/communs/gears_ani_0.gif";
}

function BusyBoxShow(){
	document.getElementById("Loading").style.display = "";
	imgLoad = document.getElementById("BusyBoxImg");
	if (anim == false) { 
		timeimgs('1'); 
		anim = true;
	}
}

function BusyBoxHide(){
	document.getElementById("Loading").style.display = "none";
	if (anim == true) { 
		clearTimeout(thetimer); 
		imgLoad.src = eval("img4.src");
		anim = false;
	}
}

function timeimgs(numb) { // Reusable timer
	thetimer = setTimeout("imgturn('" +numb+ "')", 100);
}

function imgturn(numb) { // Reusable image turner
	if (numb == "4") { // This will loop the image
		imgLoad.src = eval("img4.src");
		timeimgs('1');
	} else { 
		imgLoad.src = eval("img" + numb + ".src");
		timeimgs(numb = ++numb);
	}
}



// -->

