function wopen(uri)	{

width = document.body.clientWidth - 500;
if(window.innerHeight)
	height = window.innerHeight - 200;
	else
	height = document.body.clientHeight - 200;
if(660 > width)
	width = 660;
if(500 > height)
	height = 500;

	uwidth = width - 20;
	uheight = height - 20;
	uri = '/thumbs/'+uwidth+'x'+uheight+uri;
	window.open(uri,'','width='+width+', height='+height+', left=100, top=10, resizable=yes, scrollbars=yes');
	}

function wopen1(uri)	{

width = document.body.clientWidth - 600;
if(window.innerHeight)
	height = window.innerHeight - 100;
	else
	height = document.body.clientHeight - 100;
if(600 > width)
	width = 600;
if(500 > height)
	height = 500;

	uwidth = width - 20;
	uheight = height - 20;
//	uri = '/thumbs/'+uwidth+'x'+uheight+uri;
	window.open(uri,'','width='+width+', height='+height+', left=300, top=100, resizable=yes, scrollbars=yes');
	}

function imageView(id,src,title,thprefix)	{
	document.getElementById(id).src = thprefix+src;
	document.getElementById(id+'-href').href = "javascript:wopen('"+src+"')";
	document.getElementById(id).alt = title;
	document.getElementById(id).title = title;
}
