

  document.onmouseover = doDocumentOnMouseOver ;
  document.onmouseout = doDocumentOnMouseOut ;

  function doDocumentOnMouseOver() {
    var eSrc = window.event.srcElement ;
    if (eSrc.className == "item") {
      window.event.srcElement.className = "highlight";
    }
  }

  function doDocumentOnMouseOut() {
    var eSrc = window.event.srcElement ;
    if (eSrc.className == "highlight") {
      window.event.srcElement.className = "item";
    }
  }


var bV=parseInt(navigator.appVersion);
NS4=(document.layers) ? true : false;
IE4=((document.all)&&(bV>=4))?true:false;
ver4 = (NS4 || IE4) ? true : false;

function expandIt(){return}
function expandAll(){return}

isExpanded = false;

function getIndex(el) {
	ind = null;
	for (i=0; i<document.layers.length; i++) {
		whichEl = document.layers[i];
		if (whichEl.id == el) {
			ind = i;
			break;
		}
	}
	return ind;
}

function arrange() {
	nextY = document.layers[firstInd].pageY + document.layers[firstInd].document.height;
	for (i=firstInd+1; i<document.layers.length; i++) {
		whichEl = document.layers[i];
		if (whichEl.visibility != "hide") {
			whichEl.pageY = nextY;
			nextY += whichEl.document.height;
		}
	}
}

function initIt(){
	if (NS4) {
		for (i=0; i<document.layers.length; i++) {
			whichEl = document.layers[i];
			if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide";
		}
		arrange();
	}
	else {
		tempColl = document.all.tags("DIV");
		for (i=0; i<tempColl.length; i++) {
			if (tempColl(i).className == "child") tempColl(i).style.display = "none";
		}
	}
	//expandIt('el3')
	}

function expandIt(el) {
	whichEl = document.getElementById(el + "Child");
	whichIm = document.getElementById(el + "Img");
	if (whichEl.style.display == "none") {
		whichEl.style.display = "block";
		whichIm.src = "/bitrix/templates/tatkom/pix/minus.gif";
	}
	else {
		whichEl.style.display = "none";
		whichIm.src = "/bitrix/templates/tatkom/pix/plus.gif";
	}
	arrange();
}

function expandIE(el) { 
	whichEl = eval(el + "Child");

        // Modified Tobias Ratschiller 01-01-99:
        // event.srcElement obviously only works when clicking directly
        // on the image. Changed that to use the pix's ID instead (so
        // you've to provide a valid ID!).

	//whichIm = event.srcElement;
        whichIm = eval(el+"Img");

	if (whichEl.style.display == "none") {
		whichEl.style.display = "block";
		whichIm.src = "/bitrix/templates/tatkom/pix/minus.gif";		
	}
	else {
		whichEl.style.display = "none";
		whichIm.src = "/bitrix/templates/tatkom/pix/plus.gif";
	}
    window.event.cancelBubble = true ;
}

function expandNS(el) {
	whichEl = document.getElementById(el + "Child");
	whichIm = document.getElementById(el + "Img");
	if (whichEl.style.display == "none") {
		whichEl.style.display = "block";
		whichIm.src = "/bitrix/templates/tatkom/pix/minus.gif";
	}
	else {
		whichEl.style.display = "none";
		whichIm.src = "/bitrix/templates/tatkom/pix/plus.gif";
	}
}

function showAll() {
	for (i=firstInd; i<document.layers.length; i++) {
		whichEl = document.layers[i];
		whichEl.visibility = "show";
	}
}

function expandAll(isBot) {
	newSrc = (isExpanded) ? "/bitrix/templates/tatkom/pix/plus.gif" : "/bitrix/templates/tatkom/pix/minus.gif";

	if (NS4) {
        // TR-02-01-99: Don't need that
        // document.pix["imEx"].src = newSrc;
		for (i=firstInd; i<document.layers.length; i++) {
			whichEl = document.layers[i];
			if (whichEl.id.indexOf("Parent") != -1) {
				whichEl.document.pix["imEx"].src = newSrc;
			}
			if (whichEl.id.indexOf("Child") != -1) {
				whichEl.visibility = (isExpanded) ? "hide" : "show";
			}
		}

		arrange();
		if (isBot && isExpanded) scrollTo(0,document.layers[firstInd].pageY);
	}
	else {
		divColl = document.all.tags("DIV");
		for (i=0; i<divColl.length; i++) {
			if (divColl(i).className == "child") {
				divColl(i).style.display = (isExpanded) ? "none" : "block";
			}
		}
		imColl = document.pix.item("imEx");
		for (i=0; i<imColl.length; i++) {
			imColl(i).src = newSrc;
		}
	}

	isExpanded = !isExpanded;
}

with (document) {
	write("<STYLE TYPE='text/css'>");
	if (NS4)
        {
        write(".parent {font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; text-decoration:none; position:absolute; visibility:hidden; color: #000000; margin-left:3pt}");
        write(".child {font-family: Verdana, Arial, Helvetica, sans-serif;  size: 8pt;color: #000000; position:absolute; visibility:hidden; margin-left:13pt}");
        write(".item {font-family: Verdana, Arial, Helvetica, sans-serif; color: #444444; text-decoration:none;}");
        write(".regular {font-family: Arial,Helvetica,sans-serif; position:absolute; visibility:hidden}");
        write("DIV { color:#000000; }")
        }
	else
        {
        write(".child {font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; text-decoration:none; display:none; margin-left:13pt;}");
        write(".parent {font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; text-decoration:none; margin-left:3pt}");
        write(".item { color: #444444; text-decoration:none; font-size: 8pt;}");
        write(".highlight { color:#000000;  text-decoration:none; font-size: 8pt;}");
        write(".heada { font-size: 9pt; color:#000000; text-decoration:none}");
        write("DIV { color:#000000;}")
	    }
	write("</STYLE>");

}

onload = initIt;
