function wip_ajax_gallery1_lw (w, h, url, title, author, caption) {
     mlw2 = new lightwindow({resizeSpeed : 10});
     mlw2.activateWindow({
   	                  href    : url,
   		          title   : title,
   		          author  : author,
   		          caption : caption,
   		          width   : w,
   		          height  : h
   		         });
   }

   function wipGalleryHttpAjaxSuccess (t, statusDiv) {

   }
   function wipGalleryHttpAjaxError (t) {
     alert('Error ' + t.status + ' -- ' + t.statusText);
     //alert('you can\'t user this pseudo (ndr : test version).');
     //$(imgPseudo).src = '/champNonValide.gif';
   }

   function wipGalleryHttpAjaxError404 (t) {
     alert('Error ' + t.status + ' -- ' + t.statusText);
     //alert('you can\'t user this pseudo (ndr : test version).');
     //$(imgPseudo).src = '/champNonValide.gif';
   }

   function wipGalleryLoad (queryString, htmlDiv) {
     var status = document.getElementById(htmlDiv + 'status');
     if (status) {
       status.style.display = 'inline';
     }
  wipGalleryUpdater(queryString, htmlDiv);
  }

   function wipGalleryUpdater (queryString, htmlDiv) {
     var url = '/tools/wip_v4/ajax/gallery1/show_gallery.epl';
     new Ajax.Updater(htmlDiv, url + '?' + queryString, {
                                                     onComplete:function(){
  },
                                                     asynchronous: true,
                                                     evalScripts: true,
                                                     method: 'get',
                                                     on404: wipGalleryHttpAjaxError404,
                                                     onSuccess: wipGalleryHttpAjaxSuccess,
                                                     onFailure: wipGalleryHttpAjaxError
                                                    });

   }


   function wipGalleryLoadInit (queryString, htmlDiv) {

     Event.observe(window, 'load', function() {
       Event.observe(document, 'keydown', function(event) {
	 var keycode = event.keyCode ? event.keyCode : event.which;
	 if (keycode == Event.KEY_RIGHT) {
	   try { clearTimeout(gallery1_timer); } catch (err) {}
	   wip_gallery_go_right();
	 } else if (keycode == Event.KEY_LEFT) {
	   try { clearTimeout(gallery1_timer); } catch (err) {}
	   wip_gallery_go_left();
	 }
       });
     });

     var status = document.getElementById(htmlDiv + 'status');
     if (status) {
       status.style.display = 'inline';
     }
     var url = '/tools/wip_v4/ajax/gallery1/show_gallery.epl';
     new Ajax.Updater(htmlDiv, url + '?' + queryString, {
                                                     onComplete:function(){
                                                                          },
                                                     asynchronous: true,
                                                     evalScripts: true,
                                                     method: 'get',
                                                     on404: wipGalleryHttpAjaxError404,
                                                     onSuccess: wipGalleryHttpAjaxSuccess,
                                                     onFailure: wipGalleryHttpAjaxError
                                                    });
   }


   function wip_gallery_go_right () {
     wipGalleryLoad(wipgallery_next_url, wipgallery_div);
   }
   function wip_gallery_go_left () {
     wipGalleryLoad(wipgallery_prev_url, wipgallery_div);
   }



