			function albig(div, func, w) {
				if (parseInt(w) > 0) w = parseInt(w)+'px';
				else w = '80%';
				
				text = '<div class="innerBlock" style="width:'+w+'">'+$(div).html()+'<br /><br /><span class="starrequired">*</span> Чтобы вернуться к сайту, кликните вовне этого блока</div>';

				$.blockUI({
					message: text,
					fadeIn: 700,
					fadeOut: 700,
					showOverlay: true,
					centerY: true,
					overlayCSS:{backgroundColor:'#B9DB7E'},
					css: {
						top: '20px',
						left: '7%',
						widht: '80%',
						margin: 'auto',
						border: '0',
						padding: '15px 40px',
						backgroundColor: '#fff',
						'-webkit-border-radius': '10px',
						'-moz-border-radius': '10px',
						opacity: 1,
						align: 'left',
						color: '#000'
					} 
				});
				if (func == 'sort') sortab();
				$('.blockOverlay').attr('title','Кликните, чтобы закрыть').click(function() {$.unblockUI({ 
						onUnblock: function(){} 
					})});
				$('.blockMsg').css('text-align','left');
			}
			function al(text) {
				
				$.blockUI({
					message: text,
					fadeIn: 700,
					fadeOut: 700,
					showOverlay: true,
					overlayCSS:{backgroundColor:'#B9DB7E'},
					css: {
						left: '7%',
						widht: '300px',
						margin: 'auto',
						border: '0',
						padding: '15px 40px',
						backgroundColor: '#fff',
						'-webkit-border-radius': '10px',
						'-moz-border-radius': '10px',
						opacity: 1,
						align: 'left',
						color: '#000'
					} 
				});
				$('.blockOverlay').attr('title','Кликните, чтобы закрыть').click(function() {$.unblockUI({ 
						onUnblock: function(){} 
					})});
				$('.blockMsg').css('text-align','left');
				setTimeout($.unblockUI, 4000); 
			}
		function sortab() {
			$(".blockUI .sortblock").sortable({
				connectWith: ".sortblock",
				tolerance: "pointer",
				cursor: "pointer",
				dropOnEmpty: true,
				placeholder: 'place',
				opacity: 0.8
			});
		}
function  getPageSize(){
			var xScroll, yScroll;
			if (window.innerHeight && window.scrollMaxY) {
				xScroll = document.body.scrollWidth;
				yScroll = window.innerHeight + window.scrollMaxY;
			} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
				xScroll = document.body.scrollWidth;
				yScroll = document.body.scrollHeight;
			} else if (document.documentElement && document.documentElement.scrollHeight > document.documentElement.offsetHeight){ // Explorer 6 strict mode
				xScroll = document.documentElement.scrollWidth;
				yScroll = document.documentElement.scrollHeight;
			} else { // Explorer Mac...would also work in Mozilla and Safari
				xScroll = document.body.offsetWidth;
				yScroll = document.body.offsetHeight;
			}

			var windowWidth, windowHeight;
			if (self.innerHeight) { // all except Explorer
				windowWidth = self.innerWidth;
				windowHeight = self.innerHeight;
			} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
				windowWidth = document.documentElement.clientWidth;
				windowHeight = document.documentElement.clientHeight;
			} else if (document.body) { // other Explorers
				windowWidth = document.body.clientWidth;
				windowHeight = document.body.clientHeight;
			}

			// for small pages with total height less then height of the viewport
			if(yScroll < windowHeight){
				pageHeight = windowHeight;
			} else {
				pageHeight = yScroll;
			}

			// for small pages with total width less then width of the viewport
			if(xScroll < windowWidth){
				pageWidth = windowWidth;
			} else {
				pageWidth = xScroll;
			}

			return [pageWidth,pageHeight,windowWidth,windowHeight];
		}
		function equalHeight(group) {
			tallest = 0;
			group.each(function() {
				thisHeight = $(this).height();
				if(thisHeight > tallest) {
					tallest = thisHeight;
				}
			});
			group.height(tallest);
		}
