		//
		// Системная поебень
		function $(path)
		{
			return document.getElementById(path);
		}

		//
		//
		// Изменение урла в адресной строке
		function f_urlmod(direct)
		{
			if (!f_anchors[direct])
			{
				f_anchors[direct] = true;
				$("f_dump").innerHTML += '<a href="#" name="' + direct + '">' + direct + '</a>';
			}
			location.hash = direct;
			f_location = location.hash;
		}

		//
		// Код флэшки
		function f_swf(swf, width, height, flashvars)
		{
			var html = '';

			html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="' + width + '" height="' + height + '">';
			html += '<param name="allowScriptAccess" value="sameDomain" />';
			html += '<param name="allowFullScreen" value="true" />';
			html += '<param name="movie" value="' + swf + '" />';
			html += '<param name="quality" value="high" />';
			html += '<param name="bgcolor" value="#eaeaea" />';
			html += '<param name="wmode" value="transparent">';
			html += '<param name="flashvars" value="' + flashvars + '" />';
			html += '<embed src="' + swf + '" quality="high" wmode="transparent" bgcolor="#eaeaea" width="' + width + '" height="' + height + '" name="portfolio" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />';
			html += '</object>';

			return html;
		}

		//
		// Выгружаем объект
		function f_unload()
		{
			$('f_index').style.height = '100%';
			$('f_index_swf').style.height = '100%';
			$('f_content1').innerHTML = '';
			$('f_content1').style.display = 'none';
			$('f_content2').innerHTML = '';
			$('f_content2').style.display = 'none';
		}

		//
		// Инициализация загрузки
		function f_load(url, width, height, type, direct)
		{
//			f_urlmod(direct);

			$('f_content1').innerHTML = '';
			$('f_content2').innerHTML = '';
			$('f_content1').style.display = 'none';
			$('f_content2').style.display = 'none';

			$('f_index').style.height = '100px';
			$('f_index_swf').style.height = '100px';

			if(type == 'flv'){
				f_draw_movie(url + 'image.flv', url + 'thumb.jpg', width, height);
			}else if(type == 'image'){
				f_draw_image(url, width, height);
			}else{
				f_draw_object(url, width, height);
			}
		}

		//
		// Видео
		function f_draw_movie(url, thumb, width, height)
		{
			var flashvars = 'f_movie=' + url + '&f_thumb=' + thumb;
			var player = 'public/_players/video_player.swf?' + flashvars;

			$('f_content1').style.width = width + 'px';
			$('f_content1').style.height = height + 'px';
			$('f_content1').style.display = 'block';
			$('f_content1').innerHTML = f_swf(player, width, height, flashvars);
		}

		//
		// Картинка
		function f_draw_image(url, width, height)
		{
			var flashvars = 'f_movie=' + url + '&f_width=' + width + '&f_height=' + height;
			var player = 'public/_players/image_player.swf?' + flashvars;

			$('f_content2').style.width = "100%";
			$('f_content2').style.height = "100%";
			$('f_content2').style.display = 'block';
			$('f_content2').innerHTML = f_swf(player, "100%", "100%", flashvars);
		}

		//
		// Флэшка
		function f_draw_object(url, width, height)
		{

			// Список исключений
			var list = new Array();
			list['public/_sections/type2/02/image.swf'] = '#000000';
			list['public/_sections/type2/04/image.swf'] = '#FFFFFF';

			// Если нужен особый фон
			if(list[url]){
				$('f_parent1').innerHTML = "<div id='f_content1' style='margin-left: 30px; background: " + list[url] + "'></div>";
			}else{
				$('f_parent1').innerHTML = "<div id='f_content1' class='f_content01'></div>";
			}

			$('f_content1').style.width = width + 'px';
			$('f_content1').style.height = height + 'px';
			$('f_content1').style.display = 'block';
			$('f_content1').innerHTML = f_swf(url, width, height, '');
		}