			function change_photo(increment) {
				
				photo = photo + increment;

				if(photo > nb_photos)
					photo = 1;
					
				if(photo <= 0)
					photo = nb_photos;
						
				if(nb_photos > 0)
					document.getElementById("img").src = "photos/"+montab[photo];
			}
		
		
			function zoom(id_annonce,largeur,hauteur,niveau,options) {
				var top = (screen.height-hauteur)/2;
				var left = (screen.width-largeur)/2;
                var photo = 1;
				window.open("http://www.botor.com/zoom.php?id="+id_annonce+"&num_photo="+niveau+"&niveau="+niveau,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
			}
		
			function impression() {
				window.open("impression.php?id="+id_annonce);
			}
			
			function geoloc(id,largeur,hauteur,options) {
				var top = (screen.height-hauteur)/2;
				var left = (screen.width-largeur)/2;
				window.open("http://www.botor.com/geoloc.php?id="+id,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
			}

			function geoloc2(rue,cp,ville,largeur,hauteur,options) {
				var top = (screen.height-hauteur)/2;
				var left = (screen.width-largeur)/2;
				window.open("http://www.botor.com/geoloc.php?rue="+rue+"&cp="+cp+"&ville="+ville,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
			}
            // id=l'image ;id2=autre image ;hid= champ cache ;hid2= autre champ cache ;
            function changeimgc(id,id2,hid,hid2){

                if (document.getElementById(hid).value == "" && document.getElementById(hid2).value == ""){
                    if(document.getElementById(hid).id == "cc1"){
                        document.getElementById("cv1").src = "images/validG.png";
                        document.getElementById("cv2").src = "images/pas_validG.png";
                        document.getElementById("cc1").value = "1";
                        document.getElementById("cc2").value = "0";
                    }
                    else{
                        document.getElementById("cv2").src = "images/validG.png";
                        document.getElementById("cv1").src = "images/pas_validG.png";
                        document.getElementById("cc2").value = "1";
                        document.getElementById("cc1").value = "0";  
                    }
                }
                else{
                    if (document.getElementById(hid).value == "0"){
                        document.getElementById(id).src = "images/validG.png";
                        document.getElementById(id2).src = "images/pas_validG.png";
                        document.getElementById(hid).value = "1";
                        document.getElementById(hid2).value = "0";
                    }
                    else{
                        document.getElementById(id).src = "images/pas_validG.png";
                        document.getElementById(id2).src = "images/validG.png";
                        document.getElementById(hid).value = "0";
                        document.getElementById(hid2).value = "1";
                    }
                }
			}

            function changeimg(id,hid,hid2){
                if (document.getElementById(hid).value == 0){
                    document.getElementById(id).src = "images/valid.png";
                    document.getElementById(hid).value = "1";
                }
                else{
                    document.getElementById(id).src = "images/pas_valid.png";
                    document.getElementById(hid).value = "0";
                }
			}

            function contact(largeur,hauteur,categorie,id,options) {
				var top = (screen.height-hauteur)/2;
				var left = (screen.width-largeur)/2;
				window.open("http://www.botor.com/contact.php?type="+categorie+"&id="+id,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
			}