	GLOBALS = {};
	GLOBALS.move_up = GLOBALS.move_down = false;
	GLOBALS.image_count = GLOBALS.selected_image = 0;

	function showBigImage(id)
	{
		if (GLOBALS.selected_image == 0) {
			return;
		}

		$('image_' + GLOBALS.selected_image).className = '';
		GLOBALS.selected_image = id;
		$('image_' + GLOBALS.selected_image).className = 'selected';

		$('big_image_tag').src = GLOBALS.image[id];
		$('image_title').innerHTML = GLOBALS.image_title[id];
	}

	function moveThumbs()
	{
		var step = 3;

		if (GLOBALS.move_down && (parseInt($('thumb_box').style.top) < 0)) {
			$('thumb_box').style.top = (parseInt($('thumb_box').style.top) + step) + 'px';
		}
		if (GLOBALS.move_up && (parseInt($('thumb_box').style.top) > (260 - (GLOBALS.image_count * 100)))) {
			$('thumb_box').style.top = (parseInt($('thumb_box').style.top) - step) + 'px';
		}
	}
	setInterval('moveThumbs();', 30);
/*
	function $(name)
	{
		return document.getElementById(name);
	}
*/
	function showCatImage(dir, big)
	{
		var html = '';

		html += '' +
				'<table cellspacing="0" cellpadding="0" width="" border="0" align="center">' +
					'<tr>' +
						'<td class="cat_big_image_frame">' +
							'<img src="' + dir + big + '" />' +
							'<br />' +
							'<br />' +
							'<a href="#" onclick="$(\'cat_big_image_box\').style.display = \'none\'; return false;">закрыть</a>' +
						'</td>' +
					'</tr>' +
				'</table>';

		$('cat_big_image_box').style.display = 'block';

		if (document.documentElement) {
			var top = parseInt(document.documentElement.scrollTop) + 200;
		} else {
			var top = parseInt(document.body.scrollTop) + 200;
		}
		$('cat_big_image_box').style.top = top + 'px';

		$('cat_big_image_box').innerHTML = html;
	}

	function getStageSize(str)
	{
		var x,y;
		if (self.innerHeight) {
			x = self.innerWidth;
			y = self.innerHeight;
		} else if (document.documentElement && document.documentElement.clientHeight) {
			x = document.documentElement.clientWidth;
			y = document.documentElement.clientHeight;
		} else if (document.body) {
			x = document.body.clientWidth;
			y = document.body.clientHeight;
		}
		if (str == 'x') {
			return parseInt(x);
		} else if (str == 'y') {
			return parseInt(y);
		} else {
			return [parseInt(x), parseInt(y)];
		}
	}

	function var_dump(obj, level)
	{
		var out = '';
		var space = '';
		var under;
		if (typeof(level) == typeof(under)) {
			level = 1;
		}
		for (var i = 0; i < level; i++) {
			space += ' ';
		}

		for (var id in obj) {
			if (typeof obj[id] == 'object') {
				out += space + 'OBJECT "' + id + '"' + " \n " + var_dump(obj[id], ++level) + "";
			} else {
				out += space + id + ' = ' + obj[id] + "\n";
			}
		}

		return out + "\n";
	}
awp="";
sg_js="1.0";
sg_r=""+Math.random()+"&r="+escape(document.referrer)+"&pg="+escape(window.location.href);
document.cookie="sg=1; path=/";
sg_r+="&c="+(document.cookie?"1":"0");
if (self!=top) {fr=1;} else {fr=0;}
sg_r+="&fr="+fr;
mt=(new Date()).getTimezoneOffset();
sg_r+="&mt="+mt;



nn4 = (document.layers)? true : false;
ie4 = (document.all)? true : false;
nn6 = (document.getElementById && !ie4)? true : false;
function new_wind(cardName, winW, winH, winTitle) {
if (nn4 || ie4 || nn6) {
posX = Math.round((screen.width - winW) / 2);
posY = Math.round((screen.height - winH) / 2);
posCode = (nn4 || nn6)? 'screenX='+posX+',screenY='+posY : 'left='+posX+',top='+posY;
} else { posCode = ''; }
cardWindow = window.open('','_blank','menubar=no,toolbar=no,scrollbars=no,status=yes,width='+winW+',height='+winH+','+posCode);
cardWindow.document.open();
cardWindow.document.write('<html><head><title>'+winTitle+'<\/title><\/head>');
cardWindow.document.write('<body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0>');
cardWindow.document.write('<img src="'+cardName+'" width="'+winW+'" height="'+winH+'" /><\/body><\/html>');
cardWindow.document.close();
cardWindow.focus();
}