function opencp(page,id){
	window.open(page+"?Id="+id,"","toolbar=0,location=0,directories=0,menuBar=0,scrollbars=yes,resizable=1,width=650, height=600");
}
function plan(page,largeur,hauteur,opt) {
	var top=(screen.height-hauteur)/2;
	var left=(screen.width-largeur)/2;
	window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+opt);
}

function validate() {
if (document.theform.Nom.value.length<1) { alert("Vous devez indiquer votre Nom");return false;}
if (document.theform.Email.value.length<1) { alert("Vous devez indiquer votre Email");return false;}
return true;

}
function openphoto(photo,w,h){
  window.open(photo,"photo","toolbar=0,location=0,directories=0,menuBar=0,scrollbars=yes,resizable=1,width="+w+", height="+h+"");
}
function zoom(idzoom,e,sens,w,t) {
	var posx = 0;
	var posy = 0;
	if (!w) var w = 200;
	if (!e) var e = window.event;
	if (e.pageX || e.pageY)	{
		posx = e.pageX;
		posy = e.pageY;
	}
	else if (e.clientX || e.clientY) {
		posx = e.clientX + document.body.scrollLeft;
		posy = e.clientY + document.body.scrollTop;
	}

	with (document.getElementById(idzoom).style) {
		display='block';
		left = posx - ((sens == 'g') ? w-70 : 0);
		top = parseInt(posy) + (t);
	}
}

function hidezoom(idzoom) {
	with (document.getElementById(idzoom).style) {
		display='none';
	}
	
}

function openimg(photo){
  window.open(photo,"photo","toolbar=0,location=0,directories=0,menuBar=0,scrollbars=yes,resizable=1");
}
function validation() { //v2.0
	if (document.theForm.Prix.value=="") {
	alert("Veuillez saisir le prix");
	document.theForm.Prix.focus();
	return false;
	}
}
