thumb_step = 0;
thumb_obj = false;
thumb_over = false;
thumb_active = false;

function thumbStep()
{
	if(!(thumb_obj)) return;

	thumb_obj.style.filter = 'alpha(opacity='+(40 + parseInt(1.0*thumb_step/6*60) )+')';
	if((thumb_step < 6 && thumb_over) || (thumb_step > 0 && !thumb_over))
	{
		thumb_step += (thumb_over) ? 1 : -1;
		setTimeout(thumbStep, 50);
	}
	else
	{
		thumb_active = false;
	}
}

function thumbOver( obj )
{
	if(thumb_obj)
	{
		thumb_obj.style.filter = "alpha(opacity=40)";
	}
	thumb_obj = obj;
	thumb_over = true;
	if(!thumb_active)
	{
		thumb_active = true;
		setTimeout(thumbStep, 10);
	}
}

function thumbOut( obj )
{
	thumb_obj = obj;
	thumb_over = false;
	if(!thumb_active)
	{
		thumb_active = true;
		setTimeout(thumbStep, 10);
	}
}

function thumbClick( image, size,height )
{
	if(size){
		width =size;
	} else {
		width = 350;
		height = 350;
	}
	window.open(image+'.html','aldphoto','width='+width+',height='+height);
	return false;
}
