function ShowImage (url, resX, resY, title, uid) {
	maxX=screen.availWidth;
	maxY=screen.availHeight-40;
	scrollbars=0;
	if (resX>maxX) {reX=maxX;leftC=0;scrollbars=1;}else {reX=parseInt(resX)+5;leftC=(maxX-resX)/2;}
	if (resY>maxY) {reY=maxY;topC=0;scrollbars=1;}else {reY=resY;topC=(maxY-resY)/2;}
	w=window.open('', 'ph_'+uid, 'width=' + reX + ',height=' + reY+',status=0,toolbar=0,resizable=1, top='+topC+', left='+leftC+',scrollbars='+scrollbars);
	if (title!=""){title1=title;}else{	title1="";}
	w.document.open();
	w.document.write('<html><head><title>' + title1 + '</title></head>');
	w.document.write('<body style="margin:0px;padding:1px;" bgcolor="#ffffff" onKeyPress="if (event.keyCode==27) window.close();">');
	w.document.write('<center><a onclick="javascript:window.close();">');
	w.document.write('<img border=0 align=center src="'+url+'" alt="'+title+' \nЛевая кнопка мыши - Закрыть" width="'+resX+'" height="'+resY+'"></a>');
	if (title!=""){
		w.document.write('<br />'+title+'');
	}
	w.document.write('</center></body></html>');
	w.document.close();
	if (w!=null){w.focus();};
}


$(document).ready(function(){
	
	$('body').append('<div id="list_data"></div>')
	
	$('#list_data').css();
	
	$('div.list_item p.first')
		.hover(function(){ $(this).addClass('first_hover') }, function(){ $(this).removeClass('first_hover') } )
		.click(function(event){
			
			var x_coord = event.pageX;
			var y_coord = event.pageY;
			
			var data = $(this).parent().find('div.list_detail').html();
			$('#list_data').html(data).css({
				'top' : (y_coord + 15) + 'px',
				'left' : (x_coord + 15) + 'px',
				'display': 'block'
			});
			$('#list_data img.list_close').click(function(){
				$('#list_data').css('display', 'none');
			})
		});
	
	
	
});
