var path2menu=new Object();
function getLeftMenuByTitle(path,alter_path)
{
	var item=path2menu[path];
	if (item==null) item=path2menu[alter_path];
	var html="<table class=\"leftmenu\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tbody>";
	if (item) {
		if (item.parent) html+="<tr><th>"+item.parent.text+"</th></tr>";
		for (var i=0;i<item.titles.length;i++)
			if (item.titles[i].href)
				html+="<tr><td><a href=\""+item.titles[i].href+"\">"+item.titles[i].text+"</a></td></tr>";
	}
				 
	html+="</tbody></table>";
	return html;
}

function getMenuTree(rootMenu)
{
	var stack=new Array(),stack_heap=0;
	var branch=rootMenu,bi=0,branch_styles=[" class=\"rootBranch\""];
	var prefix,suffix;
	document.write("<ul class=\"sitemap\">\n");
	while (bi<branch._items.length) {
		prefix=suffix="";
		if (branch._items[bi].href!="#") {
			prefix="<a href=\""+branch._items[bi].href+"\">";
			suffix="</a>";
		}
		if (branch_styles[stack_heap]) document.write("<li><div"+branch_styles[stack_heap]+">"+prefix+branch._items[bi].text+suffix+"</div>");
		else document.write("<li><div>"+prefix+branch._items[bi].text+suffix+"</div>");
		if (branch._items[bi].child) {
			document.write("\n<ul>\n");
			stack[stack_heap]=[branch,bi+1];
			branch=branch._items[bi].child;
			stack_heap++;
			bi=0;
			continue;
		}
		document.write("</li>\n");
		bi++;
		if (bi==branch._items.length && stack_heap>0) {
			document.write("</ul>\n");
			stack_heap--;
			branch=stack[stack_heap][0];
			bi=stack[stack_heap][1];
		}
	}
	document.write("</ul>\n");
}


function go(href)
{
	window.location.href=href;
}

function MenuC(name,parent,type) {
	Menu.call(this,name,parent,type);
	this._render=this._renderOpacity;

	if (Browser.Engine.trident) {
		this.offsetObject={getOffsets: function() {
				offsets=new Object();
				offsets.x=0;
				offsets.y=0;
				return offsets;
			}};
		this.offsetObjectV={getOffsets: function() {
				offsets=new Object();
				offsets.x=0;
				offsets.y=-1;
				return offsets;
			}};
	}
	else if (Browser.Engine.gecko) {
		this.offsetObjectV={getOffsets: function() {
				offsets=new Object();
				offsets.x=0;
				offsets.y=-2;
				return offsets;
			}};
	}
/*	this.offsetObject={getOffsets: function() {
			var offsets=$("menu").getPosition();
			offsets.x=-offsets.x;
			offsets.y=-offsets.y;
			return offsets;
		}};
*/

	this.rememberPos=false;

	this.titles=new Array();

	this.loadMenu=function(items) {
		for (var i=0;i<items.length;i++) {
			if (!(items[i].href in path2menu)) path2menu[items[i].href]=this;
			this.titles[i]=new Object();
			this.titles[i].text=items[i].text=items[i].html;
			this.titles[i].href=items[i].href;

			var tmpstr="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"menuitem\"";
			if (items[i].href && items[i].href!="#") tmpstr+=" onclick=\"go('"+items[i].href+"');\"><tbody><tr>";
			else tmpstr+="><tbody><tr>";
			if (this.parent) tmpstr+="<td class=\"col1\">&nbsp;</td>";
			tmpstr+="<td class=\"col2\">"+items[i].html+"</td>";
			if (this.parent && items[i].child && this._type!="h") tmpstr+="<td class=\"col3\"><img src=\"/templates/ann/images/arrow_w.gif\" border=\"0\" /></td>";
			else tmpstr+="<td class=\"col3\">&nbsp;</td>";
			items[i].html=tmpstr+"</tr></tbody></table>";
		}
		this.rrItems(items);

		for (i=0;i<items.length;i++) this._items[i].text=items[i].text;
	};
}
MenuC.prototype=new Menu();
_dropdown_sindex=0;

