
function obrClick(){
document.all.rez2_index.innerText = window.event.srcElement.sourceIndex;
}

fm1="fm1_12.gif";
fm1o="fm1_12o.gif";

fm2="fm1_11.gif";
fm2o="fm1_11o.gif";

fm3="fm1_13.gif";
fm3o="fm1_13o.gif";

fm4="fm1_11.gif";
fm4o="fm1_11o.gif";

function initm() {
backF1("c101");
backF1("c102");
backF1("c103");
backF1("c104");
backF1("c105");
backF1("c106");
backF1("c107");
backF1("c108");
backF1("c109");
backF3("c301");
backF3("c302");
backF3("c303");
backF3("c304");
backF3("c305");
backF3("c306");
backF3("c307");
backF3("c308");
backF3("c309");
backF2("c201");
backF2("c202");
backF2("c203");
backF2("c204");
backF4("c401");
backF4("c402");
backF4("c403");
backF4("c404");
}



function newF1(idCell) {
if (document.all) eval('document.all.'+idCell+'.background = fm1o');
else eval('document.getElementById("' + idCell + '").background = fm1o');
}

function backF1(idCell) {
if (document.all) eval('document.all.'+idCell+'.background = fm1');
else eval('document.getElementById("' + idCell + '").background = fm1');
}

function newF2(idCell) {
if (document.all) eval('document.all.'+idCell+'.background = fm2o');
else eval('document.getElementById("' + idCell + '").background = fm2o');
}

function backF2(idCell) {
if (document.all) eval('document.all.'+idCell+'.background = fm2');
else eval('document.getElementById("' + idCell + '").background = fm2');
}

function newF3(idCell) {
if (document.all) eval('document.all.'+idCell+'.background = fm3o');
else eval('document.getElementById("' + idCell + '").background = fm3o');
}

function backF3(idCell) {
if (document.all) eval('document.all.'+idCell+'.background = fm3');
else eval('document.getElementById("' + idCell + '").background = fm3');
}

function newF4(idCell) {
if (document.all) eval('document.all.'+idCell+'.background = fm4o');
else eval('document.getElementById("' + idCell + '").background = fm4o');
}

function backF4(idCell) {
if (document.all) eval('document.all.'+idCell+'.background = fm4');
else eval('document.getElementById("' + idCell + '").background = fm4');
}


function stopError(){
	return true;
}
window.onerror = stopError;




//DOM TD hover
function Hover(e){
	if (!e) var e = window.event;
	var it = e.target ? e.target : e.srcElement;
	isover = e.type == "mouseover";
	if (it.className == "nav" && isover && it.parentNode){
		it.parentNode.style.borderColor = "#ADC1CE";
		return;
	}
	if (it.className == "navcurressay" || it.className == "nav1" || it.className == "nav2" && it.firstChild){
		a = it.firstChild;
		//it.title = a.title || a.text;
		it.style.cursor = isover ? e.target ? "pointer" : "hand" : "default";
		if (it.className != "navcurressay") it.style.borderColor = isover ? "#ADC1CE" : "#AAAAAA";
		window.status = isover ? a.href : "";
		if (e.type == "click") location.href = a.href;
	}
}

document.onmouseover = document.onmouseout = document.onclick = Hover;


//DOM tooltip
//originally written by paul sowden <paul@idontsmoke.co.uk>
window.onload = function(e){
	if (document.createElement) {
	tooltip.d();
		MM_date();
}
}

tooltip = {

	t: document.createElement("DIV"),
	c: null,
	g: false,

	m: function(e){
		if (tooltip.g){
			//x = window.event ? event.clientX + document.body.scrollLeft : e.pageX;
			//y = window.event ? event.clientY + document.body.scrollTop  : e.pageY;
			oCanvas = document.getElementsByTagName(
			(document.compatMode && document.compatMode == "CSS1Compat") ? "HTML" : "BODY"
			)[0];
			x = window.event ? event.clientX + oCanvas.scrollLeft : e.pageX; // !!!
			y = window.event ? event.clientY + oCanvas.scrollTop : e.pageY; // !!!
			tooltip.a(x, y);
		}
	},

	d: function(){
		tooltip.t.setAttribute("id", "tooltip");
		//tooltip.t.style.filter = "alpha(opacity=85)";
		document.body.appendChild(tooltip.t);
		a = (document.all) ? document.all : document.getElementsByTagName("*");
		aLength = a.length;
		for (var i = 0; i < aLength; i++){
			if (a[i].getAttribute("alt")){
				a[i].setAttribute("text", a[i].getAttribute("alt"));
				a[i].removeAttribute("alt");
		//		if (a[i].getAttribute("alt") && a[i].complete) a[i].removeAttribute("alt");
				tooltip.l(a[i], "mouseover", tooltip.s);
				tooltip.l(a[i], "mouseout", tooltip.h);
			}else
			if (a[i].getAttribute("title")){
				a[i].setAttribute("text", a[i].getAttribute("title"));
				a[i].removeAttribute("title");
				if (a[i].getAttribute("alt") && a[i].complete) a[i].removeAttribute("alt");
				tooltip.l(a[i], "mouseover", tooltip.s);
				tooltip.l(a[i], "mouseout", tooltip.h);
				}
		}
		document.onmousemove = tooltip.m;
		window.onscroll = tooltip.h; // !!!
	},

	s: function(e){
		d = (window.event) ? window.event.srcElement : e.currentTarget;
		if (!d.getAttribute("text")) return; // !!!
		tooltip.t.appendChild(document.createTextNode(d.getAttribute("text")));
		tooltip.c = setTimeout("tooltip.t.style.visibility = 'visible';", 100);
		tooltip.g = true;
	},

	h: function(e){
		tooltip.t.style.visibility = "hidden";
		// thanks to Alexander Shurkayev for helping me optimise this line :-)
		if (tooltip.t.firstChild) tooltip.t.removeChild(tooltip.t.firstChild);
		clearTimeout(tooltip.c);
		tooltip.g = false;
		tooltip.a(-99, -99);
	},

	l: function(o, e, a){
		if (o.addEventListener) o.addEventListener(e, a, true);
		else
			if (o.attachEvent) o.attachEvent("on" + e, a);
			else
				return null;
	},

	a: function(x, y){
		tooltip.t.style.left = x + 8 + "px";
		tooltip.t.style.top  = y + 8 + "px";
	}
}

function MM_date(){
  var now = new Date();
  var yr = now.getYear();
  var mName = now.getMonth() + 1;
  var dName = now.getDay() + 1;
  var dayNr = ((now.getDate()<10) ? "0" : "")
              + now.getDate();
    if(dName==1) Day = "воскресенье";
    if(dName==2) Day = "понедельник";
    if(dName==3) Day = "вторник";
    if(dName==4) Day = "среда";
    if(dName==5) Day = "четверг";
    if(dName==6) Day = "пятница";
    if(dName==7) Day = "суббота";
    
    if(mName==1) Month="января";
    if(mName==2) Month="февраля";
    if(mName==3) Month="марта";
    if(mName==4) Month="апреля";
    if(mName==5) Month="мая";
    if(mName==6) Month="июня";
    if(mName==7) Month="июля";
    if(mName==8) Month="августа";
    if(mName==9) Month="сентября";
    if(mName==10) Month="октября";
    if(mName==11) Month="ноября";
    if(mName==12) Month="декабря";
  var todaysDate =(""+dayNr+" "+Month+" " + yr + " г.<br>" + ""+ Day);
//  document.open();
//  document.write(todaysDate);
  document.all("date1").innerHTML = todaysDate;
}

