function search_focus() 
{
	search = document.getElementById('search');
	if (search.value == 'Поиск...') { search.value = ''; search.className = 'searchfieldfocus'; }
	
}

function search_blur()
{
	search = document.getElementById('search');
	if (search.value == '') { search.value = ''; search.className = 'searchfield'; }
}

function view_photo (imgSrc, imgWidth, imgHeight, imgTitle) {
	 if (!imgWidth || !imgHeight) {
	 imgWindow = window.open('', 'image', '');
	 var html = '<html><head><title></title></head><body style="margin: 0; padding: 0;">' +
	 '<img alt="' + imgTitle + '" src="' + imgSrc + '">' +
	 '</body></html>';
	 imgWindow.document.write(html);
	 return;
	 }

	 var screenWidth = screen.availWidth;
	 var screenHeight = screen.availHeight;
	 var titleHeight = 30;
	 if (imgTitle) { imgHeight = imgHeight + titleHeight; }
	 var windowLeft, windowTop;
	 if ((screenWidth - imgWidth) > 0) { windowLeft = (screenWidth - imgWidth) / 2 } else { windowLeft = 0; }
	 if ((screenHeight - imgHeight) > 0) { windowTop = (screenHeight - imgHeight) / 2 } else { windowTop = 0; }
	 var imgWindow = window.open('', 'image',
	 'width=' + imgWidth + ', height=' + imgHeight +
	 ', left=' + windowLeft + ', top=' + windowTop
	 );
	 var html = '<html><head><title>' + imgTitle + '</title></head><body style="margin: 0; padding: 0;">' +
	 '<img alt="' + imgTitle + '" src="' + imgSrc + '">' +
	 '<div style="heigth: ' + titleHeight + 'px; width: 100%; text-align: center; font: 10px Arial;">'+ imgTitle +'</div>' +
	 '</body></html>';
	 imgWindow.document.write(html);
	 imgWindow.document.close();
	 return;
	}