var c_year=(new Date()).getFullYear();
var p_year=c_year+1;

/* Horizontal Crocus menu */
var menu0=new MenuC("menu0",null,"h");
menu0.props.timeouts.show=500;
menu0.props.timeouts.fade=500;
var menu00=new MenuC("menu00",null,"v");
var menu01=new MenuC("menu01",null,"v");
var menu02=new MenuC("menu02",null,"v");
var menu03=new MenuC("menu03",null,"v");
var menu07=new MenuC("menu07",null,"v");
var menu04=new MenuC("menu04",null,"v");
var menu05=new MenuC("menu05",null,"v");
var menu06=new MenuC("menu06",null,"v");
var menu001=new MenuC("menu001",null,"v");
var menu002=new MenuC("menu002",null,"v");
var menu003=new MenuC("menu003",null,"v");
var menu011=new MenuC("menu011",null,"v");
var menu012=new MenuC("menu012",null,"v");
var menu013=new MenuC("menu013",null,"v");
var menu014=new MenuC("menu014",null,"v");
var menu023=new MenuC("menu023",null,"v");
var menu030=new MenuC("menu030",null,"v");
var menu0120=new MenuC("menu0120",null,"v");
var menu0130=new MenuC("menu0130",null,"v");
var menu0140=new MenuC("menu0140",null,"v");

var i,items;

items=[];
/*items[0]={html:"Информация",child:menu00};*/
items[0]={html:"Выставочный центр",child:menu01};
items[1]={html:"Выставки",child:menu03};
items[2]={html:"Невыставочные мероприятия",child:menu07};
items[3]={html:"Услуги",child:menu04};
items[4]={html:"Крокус Конгресс Центр",child:menu02};
items[5]={html:"Пресс-клуб",child:menu05};
items[6]={html:"Контакты",child:menu06};
menu0.loadMenu(items);

items=[];
items[0]={html:"Строительство станции метро «Мякинино»",child:null,href:"/exhibitioncenter/subway/"};
items[1]={html:"О выставочном центре",child:null,href:"/exhibitioncenter/aboutcenter/"};
items[2]={html:"Первый павильон МВЦ «Крокус Экспо»",child:menu012,href:"/exhibitioncenter/first/"};
items[3]={html:"Второй павильон МВЦ «Крокус Экспо»",child:menu013,href:"/exhibitioncenter/second/"};
items[4]={html:"Третий павильон МВЦ «Крокус Экспо»",child:menu014,href:"/exhibitioncenter/third/"};
items[5]={html:"«Аквариум Отель»",child:null,href:"/exhibitioncenter/aquariumhotel/"};
items[6]={html:"О «Крокус Сити»",child:null,href:"/exhibitioncenter/aboutcity/"};
items[7]={html:"О выставочной деятельности<br />«Крокус Интернэшнл»",child:null,href:"/exhibitioncenter/aboutwork/"};
items[8]={html:"Основные требования<br />при проведении мероприятий<br />в МВЦ «Крокус Экспо»",child:null,href:"/exhibitioncenter/requirement/"};
items[9]={html:"Партнеры",child:null,href:"/contacts/partner/"};
items[10]={html:"Карта сайта",child:null,href:"/map/"};
items[11]={html:"Поиск",child:null,href:"/find/"};
menu01.loadMenu(items);

items=[];
items[0]={html:"Общая информация",child:null,href:"/congresscenter/about/"};
items[1]={html:"Первый павильон",child:null,href:"/congresscenter/pavilion1/"};
items[2]={html:"Второй павильон",child:null,href:"/congresscenter/pavilion2/"};
items[3]={html:"Третий павильон",child:menu023,href:"/congresscenter/pavilion3/"};
items[4]={html:"Дополнительные услуги",child:null,href:"/congresscenter/addservices/"};
items[5]={html:"Контакты",child:null,href:"/congresscenter/contacts/"};
menu02.loadMenu(items);

