/* Fonctions Utilitaires developpees par LXSolutions
 *  (c) 2007 LXSolutions
/*--------------------------------------------------------------------------*/
var standHeight=200;
var currentDiv;
function showImage000(name,w,h,event){
 
 Position.prepare();

 $("targetImage").src=name;
 $("targetImage").removeAttribute("width");
 $("targetImage").removeAttribute("height");
 if(w>0){ $("targetImage").width=w; } 
 if(h>0){ $("targetImage").height=h;}
 //if(!w && !h || w==0 && h==0) { $("targetImage").height=standHeight; }  
 
 var containerWidth = $("divImage").getWidth();
 var containerHeight = $("divImage").getHeight();
 var mPosX=Event.pointerX(event);
 var mPosY=Event.pointerY(event);

 var Client = {   
  viewportWidth: function() {     return self.innerWidth || (document.documentElement.clientWidth || document.body.clientWidth);   },   
  viewportHeight: function() {     return self.innerHeight || (document.documentElement.clientHeight || document.body.clientHeight);   },   viewportSize: function() {     return { width: this.viewportWidth(), height: this.viewportHeight() };   } };
 var viewportWidth=Client.viewportWidth(); 
 var viewportHeight=Client.viewportHeight();
 var offset=0;
 var pleft = ( (mPosX + containerWidth) > viewportWidth ? (viewportWidth - containerWidth ) : mPosX + offset );
 var ptop = ((mPosY - offset + containerHeight) > viewportHeight && (mPosY - offset) > containerHeight ? (mPosY - containerHeight - offset) : mPosY + offset);

 $("divImage").style.left= ''+ pleft + 'px';
 $("divImage").style.top= ''+ ptop + 'px'; 
 
 $("divImage").style.display="block";
 //new Effect.Appear("divImage"); 
 currentDiv="divImage";
}

function hideCurrentDiv(){
	if(currentDiv){
		//new Effect.Fade(currentDiv);
		$("divImage").style.display="none";
		$("targetImage").src="imgs/spacer.gif";
	}
	currentDiv=null;
}
