
function menuItem(name,href){
	this.name = name;
	this.href = href;
}

function drawMenu( menuSource,menuParentId ){
	if( menuSource!=null && menuSource.length!=0 && menuParentId!=null ){
	
		document.all[menuParentId].onmouseover = OnOver;
		document.all[menuParentId].onmouseout  = OnOut;
	
		content  = '<div id="'+menuSource["name"]+'" style="position:absolute;visibility:hidden;">';
		content += '<table cellpadding="0" cellspacing="0" bgcolor="'+menuSettings["background"]+'" style="position:relative;z-index:101;top:3;left:-6;padding:1 22 2 5;border:solid '+menuSettings["border-color"]+' 1px;border-top:none;cursor:hand;">';
		
		for(i=0;i<menuSource.length;i++){
			content += '<tr><td';
			content += ' onmouseover="JavaScript:this.style.background = \''+menuSettings["background-over"]+'\';"';
			content += ' onmouseout ="JavaScript:this.style.background = \'none\';"';
			content += ' onclick ="JavaScript:window.location = \''+menuSource[i].href+'\';"';
			content += '>';
			content += menuSource[i].name;
			content += '</td></tr>';
		}
		content += '</table></div>';
		document.write(content);
	}
}

function OnOver(){
	this.style.background = menuSettings["background"];
	document.all[ menuId[this.id] ].style.visibility='visible';
}

function OnOut(){
	this.style.background = 'none';
	document.all[ menuId[this.id] ].style.visibility='hidden';
}

menuId = new Array();
menuSettings = new Array();
menuItems = new Array();

menuSettings["background"] = "#FDF5E6";
menuSettings["background-over"] = "#4682B4";
menuSettings["border-color"] = "#00FF7F";

menuId["td_menu_products"] = "products";
menuId["td_menu_dealers"]  = "dealers";


/* 

! Заменить 'www.amkodor.by' на 'www.amkodor.by'

*/

menuItems["products"] = new Array();
menuItems["products"]["name"] = "products";
menuItems["products"][0] = new menuItem("Новинки","http://www.amkodor.by/news/newproducts.shtml");
menuItems["products"][1] = new menuItem("Вся&nbsp;продукция","http://www.amkodor.by/products/index.shtml");
menuItems["products"][2] = new menuItem("Погрузчики&nbsp;Фронтальные&nbsp;одноковшовые","http://www.amkodor.by/products/categ_01.shtml");
menuItems["products"][3] = new menuItem("Погрузчики&nbsp;Универсальные","http://www.amkodor.by/products/categ_02.shtml");
menuItems["products"][4] = new menuItem("Машины&nbsp;Погрузочные&nbsp;Универсальные","http://www.amkodor.by/products/categ_03.shtml");
menuItems["products"][5] = new menuItem("Специальные&nbsp;Погрузчики","http://www.amkodor.by/products/categ_04.shtml");
menuItems["products"][6] = new menuItem("Машины&nbsp;на&nbsp;базе&nbsp;тракторов&nbsp;МТЗ","http://www.amkodor.by/products/categ_05.shtml");
menuItems["products"][7] = new menuItem("Катки&nbsp;дорожные","http://www.amkodor.by/products/categ_06.shtml");
menuItems["products"][8] = new menuItem("Снегоочистители&nbsp;и&nbsp;Машины&nbsp;Аэродромные&nbsp;Уборочные","http://www.amkodor.by/products/categ_07.shtml");
menuItems["products"][9] = new menuItem("Машины&nbsp;Лесопромышленного&nbsp;Комплекса","http://www.amkodor.by/products/categ_08.shtml");
menuItems["products"][10] = new menuItem("Другая&nbsp;Продукция","http://www.amkodor.by/products/categ_09.shtml");
menuItems["products"][11] = new menuItem("Оборудование,&nbsp;Неликвидные&nbsp;Комплектующие&nbsp;и&nbsp;Инструмент&nbsp;на&nbsp;продажу","http://www.amkodor.by/products/nelikvid.html");

menuItems["dealers"] = new Array();
menuItems["dealers"]["name"] = "dealers";
menuItems["dealers"][0] = new menuItem("Дистрибьюторы&nbsp;ОАО&nbsp;&laquo;Амкодор&raquo;","http://www.amkodor.by/dealers/distributors.shtml");
menuItems["dealers"][1] = new menuItem("Дилеры&nbsp;в&nbsp;Российской&nbsp;Федерации","http://www.amkodor.by/dealers/index.shtml");
menuItems["dealers"][2] = new menuItem("Карта&nbsp;дилерской&nbsp;сети&nbsp;в&nbsp;РФ","http://www.amkodor.by/dealers/map.shtml");
menuItems["dealers"][3] = new menuItem("Страны&nbsp;СНГ&nbsp;и&nbsp;дальнее&nbsp;зарубежье","http://www.amkodor.by/dealers/cis.shtml");
menuItems["dealers"][4] = new menuItem("Компании-партнеры","http://www.amkodor.by/dealers/partners.shtml");
menuItems["dealers"][5] = new menuItem("Дилеры по реализации МЛПК","http://www.amkodor.by/dealers/mlpk.shtml");




