$(document).ready(function(){
// middle normal height
	$("#middle").each(function(){
		var thisHeight = $(this).height();
		$(".m-head",this).height(thisHeight-421);
	});
});
$(function(){
	// Set starting slide to 1
	var startSlide = 1;
	// Get slide number if it exists
	if (window.location.hash) {
		startSlide = window.location.hash.replace('#','');
	}
	// Initialize Slides
	$('#slides').slides({
		preload: false,
		preloadImage: 'images/loading.gif',
		generatePagination: false,
		play: 5000,
		pause: 2500,
		hoverPause: true,
		// Get the starting slide
		start: startSlide,
		animationComplete: function(current){
			// Set the slide number as a hash
			window.location.hash = '#' + current;
		}
	});
});
function Numbers(e)
{
var keynum;
var keychar;
var numcheck;

if(window.event) // IE
{
keynum = e.keyCode;
}
else if(e.which) // Netscape/Firefox/Opera
{
keynum = e.which;
}
keychar = String.fromCharCode(keynum);
numcheck = /\d/;
return numcheck.test(keychar)|| keynum<32;
}

function cursor_blur() {
if (($(".cols-input").val()=="")||($(".cols-input").val()==0)) {
$(".cols-input").val(1);
}
}
function select1() {
var a = $(".cols-input").val();
a++;
$(".cols-input").val(a);
}
function select2() {
var a = $(".cols-input").val();
if(a>1) {
a--;
$(".cols-input").val(a);
}

}

		$(document).ready(function() {$('.openclose').click(function() {
			if ( jQuery.browser.msie && parseInt(jQuery.browser.version) == 6) {
			if ($('.full').css("display")=="block") {$('.full').css("display", "none");
			} else {$('.full').css("display", "block");
			}
			} else {$('.full').toggle("slow");
			}
			if ($('.openclose').text()=='читать полностью') {$('.openclose').text('свернуть');
			} else {$('.openclose').text('читать полностью');
			}
			});
		});

