var i=0;
var utolso_img='';

function reveal_by_table(table)
{
	for ( n = 0; n < table.all.length; n++)
	{
		if(table.all(n).tagName=="IMG" && table.all(n).id!="")
			if(table.all(n).resized)
				reveal_image(table.all(n).id);
	}

}

function hide_by_table(table)
	{
	if(typeof img_shower!='undefined')
		img_shower.style.visibility='hidden';
	}

function reveal_image(z)
{

my_img=document.getElementById(z);
img_shower=document.getElementById('image_shower');
 // Decide browser version
var ie4 = document.all && !document.getElementById;
var ie5 = document.all && document.getElementById;
var ns6 = !document.all && document.getElementById;
var ns4 = document.layers;

 if ( ns4 || ns6 ) {
  mouse_x=e.pageX;
  mouse_y=e.pageY;}
 if (ie4) {
  mouse_x=event.x;
  mouse_y=event.y;}
 if (ie5) {
  mouse_x=event.x+self.document.body.scrollLeft;
  mouse_y=event.y+self.document.body.scrollTop;}

  
if(utolso_img!=my_img.src)
	img_shower.innerHTML='<img src="'+my_img.src+'" width="'+my_img.origw+'" height="'+my_img.origh+'" style="border: 1px solid navy">';

utolso_img=my_img.src;
img_shower.style.left=mouse_x-my_img.origw-15;
img_shower.style.top=mouse_y-my_img.origh-15;
img_shower.style.visibility='visible';
}

function resize_image(myimage)
	{
	max_width=142;
	max_height=132;	
	//myimage=document.getElementById(id);
	myimage.origw=myimage.width;
	myimage.origh=myimage.height;	
	myimage.resized=true;

	if (myimage.width>max_width)
	{
	var ratio=max_width/myimage.width;
	if(ratio>0)
		{
		myimage.width=max_width;
		myimage.height=myimage.origh*ratio;
		}
	}
	}

