function zoom (lnk,w,h){

	w = w || 400; // Если w не пришел, зададим ему значение по умолчанию
	h = h || 300;

	if (w > screen.width)  w = screen.width;
	if (h > screen.height) h = screen.height;
	w += 20;
	h += 20;
	t=((screen.height-h)/2);
	l=((screen.width-w)/2);

	nw=window.open(lnk, 'image', 'toolbar=0,location=0,directories=0,'+
	'status=0,menubar=0,scrollbars=0,resizable=1,copyhistory=0,'+
	'width='+w+',height='+h+
	',top='+t+',left='+l);

	nw.focus();

	return false;
}
// Координаты мыши (положение курсора мыши) относительно окна документа (IE5+, Mozilla/Gecko, Opera 7+)
function mousePageXY(e)
{
    var x = 0, y = 0;
    if (!e) e = window.event;
    if (e.pageX || e.pageY){
        x = e.pageX;
        y = e.pageY;
    } else if (e.clientX || e.clientY){
        x = e.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft) - document.documentElement.clientLeft;
        y = e.clientY + (document.documentElement.scrollTop || document.body.scrollTop) - document.documentElement.clientTop;
    }
    return {"x":x, "y":y};
}