items=[];
items[0]={html:"План выставок",child:menu030,href:"/exhibition/"};
items[1]={html:"Собственные выставки",child:null,href:"/services/exhibition/"};
items[2]={html:"Новые проекты",child:null,href:"/exhibition/newprojects/"};
items[3]={html:"Организаторы",child:null,href:"/exhibition/org/"};
//items[4]={html:"Зрелищные мероприятия",child:null,href:"/exhibition/show/"};
//items[4]={html:"Фото галерея",child:null,href:"/photo/"};
items[4]={html:"Поиск выставок",child:null,href:"/find/exhibition/"};
menu03.loadMenu(items);

items=[];
items[0]={html:"Перечень услуг",child:null,href:"/services/common/"};
items[1]={html:"Аренда выставочных залов",child:null,href:"/services/renthall/"};
items[2]={html:"Аренда конференц-залов",child:null,href:"/services/rentconfhall/"};
items[3]={html:"Размещение в гостиницах",child:null,href:"/contacts/hotel/"};
items[4]={html:"Официальные экспедиторы",child:null,href:"/contacts/expeditors/"};
items[5]={html:"Аудиовизуальная техника и связь",child:null,href:"/services/audiovideo/"};
items[6]={html:"Предоставление транспортных средств<br />по заявкам клиента",child:null,href:"/services/common/freight/"};
items[7]={html:"Погрузочно-разгрузочные и такелажные работы",child:null,href:"/services/pograzgr/"};
items[8]={html:"Универсальные мультимедийные терминалы",child:null,href:"/services/multimediaterminal/"};
items[9]={html:"Услуги Департамента рекламы и информации",child:null,href:"/services/advertising/"};
items[10]={html:"Реклама на сайте",child:null,href:"/services/site/"};
menu04.loadMenu(items);

items=[];
items[0]={html:"О пресс-клубе",child:null,href:"/press/aboutclub/"};
items[1]={html:"Журнал «Бизнес и выставки»",child:null,href:"/press/magazine/"};
items[2]={html:"Порядок аккредитации",child:null,href:"/press/akkr/"};
items[3]={html:"Заявка на постоянную аккредитацию",child:null,href:"/press/accreditation/"};
items[4]={html:"Мероприятия",child:null,href:"/press/actions/"};
items[5]={html:"Публикации",child:null,href:"/press/publication/"};
items[6]={html:"Пресс-релизы",child:null,href:"/press/release/"};
items[7]={html:"Архив новостей",child:null,href:"/news/"};
items[8]={html:"Информационные партнеры",child:null,href:"/contacts/infopartner/"};
items[9]={html:"Контакты",child:null,href:"/contacts/"};
menu05.loadMenu(items);

items=[];
items[0]={html:"Общая информация",child:null,href:"/contacts/common/"};
items[1]={html:"Департамент организации выставок",child:null,href:"/contacts/exhibition/"};
items[2]={html:"Схема территории",child:null,href:"/exhibitioncenter/territorymap/"};
items[3]={html:"Вакансии",child:null,href:"/contacts/vacancy/"};
items[4]={html:"Проезд",child:null,href:"/contacts/passage/"};
items[5]={html:"Задать вопрос",child:null,href:"/question/"};
menu06.loadMenu(items);

items=[];
items[0]={html:"Организация и проведение мероприятий",child:null,href:"/non_exh/opm/"};
items[1]={html:"Аренда выставочных залов",child:null,href:"/non_exh/arvystzal/"};
items[2]={html:"Аренда конференц-залов",child:null,href:"/non_exh/arconfzal/"};
items[3]={html:"Аренда открытой территории",child:null,href:"/non_exh/openterr/"};
items[4]={html:"Контакты",child:null,href:"/non_exh/contacts/"};
menu07.loadMenu(items);

