size_menu = 4;
top_menu = new Array(size_menu);
for(i = 0 ; i < size_menu; i++)
        top_menu[i] = new Array(4);
top_menu[0]["name"] = "m1";
top_menu[0]["num"] = 1;
top_menu[0]["width"] = 142;
top_menu[0]["left"] = 20;
top_menu[0]["layer"] = "1";

top_menu[1]["name"] = "m2";
top_menu[1]["num"] = 3;
top_menu[1]["width"] = 141;
top_menu[1]["left"] = 163;
top_menu[1]["layer"] = "2";

top_menu[2]["name"] = "m3";
top_menu[2]["num"] = 4;
top_menu[2]["width"] = 172;
top_menu[2]["left"] = 475;
top_menu[2]["layer"] = "3";

top_menu[3]["name"] = "m4";
top_menu[3]["num"] = 5;
top_menu[3]["width"] = 123;
top_menu[3]["left"] = 647;
top_menu[3]["layer"] = "4";

for(i = 0 ; i < size_menu; i++)
        for(j = 0 ; j < top_menu[i]["num"]; j++)
                top_menu[i][j] = new Array(2);

top_menu[0][0]['name'] = "Крым, Сочи, Селигер";
top_menu[0][0]['url'] = "#";

top_menu[1][0]['name'] = "Информация агентствам";
top_menu[1][0]['url'] = "#";
top_menu[1][1]['name'] = "ВСЕ ПРАЙСЫ в zip";
top_menu[1][1]['url'] = "#";
top_menu[1][2]['name'] = "Новостная лента";
top_menu[1][2]['url'] = "#";

top_menu[2][0]['name'] = "Заказ тура";
top_menu[2][0]['url'] = "#";
top_menu[2][1]['name'] = "Визы в Россию";
top_menu[2][1]['url'] = "#";
top_menu[2][2]['name'] = "Полезная информация";
top_menu[2][2]['url'] = "#";
top_menu[2][3]['name'] = "Новостная лента";
top_menu[2][3]['url'] = "#";

top_menu[3][0]['name'] = "Наличие мест";
top_menu[3][0]['url'] = "#";
top_menu[3][1]['name'] = "Где купить";
top_menu[3][1]['url'] = "#";
top_menu[3][2]['name'] = "Информация по отправлению";
top_menu[3][2]['url'] = "#";
top_menu[3][3]['name'] = "Дельфин: Давайте знакомиться!";
top_menu[3][3]['url'] = "#";
top_menu[3][4]['name'] = "Вакансии";
top_menu[3][4]['url'] = "#";



function showMenu(optionName){
        aheight = 22;
//        valtop1 = 135;
        nw = 779;
        valleft1 = 0;
        if(document.body.clientWidth > nw)
                valleft1 += (document.body.clientWidth - nw) / 2;
        if (document.layers){
                document.eval(optionName).visibility = "visible";
//                document.eval(optionName).style.top = valtop1+"px";
                eval("document.eval('td_"+optionName+"').className = 'td_topmenu_a'");
        } else if (document.getElementById){
                 if(document.getElementById(optionName).offsetWidth < 110){
                    document.getElementById(optionName).width = 110;
                 }
                document.getElementById(optionName).style.visibility = "visible";
//                document.getElementById(optionName).style.top = valtop1+"px";
                eval("document.getElementById('td_"+optionName+"').className = 'td_topmenu_a'");
        }
}

function noShowMenu(optionName){
        if (document.layers){
//                for(i = 0 ; i < size_menu; i++)
//                        eval('document.'+top_menu[i]["name"]+'.visibility = "hidden";');
                document.eval(optionName).visibility = "hidden";
                eval("document.eval('td_"+optionName+"').className = 'td_topmenu'");
        } else if (document.getElementById){
//                for(i = 0 ; i < size_menu; i++)
//                        eval('document.getElementById("'+top_menu[i]["name"]+'").style.visibility = "hidden";');
                document.getElementById(optionName).style.visibility = "hidden";
                eval("document.getElementById('td_"+optionName+"').className = 'td_topmenu'");
        }
}

function td_on(optionName, StrRows){
	var strClass = "td_topmenu_a";	
	if( StrRows == 2) strClass = "td_topmenu2_a";
	
        if (document.layers){
                eval("document.eval('td_"+optionName+"').className = '"+strClass+"'");
        } else if (document.getElementById){
                eval("document.getElementById('td_"+optionName+"').className = '"+strClass+"'");
        }
}

function td_off(optionName, StrRows){
	var strClass = "td_topmenu";	
	if( StrRows == 2) strClass = "td_topmenu2";
	
		if (document.layers){
                eval("document.eval('td_"+optionName+"').className = '"+strClass+"'");
        } else if (document.getElementById){
                eval("document.getElementById('td_"+optionName+"').className = '"+strClass+"'");
        }
}

// переключение списка отелей по направлениям
function FillOptionsList(value) {
	size_o = document.form1.hotels.options.length;
//alert(size_o);

	for(var i = 1; i < size_o; i++)
		document.form1.hotels.options[1] = null;
	goods_names = eval("hotelName"+document.form1.country.options[document.form1.country.selectedIndex].value);
	goods_values =  eval("hotelValue"+document.form1.country.options[document.form1.country.selectedIndex].value); 

//alert("="+goods_names[0]+"="+goods_names.length);
//alert(goods_names.length+" == 1 && "+goods_names[0]);
	if(goods_names.length == 1 && !goods_names[0] ){display_div("CityHide","none"); return;}

	display_div("CityHide","block");

	goods_names_length = goods_names.length;

	for(i = 0; i < goods_names_length; i++) {
		n_option = new Option(goods_names[i], goods_values[i], false, false);
		document.form1.hotels.options[document.form1.hotels.options.length] = n_option;
	}
}

function display_div(id,mode) {
  var dv;
  if (document.getElementById) dv=document.getElementById(id);
  else if (document.all) dv=document.all(id);
  dv.style.display=mode;
}







/*

// preload inverted image
var img1 = new Image();
var img2 = new Image();
img1.src = "/images/bull2.gif";
img2.src = "/images/bull2_inv.gif";

function hiLight( obj ) {

	var i;
	for( i=0; i<obj.childNodes.length; i++ ){
		hiLight( obj.childNodes[i] );
	}
	if( obj.style ){
		obj.style['background']="#3FACC7";
		obj.style['color']="white";
	}
	if( obj.src ){
		obj.src=img2.src;
	}
	
}

function ihLight( obj ) {

	var i;
	for( i=0; i<obj.childNodes.length; i++ ){
		ihLight( obj.childNodes[i] );
	}
	if( obj.style ){
		obj.style['background']="";
		obj.style['color']="";
	}
	if( obj.src ){
		obj.src=img1.src;
	}
	
}

*/

