// JavaScript Document

function shBlock() {
	if ($('div#auto').css("display") == "block") {
		$('div#auto').fadeOut(3000);
		setTimeout('$(\'div#track\').fadeIn(3000)', 2000);
		}
	else {
		$('div#track').fadeOut(3000);
		setTimeout('$(\'div#auto\').fadeIn(3000)', 2000);
		}
	}

function Search3(inp_id) {
	if((document.getElementById(inp_id).value=='поиск') || document.getElementById(inp_id).value=='' || document.getElementById(inp_id).value.length < 3) {
		alert('Строка поиска не должна быть короче 3 символов.'); 
		return false;
		}
	}

function Sblock(idblock) {
	var sblock = document.getElementById(idblock);
	sblock.style.display = 'block';
	}

function zoom(i, t , w, h, wn) {
        var width = w;
        var height = h;
        var html = '';
        var params = 'left=' + ((screen.width - width) / 2) + ',top=' + ((screen.height - height - 50) / 2) + ',width=' + (width+41) + 'px,height=' + (height + 50) + 'px,scrollbars=no';
        html  = '<title>Увеличение</title><body title="закрыть" onclick="self.close()" style="cursor:pointer" leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>';
        html += '<table width=100% height=100%><tr><td align=center valign=center>';
        html += '<img src="' + i + '" width="'+width+'" height="'+height+'">';
        html += '</td><tr></table>';
        var z_w = window.open('about:blank', wn, params);
        z_w.document.write(html);
        z_w.document.close();
        z_w.focus();
}