items=[];
items[0]={html:"Выставочные залы",child:menu0120,href:"/exhibitioncenter/first/hall/"};
items[1]={html:"Конференц-залы",child:null,href:"/exhibitioncenter/first/confhall/"};
items[2]={html:"Регистрационный зал",child:null,href:"/exhibitioncenter/first/lobby/"};
items[3]={html:"Рестораны",child:null,href:"/exhibitioncenter/first/restaurant/"};
menu012.loadMenu(items);

items=[];
items[0]={html:"Выставочные залы",child:menu0130,href:"/exhibitioncenter/second/hall/"};
items[1]={html:"Конференц-залы",child:null,href:"/exhibitioncenter/second/confhall/"};
items[2]={html:"Регистрационный зал",child:null,href:"/exhibitioncenter/second/lobby/"};
items[3]={html:"Рестораны",child:null,href:"/exhibitioncenter/second/restaurant/"};
menu013.loadMenu(items);

items=[];
items[0]={html:"Выставочные залы",child:menu0140,href:"/exhibitioncenter/third/hall/"};
items[1]={html:"Конференц-залы",child:null,href:"/exhibitioncenter/third/confhall/"};
items[2]={html:"Крокус Сити Холл",child:null,href:"/exhibitioncenter/third/cityhall/"};
items[3]={html:"Регистрационный зал",child:null,href:"/exhibitioncenter/third/lobby/"};
items[4]={html:"«Аквариум Отель»",child:null,href:"/exhibitioncenter/aquariumhotel/"};
items[5]={html:"Рестораны",child:null,href:"/exhibitioncenter/third/restaurant/"};
menu014.loadMenu(items);

items=[];
items[0]={html:"Крокус Сити Холл",child:null,href:"/congresscenter/pavilion3/crocuscityhall/"};
items[1]={html:"Конференц-залы",child:null,href:"/congresscenter/pavilion3/confhalls/"};
menu023.loadMenu(items);

items=[];
items[0]={html:c_year+" год - план выставок",child:null,href:"/exhibition/plan/"+c_year};
items[1]={html:p_year+" год - план выставок",child:null,href:"/exhibition/plan/"+p_year};
/*
items[2]={html:"2007 год - план выставок",child:null,href:"/exhibition/?year=2007&allexhibition=yes"};
items[3]={html:"2006 год - план выставок",child:null,href:"/exhibition/?year=2006&allexhibition=yes"};
items[4]={html:"2005 год - план выставок",child:null,href:"/exhibition/?year=2005&allexhibition=yes"};
items[5]={html:"2004 год - план выставок",child:null,href:"/exhibition/?year=2004&allexhibition=yes"};
items[6]={html:"2010 год - план выставок",child:null,href:"/exhibition/plan/2010/"};
*/
menu030.loadMenu(items);


items=[];
items[0]={html:"Выставочный зал №1",child:null,href:"/exhibitioncenter/first/hall/1/"};
items[1]={html:"Выставочный зал №2",child:null,href:"/exhibitioncenter/first/hall/2/"};
items[2]={html:"Выставочный зал №3",child:null,href:"/exhibitioncenter/first/hall/3/"};
items[3]={html:"Выставочный зал №4",child:null,href:"/exhibitioncenter/first/hall/4/"};
menu0120.loadMenu(items);

items=[];
items[0]={html:"Выставочный зал №5",child:null,href:"/exhibitioncenter/second/hall/5/"};
items[1]={html:"Выставочный зал №6",child:null,href:"/exhibitioncenter/second/hall/6/"};
items[2]={html:"Выставочный зал №7",child:null,href:"/exhibitioncenter/second/hall/7/"};
items[3]={html:"Выставочный зал №8",child:null,href:"/exhibitioncenter/second/hall/8/"};
items[4]={html:"Выставочный зал №9",child:null,href:"/exhibitioncenter/second/hall/9/"};
items[5]={html:"Выставочный зал №10",child:null,href:"/exhibitioncenter/second/hall/10/"};
items[6]={html:"Выставочный зал №11",child:null,href:"/exhibitioncenter/second/hall/11/"};
menu0130.loadMenu(items);

