// JavaScript Document
//Affiche une image (img) dans un popup
function PopupImage(img) {
	titre="Image taille reelle";
	w=open("",'image','top=0,left=200,width=400,height=400,toolbar=no,scrollbars=no,resizable=yes');	
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>");
	w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+12,document.images[0].height+40); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
	w.document.write("<BODY onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG src='"+img+"' border=0>");
	w.document.write("");
	w.document.write("</BODY></HTML>");
	w.document.close();
}

//Verifie un champ prix
function Verifprix(obj,txt){
var reg = RegExp(",","gi");
obj.value = obj.value.replace(reg,".");
if(!isNaN(obj.value)){
	if(obj.value!=""){
	obj.value = parseFloat(obj.value);
	}
	return true;
}
else{
alert("Veuillez saisir un nombre dans le champ "+txt+" !");
return false;
}
}

//function change class

function chgClassOfBlock (idBlock, className) {
	
	var el = document.getElementById(idBlock) ;
	el.className = className ;
	
	
}

function MM_WindowOpen (theURL) {

	window.open(theURL, '_self') ;
	
}