function PopupImage(img, ImgTitle) { 
  // Compatible IE5+ / NN6+ / Mozilla
  var oFenetre = window.open('','Image','width=400,height=400,toolbar=no,scrollbars=no,resizable=yes');
  oFenetre.document.write("<html>"); 
  oFenetre.document.write("<head>"); 
  oFenetre.document.write("<link rel='stylesheet' href='css/popup.css' type='text/css'>");
  
  oFenetre.document.write("</head>"); 
  oFenetre.document.write("<body onload='window.resizeTo(document.images[0].width+50,document.images[0].height+200);'>"); 
 	oFenetre.document.write("<table border='0' width='100%' height='40'><tr><td valign='middle' align='left'><div class='titrePopup'>");
  oFenetre.document.write(ImgTitle + "</div></td></tr></table><br>")

  oFenetre.document.write("<img src='"+img+"' border='0'>");
  oFenetre.document.write("</td></tr></table>");
  oFenetre.document.write("</body></html>");
  oFenetre.document.close(); 
}
var myPopUpWin=0;
function winUpWindow(URLStr, left, top, width, height)
{
  if(myPopUpWin)
  {
	if(!myPopUpWin.closed) myPopUpWin.close();
  }
  myPopUpWin = open(URLStr, 'myPopUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
function popUpComparateur(ProductClassId){	
	var left = 50;
	var top = 50;
	var width = 1000;
	var height = 550;
	var URLStr = "/Comparateur-" + ProductClassId + ".html"
	winUpWindow(URLStr, left, top, width, height);
}
function PopupAutresVues(ProductId){	
	var left = 50;
	var top = 50;
	var width = 750;
	var height = 550;
	var URLStr = "/Autre-Vues-" + ProductId + ".html"
	winUpWindow(URLStr, left, top, width, height);
}

function PopupAutresVideos(ProductId){	
	var left = 50;
	var top = 50;
	var width = 750;
	var height = 550;
	var URLStr = "/Lire-Video-" + ProductId + ".html"
	winUpWindow(URLStr, left, top, width, height);
}


function CheckDimension()
{
	var i;
	
	for (i=0;i<document.frm.elements.length;i++)
	{
		if (document.frm.elements[i].name.substring(0,11) == 'CboProdSize' && document.frm.elements[i].value == 0)
		{
			alert('Veuillez choisir toutes les valeurs de déclinaisons.');
			return false;
		}
	}
	return true;
}