items=[];
items[0]={html:"Выставочный зал №12",child:null,href:"/exhibitioncenter/third/hall/12/"};
items[1]={html:"Выставочный зал №13",child:null,href:"/exhibitioncenter/third/hall/13/"};
items[2]={html:"Выставочный зал №14",child:null,href:"/exhibitioncenter/third/hall/14/"};
items[3]={html:"Выставочный зал №15",child:null,href:"/exhibitioncenter/third/hall/15/"};
items[4]={html:"Выставочный зал №16",child:null,href:"/exhibitioncenter/third/hall/16/"};
items[5]={html:"Выставочный зал №17",child:null,href:"/exhibitioncenter/third/hall/17/"};
items[6]={html:"Выставочный зал №18",child:null,href:"/exhibitioncenter/third/hall/18/"};
items[7]={html:"Выставочный зал №19",child:null,href:"/exhibitioncenter/third/hall/19/"};
items[8]={html:"Выставочный зал №20",child:null,href:"/exhibitioncenter/third/hall/20/"};
menu0140.loadMenu(items);
/* Horizontal Crocus menu */


/* Vertical Crocus menu */
var hmenu0=new MenuC("hmenu0",null,"v");
hmenu0.props.timeouts.show=500;
hmenu0.props.timeouts.fade=500;
var hmenu00=new MenuC("hmenu00",null,"v");
var hmenu01=new MenuC("hmenu01",null,"v");
var hmenu02=new MenuC("hmenu02",null,"v");

items=[];
items[0]={html:"Информация для устроителей",child:hmenu00};
items[1]={html:"Информация для участников",child:hmenu01};
items[2]={html:"Информация для посетителей",child:hmenu02};
hmenu0.loadMenu(items);

items=[];
items[0]={html:"Аренда выставочных залов",child:null,href:"/services/renthall/"};
items[1]={html:"Аренда конференц-залов",child:null,href:"/services/rentconfhall/"};
items[2]={html:"Услуги",child:null,href:"/services/common/"};
items[3]={html:"Контакты",child:null,href:"/contacts/common/"};
items[4]={html:"«Аквариум Отель»",child:null,href:"/exhibitioncenter/aquariumhotel/"};
items[5]={html:"Основные требования<br />при проведении мероприятий<br />в МВЦ «Крокус Экспо»",child:null,href:"/exhibitioncenter/requirement/"};
hmenu00.loadMenu(items);

items=[];
items[0]={html:"Выставки МВЦ «Крокус Экспо»",child:null,href:"/exhibition/own/?exhyear="+c_year};
items[1]={html:"Аренда конференц-залов",child:null,href:"/services/rentconfhall/"};
items[2]={html:"Услуги Департамента рекламы и информации",child:null,href:"/services/advertising/"};
items[3]={html:"«Аквариум Отель»",child:null,href:"/exhibitioncenter/aquariumhotel/"};
items[4]={html:"Основные требования<br />при проведении мероприятий<br />в МВЦ «Крокус Экспо»",child:null,href:"/exhibitioncenter/requirement/"};
hmenu01.loadMenu(items);

items=[];
items[0]={html:"План выставок "+c_year,child:null,href:"/exhibition/plan/"+c_year};
items[1]={html:"Размещение в гостиницах",child:null,href:"/contacts/hotel/"};
items[2]={html:"Кайтеринг в МВЦ «Крокус Экспо»",child:null,href:"/exhibitioncenter/catering/"};
items[3]={html:"«Аквариум Отель»",child:null,href:"/exhibitioncenter/aquariumhotel/"};
items[4]={html:"Стоимость билетов, каталогов<br /> и время работы выставок",child:null,href:"/ticket/"};
items[5]={html:"Проезд городским транспортом,<br /> на автомобиле",child:null,href:"/contacts/passage/"};
items[6]={html:"Бесплатные автобусы «Крокус Экспо»",child:null,href:"/bus/"};
hmenu02.loadMenu(items);

/* Vertical Crocus menu */
