var lastm='';
function hide()
{
	if(lastm=="")
		return true;
	document.all[lastm].style.display="none";
	lastm="";
}
function clcTop(id)
{
	var obj=document.all[id];
	var y=0;
	while(obj.offsetParent != null)
	{
		y+=obj.offsetTop;
		obj=obj.offsetParent;
	}
	y+=obj.offsetTop;
	return y;
}
function clcLeft(id)
{
	var obj=document.all[id];
	var y=0;
	while( obj.offsetParent != null)
	{
		y+=obj.offsetLeft;
		obj=obj.offsetParent;
	}
	y+=obj.offsetLeft;
	return y;
}
function shm(n)
{
	id="mn"+n;
	id2="tmn"+n;
	if(id==lastm)
		return true;
	h=document.all[id2].offsetHeight;
	l=clcLeft(id2);
	t=clcTop(id2)
	hide();
	lastm=id;
	if(document.all[lastm])
	{
		with(document.all[lastm].style)
		{
			display="";
			left=l;
			top=t+h;
		}
	}
	else
		alert("lastm='"+lastm+"'\nn="+n);
}
function cmi(n,h,t,t2)
{
	if(n!=0)
		return "<td class=tdm id=tmn"+n+"><a title=\""+t2+"\" href=\""+h+"\" class=am onmouseover=\"shm("+n+")\" onmouseout=\"hide();\">"+t+"</a></td>";
	else
		return "<td class=tdm><a title=\""+t2+"\" href=\""+h+"\" class=am>"+t+"</a></td>";
}
function csm(n)
{
	var tmp="<div id=mn"+n+" class=sbmn style=\"z-index:99;display:none;position:absolute;top:0px;left=0px;width:150px\" onmouseover=\"shm("+n+")\" onmouseout=\"hide();\"><table width=100%>";
	for(var i=1;i<arguments.length;i+=3)
		tmp+="<tr><td><a title=\""+arguments[i+2]+"\" href=\""+arguments[i]+"\" onmouseover=\"shm("+n+")\" onmouseout=\"hide();\">"+arguments[i+1]+"</a></td></tr>";
	tmp+="</table></div>";
	return tmp;
}
function getsm()
{
	var tmp=csm(1,
"./","Главная","Стартовая страница",

"sert.php","Сертификаты","",
"award.php","Награды","",

"contacts.php","Контакты","Контактная информация",
"rekv.php","Реквизиты","Реквизиты предприятия"

);
tmp+=csm(2,
"main.php","Техника ОрТЗ","Основные направления деятельности предприятия");
tmp+=csm(5,
//"liz.php","Лизинг","Регламентирующии документы",
"credit.php","Кредит","Целевая программа",
"info1.php","Официальная","Информация из официальных источников");

tmp+=csm(9,
"promote.htm","Повысить ИЦ","Как повысить Индекс Цитирования сайта и получить дополнительно посетителей на свой сайт",
"addlink.php","Добавить ссылку","Добавление Вашей ссылки нам на сайт!",
"links.php","Партнеры","Ссылки на друзей и партнеров",
"linksother.php","Разное","Ссылки разной тематики",
// "http://www.ecoplastsnab.ru/","Окна Ecoplast","Окна Ecoplast - Оконные технологии",
// "http://www.alc.ru/","Аллюминевая компания","Аллюминий",
"http://www.google.com/","Google","Поисковая система",
"http://www.yandex.ru/","Яndex","Поисковая система",
"http://www.rambler.ru/","Rambler","Поисковая система",
"http://www.mail.ru/","Mail.ru","Интернет-портал",
"http://www.gismeteo.ru/weather/towns/27906.htm","Погода","Погода в г. Орле",
"http://www.rbc.ru/","Курсы валют","РосБизнесКонсалтинг");
return tmp;
}
function getmm()
{
var tmp=cmi(1,"./","О нас","Информация о нашем предприятии");
//tmp+=cmi(2,"main.php","Продукция","Наша продукция");
//tmp+=cmi(0,"sh.php","Техника б/у","Предложения по технике бывшей в употреблени");
//tmp+=cmi(0,"ask.php","Потребности","Мы заинтересованы в приобретении данной продукции");
tmp+=cmi(0,"main.php","Продукция","Основные направления деятельности предприятия");
tmp+=cmi(0,"cost.php","Цены","Цены");
//tmp+=cmi(0,"history.php","История","История развития ЗАО ТРАКТОРМАШ");
//tmp+=cmi(0,"main3.php","Бульдозерное оборудование <font color=red><B>NEW!</B></font>","Основные направления деятельности предприятия");
//tmp+=cmi(0,"ct.php","Каталог продукции","Иллюстрированый каталог техники");
//tmp+=cmi(0,"srv.php","Услуги","Перечень услуг");
tmp+=cmi(5,"javascript:void()","Информация","");
//tmp+=cmi(4,"board.php","Объявления","Доска объявлений");
tmp+=cmi(9,"javascript:void()","Ссылки","Полезные и интересные ссылки");
return tmp;
}
function getcd()
{
	var current = new Date();
	var intDate;
	var intmonth;
	var intyear; 
	var intTime;
	var intHour;
	var intMin;
	var intSec;
	var intDay;

	var months=new Array(13);
	months[1]="Января";
	months[2]="Февраля";
	months[3]="Марта";
	months[4]="Апреля";
	months[5]="Мая";
	months[6]="Июня";
	months[7]="Июля";
	months[8]="Августа";
	months[9]="Сентября";
	months[10]="Октября";
	months[11]="Ноября";
	months[12]="Декабря";

	intDate = current.getDate();
	intMonth = months[current.getMonth() + 1]
	intYear = current.getYear();
	intTime = current.getTime();
	intHour = current.getHours();
	intMin = current.getMinutes();
	intSec = current.getSeconds();
	if ((document.layers && parseFloat(navigator.appVersion) != 4.05) || document.getElementById){
		if (document.all){
			intYear = intYear
		}
		else{
			intYear=intYear +1900;
		}
	}
	if (intMin < 10) {
		intMin = "0" + intMin
	}
	if (intSec < 10) {
		intSec = "0" + intSec
	}		
	return intDate + " " + intMonth + " " + intYear + " г. " + intHour + ":" + intMin + ":" + intSec;
}
function flash_bg_color(id,clr1,clr2)
{
	var f_delay=1;
	var c_color=document.all[id].style.backgroundColor;
	if(c_color)
		if(c_color==clr1)
			document.all[id].style.backgroundColor=clr2;
		else
			document.all[id].style.backgroundColor=clr1;
	setTimeout("flash_bg_color('"+id+"','"+clr1+"','"+clr2+"')",f_delay*1000);
}
