
// Tree object
function dTree(objName) {
	this.config = {
		target: null,
		folderLinks: true,
		useSelection: true,
		useCookies: true,
		useLines: true,
		useIcons: true,
		useStatusText: false,
		closeSameLevel: false,
		inOrder: false
	}

	this.icon = {
	    root: 'Help/img/book.png',
	    folder: 'Help/img/book.png',
	    folderOpen: 'Help/img/book_.png',
	    node: 'Help/img/doc.png',
		empty: 'Help/img/empty.gif',
		line: 'Help/img/line.gif',
		join: 'Help/img/join.gif',
		joinBottom: 'Help/img/joinbottom.gif',
		joinTop: 'Help/img/joinTop.gif',
		plus: 'Help/img/plus.gif',
		plusBottom: 'Help/img/plusbottom.gif',
		minus: 'Help/img/minus.gif',
		minusBottom: 'Help/img/minusbottom.gif',
		nlPlus: 'Help/img/nolines_plus.gif',
		nlMinus: 'Help/img/nolines_minus.gif'
	};

	this.obj = objName;
	this.aNodes = [];
	this.aIndent = [];
	this.selectedNode = null;
	this.selectedFound = false;
	this.completed = false;
};

// Adds a new node to the node array
dTree.prototype.addXML = function(xml)
{
    var tree = this;
    
    $xml = $($.parseXML(xml));

    $xml.find('n').each(function(i, el)
    {
        $(el).attr('id', i);
        var pid = $(el).parent().attr('id');
        var name = $(el).attr('txt');
        var url = $(el).attr('ref');

        tree.aNodes[tree.aNodes.length] = { id: i, pid: pid ? pid : -1, name: name ? name : '', url: url ? url : '' }
    });
};

// Adds a new node to the node array
dTree.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, open)
{
    this.aNodes[this.aNodes.length] = { id: id, pid: pid, name: name, url: url, title: title, target: target, icon: icon, iconOpen: iconOpen, _io: open || false, _is: false, _ls: false, _hc: false, _ai: 0, _p: null }
};

// Open/close all nodes
dTree.prototype.openAll = function() {
	this.oAll(true);
};

dTree.prototype.closeAll = function() {
	this.oAll(false);
};

// Outputs the tree to the page
dTree.prototype.toString = function() {
	var str = '<div class="dtree">\n';

	if (document.getElementById && this.aNodes.length > 0)
	{
		if (this.config.useCookies) this.selectedNode = this.getSelected();
		str += this.addNode(this.aNodes[0]);
	} else str += 'Browser not supported.';

	str += '</div>';
	if (!this.selectedFound) this.selectedNode = null;
	this.completed = true;

	return str;
};

// Creates the tree structure
dTree.prototype.addNode = function(pNode) {
	var str = '';
	var n=0;
	if (this.config.inOrder) n = pNode._ai;

	for (n; n<this.aNodes.length; n++) {
		if (this.aNodes[n].pid == pNode.id) {
			var cn = this.aNodes[n];
			cn._p = pNode;
			cn._ai = n;
			this.setCS(cn);

			if (!cn.target && this.config.target) cn.target = this.config.target;
			if (cn._hc && !cn._io && this.config.useCookies) cn._io = this.isOpen(cn.id);
			if (!this.config.folderLinks && cn._hc) cn.url = null;

			if (this.config.useSelection && cn.id == this.selectedNode && !this.selectedFound) {
					cn._is = true;
					this.selectedNode = n;
					this.selectedFound = true;
			}

			str += this.node(cn, n);
			if (cn._ls) break;
		}
	}
	return str;
};

// Creates the node icon, url and text
dTree.prototype.node = function(node, nodeId) {
	var str = '<div class="dTreeNode">' + this.indent(node, nodeId);

	if (this.config.useIcons) {
		if (!node.icon) node.icon = ((node._hc) ? this.icon.folder : this.icon.node);
		if (!node.iconOpen) node.iconOpen = (node._hc) ? this.icon.folderOpen : this.icon.node;
		str += '<img id="i' + this.obj + nodeId + '" src="' + ((node._io) ? node.iconOpen : node.icon) + '" alt="" />';
	}

	if (node.url) {
		str += '<a id="s' + this.obj + nodeId + '" class="' + ((this.config.useSelection) ? ((node._is ? 'nodeSel' : 'node')) : 'node') + '" href="' + node.url + '"';
		if (node.title) str += ' title="' + node.title + '"';
		if (node.target) str += ' target="' + node.target + '"';
		if (this.config.useStatusText) str += ' onmouseover="window.status=\'' + node.name + '\';return true;" onmouseout="window.status=\'\';return true;" ';
		//if (this.config.useSelection && ((node._hc && this.config.folderLinks) || !node._hc))
		//	str += ' onclick="javascript: ' + this.obj + '.s(' + nodeId + ');"';
		str += '>';
	}
	else if ((!this.config.folderLinks || !node.url) && node._hc)
		str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');" class="node">';

	str += node.name;
	if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += '</a>';
	str += '</div>';

	if (node._hc) {
		str += '<div id="d' + this.obj + nodeId + '" class="clip" style="display:' + (node._io ? 'block' : 'none') + ';">';
		str += this.addNode(node);
		str += '</div>';
	}

	this.aIndent.pop();
	return str;
};

// Adds the empty and line icons
dTree.prototype.indent = function(node, nodeId) {
	var str = '';

	for (var n=0; n<this.aIndent.length; n++)
		str += '<img src="' + ( (this.aIndent[n] == 1 && this.config.useLines) ? this.icon.line : this.icon.empty ) + '" alt="" />';
	(node._ls) ? this.aIndent.push(0) : this.aIndent.push(1);

	if (node._hc) {
		str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');"><img id="j' + this.obj + nodeId + '" src="';
		if (!this.config.useLines) str += (node._io) ? this.icon.nlMinus : this.icon.nlPlus;
		else str += ( (node._io) ? ((node._ls && this.config.useLines) ? this.icon.minusBottom : this.icon.minus) : ((node._ls && this.config.useLines) ? this.icon.plusBottom : this.icon.plus ) );
		str += '" alt="" /></a>';
    } else str += '<img src="' + ((this.config.useLines) ? (node._fs ? this.icon.joinTop : node._ls ? this.icon.joinBottom : this.icon.join) : this.icon.empty) + '" alt="" />';

	return str;
};

// Checks if a node has any children and if it is the last sibling
dTree.prototype.setCS = function(node) {
	var lastId;

	if (this.aNodes[1].id == node.id) node._fs = true;
	for (var n = 0; n < this.aNodes.length; n++)
	{
		if (this.aNodes[n].pid == node.id) node._hc = true;
		if (this.aNodes[n].pid == node.pid) lastId = this.aNodes[n].id;
	}
	if (lastId==node.id) node._ls = true;
};

// Returns the selected node
dTree.prototype.getSelected = function() {
	var sn = this.getCookie('cs' + this.obj);
	return (sn) ? sn : null;
};

// Highlights the selected node
dTree.prototype.SelectByUrl = function(url)
{
    for (var n = 0; n < this.aNodes.length; n++)
        if (this.aNodes[n].url == url)
    {
        document.getElementById("s" + this.obj + this.aNodes[n].id).className = "nodeSel";
        this.openTo(this.aNodes[n].id, false, false);
        return;
    }
};

// Highlights the selected node
/*
dTree.prototype.s = function(id)
{
	if (!this.config.useSelection) return;
	var cn = this.aNodes[id];
	if (cn._hc && !this.config.folderLinks) return;

	if (this.selectedNode != id) {
		if (this.selectedNode || this.selectedNode==0)
		    document.getElementById("s" + this.obj + this.selectedNode).className = "node";

		document.getElementById("s" + this.obj + id).className = "nodeSel";
		this.selectedNode = id;
		if (this.config.useCookies) this.setCookie('cs' + this.obj, cn.url);
	}
    this.setCookie('cs' + this.obj, cn.url);
};
*/

// Toggle Open or close
dTree.prototype.o = function(id) {
	var cn = this.aNodes[id];
	this.nodeStatus(!cn._io, id, cn._ls);
	cn._io = !cn._io;
	if (this.config.closeSameLevel) this.closeLevel(cn);
	if (this.config.useCookies) this.updateCookie();
};

// Open or close all nodes
dTree.prototype.oAll = function(status) {
	for (var n=0; n<this.aNodes.length; n++) {
		if (this.aNodes[n]._hc) {
			this.nodeStatus(status, n, this.aNodes[n]._ls)
			this.aNodes[n]._io = status;
		}
	}
	if (this.config.useCookies) this.updateCookie();
};

// Opens the tree to a specific node
dTree.prototype.openTo = function(nId, bSelect, bFirst) {
	if (!bFirst) {
		for (var n=0; n<this.aNodes.length; n++) {
			if (this.aNodes[n].id == nId) {
				nId=n;
				break;
			}
		}
	}

	var cn=this.aNodes[nId];

	cn._io = true;
	cn._is = bSelect;

	if (this.completed && cn._hc) this.nodeStatus(true, cn._ai, cn._ls);
	//if (this.completed && bSelect) this.s(cn._ai);
	else if (bSelect) this._sn=cn._ai;

	if (cn._p && cn._p._ai) this.openTo(cn._p._ai, false, true);
};

// Closes all nodes on the same level as certain node
dTree.prototype.closeLevel = function(node) {
	for (var n=0; n<this.aNodes.length; n++) {
		if (this.aNodes[n].pid == node.pid && this.aNodes[n].id != node.id && this.aNodes[n]._hc) {
			this.nodeStatus(false, n, this.aNodes[n]._ls);
			this.aNodes[n]._io = false;
			this.closeAllChildren(this.aNodes[n]);
		}
	}
}

// Closes all children of a node
dTree.prototype.closeAllChildren = function(node) {
	for (var n=0; n<this.aNodes.length; n++) {
		if (this.aNodes[n].pid == node.id && this.aNodes[n]._hc) {
			if (this.aNodes[n]._io) this.nodeStatus(false, n, this.aNodes[n]._ls);
			this.aNodes[n]._io = false;
			this.closeAllChildren(this.aNodes[n]);		
		}
	}
}

// Change the status of a node(open or closed)
dTree.prototype.nodeStatus = function(status, id, bottom) {
	eDiv	= document.getElementById('d' + this.obj + id);
	eJoin	= document.getElementById('j' + this.obj + id);

	if (this.config.useIcons) {
		eIcon	= document.getElementById('i' + this.obj + id);
		eIcon.src = (status) ? this.aNodes[id].iconOpen : this.aNodes[id].icon;
	}

	eJoin.src = (this.config.useLines)?
	((status)?((bottom)?this.icon.minusBottom:this.icon.minus):((bottom)?this.icon.plusBottom:this.icon.plus)):
	((status)?this.icon.nlMinus:this.icon.nlPlus);
	//eDiv.style.display = (status) ? 'block' : 'none';
	if (status) $(eDiv).slideDown(300); else $(eDiv).slideUp(300);
};

// [Cookie] Clears a cookie
dTree.prototype.clearCookie = function() {
	var now = new Date();
	var yesterday = new Date(now.getTime() - 1000 * 60 * 60 * 24);
	this.setCookie('co'+this.obj, 'cookieValue', yesterday);
	this.setCookie('cs'+this.obj, 'cookieValue', yesterday);
};

// [Cookie] Sets value in a cookie
dTree.prototype.setCookie = function(cookieName, cookieValue, expires, path, domain, secure) {
	document.cookie =
		escape(cookieName) + '=' + escape(cookieValue)
		+ (expires ? '; expires=' + expires.toGMTString() : '')
		+ (path ? '; path=' + path : '')
		+ (domain ? '; domain=' + domain : '')
		+ (secure ? '; secure' : '');
};

// [Cookie] Gets a value from a cookie
dTree.prototype.getCookie = function(cookieName) {
	var cookieValue = '';
	var posName = document.cookie.indexOf(escape(cookieName) + '=');
	if (posName != -1) {
		var posValue = posName + (escape(cookieName) + '=').length;
		var endPos = document.cookie.indexOf(';', posValue);
		if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos));
		else cookieValue = unescape(document.cookie.substring(posValue));
	}

	return (cookieValue);
};

// [Cookie] Returns ids of open nodes as a string
dTree.prototype.updateCookie = function() {
	var str = '';

	for (var n=0; n<this.aNodes.length; n++) {
		if (this.aNodes[n]._io) {
			if (str) str += '.';
			str += this.aNodes[n].id;
		}
	}
	this.setCookie('co' + this.obj, str);
};

// [Cookie] Checks if a node id is in a cookie
dTree.prototype.isOpen = function(id) {
	var aOpen = this.getCookie('co' + this.obj).split('.');
	for (var n=0; n<aOpen.length; n++)
		if (aOpen[n] == id) return true;

	return false;
};

// If Push and pop is not implemented by the browser
if (!Array.prototype.push) {
	Array.prototype.push = function array_push() {
		for(var i=0;i<arguments.length;i++)
			this[this.length]=arguments[i];
		return this.length;
	}
};

if (!Array.prototype.pop) {
	Array.prototype.pop = function array_pop() {
		lastElement = this[this.length-1];
		this.length = Math.max(this.length-1,0);
		return lastElement;
	}
};

var d = null;
$(document).ready(function()
{
    d = new dTree("d");

    d.addXML("\
    <n>\
        <n txt='1. Основные возможности программы' ref='Help.aspx?p=1.htm' />\
        \
        <n txt='2. Элементы управления' ref='Help.aspx?p=2/2.0.htm'>\
            <n txt='2.1. Создание нового проекта' ref='Help.aspx?p=2/2.1/2.1.0.htm'>\
                <n txt='2.1.1. Импорт из DXF-формата' ref='Help.aspx?p=2/2.1/2.1.1.htm' />\
                <n txt='2.1.2. Импорт тетраэдрических объемных сеток из COSMOS' ref='Help.aspx?p=2/2.1/2.1.2.htm' />\
            </n>\
            <n txt='2.2. Открытие существующего проекта' ref='Help.aspx?p=2/2.2.htm' />\
            <n txt='2.3. Наложение неровности на существующую конструкцию' ref='Help.aspx?p=2/2.3.htm' />\
            <n txt='2.4. Сохранение исходных данных проекта' ref='Help.aspx?p=2/2.4.htm' />\
            <n txt='2.5. Вызов графического редактора системы' ref='Help.aspx?p=2/2.5.htm' />\
            <n txt='2.6. Вызов табличного редактора системы' ref='Help.aspx?p=2/2.6.htm' />\
            <n txt='2.7. Вызов редактора стержневых сечений' ref='Help.aspx?p=2/2.7.htm' />\
            <n txt='2.8. Вызов редактора базы механических свойств материалов' ref='Help.aspx?p=2/2.8.htm' />\
            <n txt='2.9. Решение задачи' ref='Help.aspx?p=2/2.9.htm' />\
            <n txt='2.10. Просмотр результатов расчета' ref='Help.aspx?p=2/2.10.htm' />\
            <n txt='2.11. Печать результатов расчета' ref='Help.aspx?p=2/2.11.htm' />\
            <n txt='2.12. Комбинации загружений' ref='Help.aspx?p=2/2.12.htm' />\
        </n>\
        \
        <n txt='3. Режимы работы программы' ref='Help.aspx?p=3/3.0.htm'>\
            <n txt='3.1. Статический расчет' ref='Help.aspx?p=3/3.1.htm' />\
            <n txt='3.2. Устойчивость' ref='Help.aspx?p=3/3.2/3.2.0.htm'>\
                <n txt='3.2.1. Линейный расчет' ref='Help.aspx?p=3/3.2/3.2.1.htm' />\
                <n txt='3.2.2. Нелинейный расчет (расчет оболочек на устойчивость)' ref='Help.aspx?p=3/3.2/3.2.2/3.2.2.0.htm'>\
                    <n txt='3.2.2.1. Пример расчета цилиндрических оболочек' ref='Help.aspx?p=3/3.2/3.2.2/3.2.2.1.htm' />\
                </n>\
                <n txt='3.2.3. Определение расчетных длин балочных элементов' ref='Help.aspx?p=3/3.2/3.2.3/3.2.3.0.htm'>\
                    <n txt='3.2.3.1 Подготовка данных и расчет' ref='Help.aspx?p=3/3.2/3.2.3/3.2.3.1.htm' />\
                </n>\
                <n txt='3.2.4. Проверка устойчивости стержневых конструкций' ref='Help.aspx?p=3/3.2/3.2.4/3.2.4.0.htm'>\
                    <n txt='3.2.4.1. Подготовка данных и расчет' ref='Help.aspx?p=3/3.2/3.2.4/3.2.4.1.htm' />\
                    <n txt='3.2.4.2. Можно ли доверять статистическому методу расчету на устойчивость' ref='Help.aspx?p=3/3.2/3.2.4/3.2.4.2.htm' />\
                </n>\
            </n>\
            <n txt='3.3. Деформированная схема' ref='Help.aspx?p=3/3.3.htm' />\
            <n txt='3.4. Свободные колебания' ref='Help.aspx?p=3/3.4.htm' />\
            <n txt='3.5. Подгонка масс' ref='Help.aspx?p=3/3.5.htm' />\
            <n txt='3.6. Амплитудно-частотная характеристика' ref='Help.aspx?p=3/3.6.htm' />\
            <n txt='3.7. Настройка гасителей колебаний' ref='Help.aspx?p=3/3.7.htm' />\
            <n txt='3.8. Произвольное динамическое воздействие' ref='Help.aspx?p=3/3.8/3.8.0.htm' >\
                <n txt='3.8.1. Расчет на стационарные случайные воздействия' ref='Help.aspx?p=3/3.8/3.8.1/3.8.1.0.htm' >\
                    <n txt='3.8.1.1. Расчет на горизонтальные пульсации ветра' ref='Help.aspx?p=3/3.8/3.8.1/3.8.1.1.htm' />\
                    <n txt='3.8.1.2. Расчет на вертикальные пульсации ветра' ref='Help.aspx?p=3/3.8/3.8.1/3.8.1.2.htm' />\
                    <n txt='3.8.1.3. Расчет на сейсмические воздействия' ref='Help.aspx?p=3/3.8/3.8.1/3.8.1.3.htm' />\
                    <n txt='3.8.1.4. Стационарный случайный процесс' ref='Help.aspx?p=3/3.8/3.8.1/3.8.1.4.htm' />\
                </n>\
            </n>\
            <n txt='3.9. Вынужденные гармонические колебания' ref='Help.aspx?p=3/3.9/3.9.0.htm' >\
                <n txt='3.9.1. Почему комплексные числа?' ref='Help.aspx?p=3/3.9/3.9.1.htm' />\
            </n>\
            <n txt='3.10 Стационарное случайное воздействие' ref='Help.aspx?p=3/3.10/3.10.0.htm' >\
                <n txt='3.10.1.Расчет на горизонтальные пульсации ветра' ref='Help.aspx?p=3/3.10/3.10.1.htm' />\
                <n txt='3.10.2.Расчет на вертикальные пульсации ветра' ref='Help.aspx?p=3/3.10/3.10.2.htm' />\
                <n txt='3.10.3.Расчет на сейсмические воздействия' ref='Help.aspx?p=3/3.10/3.10.3.htm' />\
                <n txt='3.10.4.Полинмиальный спектр' ref='Help.aspx?p=3/3.10/3.10.4.htm' />\
            </n>\
            <n txt='3.11. Пульсационный ветер' ref='Help.aspx?p=3/3.11.htm' />\
            <n txt='3.12. Ветровой резонанс' ref='Help.aspx?p=3/3.12.htm' />\
            <n txt='3.13. Сейсмика' ref='Help.aspx?p=3/3.13.htm' />\
            <n txt='3.14. Построение и накатка линий влияния' ref='Help.aspx?p=3/3.14.htm' />\
            <n txt='3.15. Подвижная динамическая нагрузка' ref='Help.aspx?p=3/3.15.htm' />\
            <n txt='3.16. Расчет вантовых конструкций' ref='Help.aspx?p=3/3.16/3.16.0.htm' >\
                <n txt='3.16.1. Регулировка натяжения вант' ref='Help.aspx?p=3/3.16/3.16.1.htm' />\
            </n>\
            <n txt='3.17. Расчет систем с нелинейными упругими и односторонними связями' ref='Help.aspx?p=3/3.17.htm' />\
            <n txt='3.18. Учет взаимодействия конструкции с подстилающим слоем грунта' ref='Help.aspx?p=3/3.18.htm' />\
        </n>\
        \
        <n txt='4. Графический редактор' ref='Help.aspx?p=4/4.0.htm'>\
            <n txt='4.1. Формирование скелетной расчетной схемы' ref='Help.aspx?p=4/4.1/4.1.0.htm' >\
                <n txt='4.1.1. Генерация линий' ref='Help.aspx?p=4/4.1/4.1.1.htm' />\
                <n txt='4.1.2. Генерация дуг и окружностей' ref='Help.aspx?p=4/4.1/4.1.2.htm' />\
                <n txt='4.1.3. Генерация поверхностей' ref='Help.aspx?p=4/4.1/4.1.3/4.1.3.0.htm' >\
                    <n txt='4.1.3.1. Генерация сфер' ref='Help.aspx?p=4/4.1/4.1.3/4.1.3.1.htm' />\
                    <n txt='4.1.3.2. Генерация поверхностей вращения' ref='Help.aspx?p=4/4.1/4.1.3/4.1.3.2.htm' />\
                    <n txt='4.1.3.3. Генерация пологих оболочек вращения' ref='Help.aspx?p=4/4.1/4.1.3/4.1.3.3.htm' />\
                    <n txt='4.1.3.4. Генерация трансляцией' ref='Help.aspx?p=4/4.1/4.1.3/4.1.3.4.htm' />\
                    <n txt='4.1.3.5. Генерация поверхностей, заданных своей границей' ref='Help.aspx?p=4/4.1/4.1.3/4.1.3.5.htm' />\
                </n>\
                <n txt='4.1.4. Операции над узлами и линиями схемы' ref='Help.aspx?p=4/4.1/4.1.4.htm' />\
                <n txt='4.1.5. Операции над поверхностями' ref='Help.aspx?p=4/4.1/4.1.5.htm' />\
                <n txt='4.1.6. Работа со слоями' ref='Help.aspx?p=4/4.1/4.1.6.htm' />\
                <n txt='4.1.7. Формирование грузовых поверхностей' ref='Help.aspx?p=4/4.1/4.1.7/4.1.7.0.htm' >\
                    <n txt='4.1.7.1. Редактирование грузовых поверхностей' ref='Help.aspx?p=4/4.1/4.1.7/4.1.7.1.htm' />\
                </n>\
            </n>\
            <n txt='4.2. Прикрепление конечных элементов' ref='Help.aspx?p=4/4.2/4.2.0.htm' >\
                <n txt='4.2.1. Панель установки группы жесткости конечных элементов' ref='Help.aspx?p=4/4.2/4.2.1.htm' />\
                <n txt='4.2.2. Балочный конечный элемент' ref='Help.aspx?p=4/4.2/4.2.2/4.2.2.0.htm' >\
                    <n txt='4.2.2.1. Создание новых конечных элементов' ref='Help.aspx?p=4/4.2/4.2.2/4.2.2.1.htm' />\
                    <n txt='4.2.2.2. Изменение существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.2/4.2.2.2.htm' />\
                    <n txt='4.2.2.3. Удаление существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.2/4.2.2.3.htm' />\
                    <n txt='4.2.2.4. Задание ориентации' ref='Help.aspx?p=4/4.2/4.2.2/4.2.2.4.htm' />\
                    <n txt='4.2.2.5. Задание шарниров' ref='Help.aspx?p=4/4.2/4.2.2/4.2.2.5.htm' />\
                    <n txt='4.2.2.6. Задание направлений выпуклости начальных неровностей' ref='Help.aspx?p=4/4.2/4.2.2/4.2.2.6.htm' />\
                </n>\
                <n txt='4.2.3. Элементы пластин, объемные элементы и элементы упругого основания' ref='Help.aspx?p=4/4.2/4.2.3/4.2.3.0.htm' >\
                    <n txt='4.2.3.1. Создание новых конечных элементов' ref='Help.aspx?p=4/4.2/4.2.3/4.2.3.1.htm' />\
                    <n txt='4.2.3.2. Изменение существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.3/4.2.3.2.htm' />\
                    <n txt='4.2.3.3. Удаление существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.3/4.2.3.3.htm' />\
                    <n txt='4.2.3.4. Изменение ориентации треугольных конечных элементов' ref='Help.aspx?p=4/4.2/4.2.3/4.2.3.4.htm' />\
                </n>\
                <n txt='4.2.4. Конечный элемент сосредоточенной массы' ref='Help.aspx?p=4/4.2/4.2.4/4.2.4.0.htm' >\
                    <n txt='4.2.4.1. Создание новых конечных элементов' ref='Help.aspx?p=4/4.2/4.2.4/4.2.4.1.htm' />\
                    <n txt='4.2.4.2. Изменение существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.4/4.2.4.2.htm' />\
                    <n txt='4.2.4.3. Удаление конечных элементов' ref='Help.aspx?p=4/4.2/4.2.4/4.2.4.3.htm' />\
                </n>\
                <n txt='4.2.5. Шарнирный балочный конечный элемент' ref='Help.aspx?p=4/4.2/4.2.5/4.2.5.0.htm' >\
                    <n txt='4.2.5.1. Создание новых конечных элементов' ref='Help.aspx?p=4/4.2/4.2.5/4.2.5.1.htm' />\
                    <n txt='4.2.5.2. Изменение существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.5/4.2.5.2.htm' />\
                    <n txt='4.2.5.3. Удаление существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.5/4.2.5.3.htm' />\
                </n>\
                <n txt='4.2.6. Треугольный мембранный конечный элемент' ref='Help.aspx?p=4/4.2/4.2.6.htm' />\
                <n txt='4.2.7. Односторонняя жесткая связь' ref='Help.aspx?p=4/4.2/4.2.7/4.2.7.0.htm' >\
                    <n txt='4.2.7.1. Создание новых конечных элементов' ref='Help.aspx?p=4/4.2/4.2.7/4.2.7.1.htm' />\
                    <n txt='4.2.7.2. Изменение существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.7/4.2.7.2.htm' />\
                    <n txt='4.2.7.3. Удаление существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.7/4.2.7.3.htm' />\
                </n>\
                <n txt='4.2.8. Одноточечная упругугая линейная связь' ref='Help.aspx?p=4/4.2/4.2.8/4.2.8.0.htm' >\
                    <n txt='4.2.8.1. Создание новых конечных элементов' ref='Help.aspx?p=4/4.2/4.2.8/4.2.8.1.htm' />\
                    <n txt='4.2.8.2. Изменение существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.8/4.2.8.2.htm' />\
                    <n txt='4.2.8.3. Удаление существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.8/4.2.8.3.htm' />\
                </n>\
                <n txt='4.2.9. Одноточечная упругугая угловая связь' ref='Help.aspx?p=4/4.2/4.2.9/4.2.9.0.htm' >\
                    <n txt='4.2.9.1. Создание новых конечных элементов' ref='Help.aspx?p=4/4.2/4.2.9/4.2.9.1.htm' />\
                    <n txt='4.2.9.2. Изменение существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.9/4.2.9.2.htm' />\
                    <n txt='4.2.9.3. Удаление существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.9/4.2.9.3.htm' />\
                </n>\
                <n txt='4.2.10. Динамический гаситель колебаний' ref='Help.aspx?p=4/4.2/4.2.10/4.2.10.0.htm' >\
                    <n txt='4.2.10.1. Создание новых конечных элементов' ref='Help.aspx?p=4/4.2/4.2.10/4.2.10.1.htm' />\
                    <n txt='4.2.10.2. Изменение существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.10/4.2.10.2.htm' />\
                    <n txt='4.2.10.3. Удаление существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.10/4.2.10.3.htm' />\
                </n>\
                <n txt='4.2.11. Вантовый конечный элемент' ref='Help.aspx?p=4/4.2/4.2.11/4.2.11.0.htm' >\
                    <n txt='4.2.11.1. Создание новых конечных элементов' ref='Help.aspx?p=4/4.2/4.2.11/4.2.11.1.htm' />\
                    <n txt='4.2.11.2. Изменение существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.11/4.2.11.2.htm' />\
                    <n txt='4.2.11.3. Удаление существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.11/4.2.11.3.htm' />\
                    <n txt='4.2.11.4. Установка параметров вантовых конечных элементов' ref='Help.aspx?p=4/4.2/4.2.11/4.2.11.4.htm' />\
                </n>\
                <n txt='4.2.12. Одноточечная нелинейная упругугая связь' ref='Help.aspx?p=4/4.2/4.2.12/4.2.12.0.htm' >\
                    <n txt='4.2.12.1. Создание новых конечных элементов' ref='Help.aspx?p=4/4.2/4.2.12/4.2.12.1.htm' />\
                    <n txt='4.2.12.2. Изменение существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.12/4.2.12.2.htm' />\
                    <n txt='4.2.12.3. Удаление существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.12/4.2.12.3.htm' />\
                </n>\
                <n txt='4.2.13. Псевдоэлемент фундаментной плиты' ref='Help.aspx?p=4/4.2/4.2.13/4.2.13.0.htm' >\
                    <n txt='4.2.13.1. Создание новых конечных элементов' ref='Help.aspx?p=4/4.2/4.2.13/4.2.13.1.htm' />\
                    <n txt='4.2.13.2. Изменение существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.13/4.2.13.2.htm' />\
                    <n txt='4.2.13.3. Удаление существующих конечных элементов' ref='Help.aspx?p=4/4.2/4.2.13/4.2.13.3.htm' />\
                </n>\
            </n>\
            <n txt='4.3. Наложение внешних связей' ref='Help.aspx?p=4/4.3.htm' />\
            <n txt='4.4. Нагрузки' ref='Help.aspx?p=4/4.4/4.4.0.htm' >\
                <n txt='4.4.1. Установка номера загружения' ref='Help.aspx?p=4/4.4/4.4.1.htm' />\
                <n txt='4.4.2. Задание статических нагрузок' ref='Help.aspx?p=4/4.4/4.4.2/4.4.2.0.htm'>\
                    <n txt='4.4.2.1. Узловые нагрузки' ref='Help.aspx?p=4/4.4/4.4.2/4.4.2.1.htm' />\
                    <n txt='4.4.2.2. Нагрузки, прикладываемые к балочным элементам' ref='Help.aspx?p=4/4.4/4.4.2/4.4.2.2.htm' />\
                    <n txt='4.4.2.3. Нагрузки, прикладываемые к элементу треугольной пластины' ref='Help.aspx?p=4/4.4/4.4.2/4.4.2.3.htm' />\
                    <n txt='4.4.2.4. Нагрузки, прикладываемые к тетраэдрическому конечному элементу' ref='Help.aspx?p=4/4.4/4.4.2/4.4.2.4.htm' />\
                    <n txt='4.4.2.5. Нагрузки, прикладываемые к призматическому конечному элементу' ref='Help.aspx?p=4/4.4/4.4.2/4.4.2.5.htm' />\
                    <n txt='4.4.2.6. Нагрузки, прикладываемые к грузовым поверхностям' ref='Help.aspx?p=4/4.4/4.4.2/4.4.2.6.htm' />\
                    <n txt='4.4.2.7. Нагрузки, прикладываемые к вантовым элементам' ref='Help.aspx?p=4/4.4/4.4.2/4.4.2.7.htm' />\
                    <n txt='4.4.2.8. Задание предварительного обжатия нелинейных упругих элементов' ref='Help.aspx?p=4/4.4/4.4.2/4.4.2.8.htm' />\
                    <n txt='4.4.2.9. Нагрузки, прикладываемые к элементу прямоугольной пластины' ref='Help.aspx?p=4/4.4/4.4.2/4.4.2.9.htm' />\
                    <n txt='4.4.2.10. Задание собственного веса масс' ref='Help.aspx?p=4/4.4/4.4.2/4.4.2.10.htm' />\
                    <n txt='4.4.2.11. Задание нагрузки' ref='Help.aspx?p=4/4.4/4.4.2/4.4.2.11.htm' />\
                    <n txt='4.4.2.12. Удаление нагрузки' ref='Help.aspx?p=4/4.4/4.4.2/4.4.2.12.htm' />\
                </n>\
                <n txt='4.4.3. Задание гармонических динамических нагрузок' ref='Help.aspx?p=4/4.4/4.4.3.htm' />\
                <n txt='4.4.4. Задание стационарного случайного воздействия' ref='Help.aspx?p=4/4.4/4.4.4.htm' />\
                <n txt='4.4.5. Задание произвольных динамических воздействий' ref='Help.aspx?p=4/4.4/4.4.5.htm' />\
                <n txt='4.4.6. Задание параметрической нагрузки' ref='Help.aspx?p=4/4.4/4.4.6.htm' />\
                <n txt='4.4.7. Формирование подвижной нагрузки' ref='Help.aspx?p=4/4.4/4.4.7.htm' />\
                <n txt='4.4.8. Задание ветровой пульсационной нагрузки' ref='Help.aspx?p=4/4.4/4.4.8.htm' />\
                <n txt='4.4.9. Задание сейсмического воздействия' ref='Help.aspx?p=4/4.4/4.4.9.htm' />\
            </n>\
            <n txt='4.5. Задание свойств конечных элементов' ref='Help.aspx?p=4/4.5.htm' />\
            <n txt='4.6. Задание свойств материалов' ref='Help.aspx?p=4/4.6.htm' />\
            <n txt='4.7. Задание единиц измерения' ref='Help.aspx?p=4/4.7.htm' />\
            <n txt='4.8. Специальные режимы отображения' ref='Help.aspx?p=4/4.8.htm' />\
            <n txt='4.9. Система справки и подсказки' ref='Help.aspx?p=4/4.9.htm' />\
            <n txt='4.10. Перенумерация узлов и элементов расчетной схемы' ref='Help.aspx?p=4/4.10.htm' />\
            <n txt='4.11. Функция быстрого удаления' ref='Help.aspx?p=4/4.11.htm' />\
        </n>\
        \
        <n txt='5. База данных стержневых сечений' ref='Help.aspx?p=5/5.0.htm'>\
            <n txt='5.1. Нормирование произвольных сечений' ref='Help.aspx?p=5/5.1.htm' />\
            <n txt='5.2. Нормирование тонкостенных сечений' ref='Help.aspx?p=5/5.2.htm' />\
            <n txt='5.3. Управление изображением' ref='Help.aspx?p=5/5.3.htm' />\
            <n txt='5.4. Ведение базы данных' ref='Help.aspx?p=5/5.4.htm' />\
            <n txt='5.5. Формирование прототипов сечений' ref='Help.aspx?p=5/5.5.htm' />\
        </n>\
        \
        <n txt='6. Просмотр результатов расчета' ref='Help.aspx?p=6/6.0.htm'>\
            <n txt='6.1. Управление изображением' ref='Help.aspx?p=6/6.1.htm' />\
            <n txt='6.2. Получение справки' ref='Help.aspx?p=6/6.2.htm' />\
            <n txt='6.3. Отображение деформированного состояния' ref='Help.aspx?p=6/6.3.htm' />\
            <n txt='6.4. Построение эпюр усилий на стержневых элементах' ref='Help.aspx?p=6/6.4.htm' />\
            <n txt='6.5. Построение напряженного состояния в стержневых элементах' ref='Help.aspx?p=6/6.5.htm' />\
            <n txt='6.6. Напряженное состояния оболочек и объемных тел' ref='Help.aspx?p=6/6.6.htm' />\
            <n txt='6.7. Построение анимационных изображений' ref='Help.aspx?p=6/6.7.htm' />\
            <n txt='6.8. Построение амплитудно-частотных характеристик' ref='Help.aspx?p=6/6.8.htm' />\
            <n txt='6.9. Настройка гасителей колебаний' ref='Help.aspx?p=6/6.9.htm' />\
            <n txt='6.10. Построение и накатка линий влияния' ref='Help.aspx?p=6/6.10.htm' />\
            <n txt='6.11. Проверка устойчивости стержневых конструкций' ref='Help.aspx?p=6/6.11.htm' />\
            <n txt='6.12. Создание динамического загружения с новыми начальными условиями' ref='Help.aspx?p=6/6.12.htm' />\
            <n txt='6.13. Настройка интервалов интегрирования для расчетов на стационарные случайные возде' ref='Help.aspx?p=6/6.13.htm' />\
            <n txt='6.14. Определение расчетных длин балочных элементов' ref='Help.aspx?p=6/6.14.htm' />\
        </n>\
        \
        <n txt='7. Табличный редактор' ref='Help.aspx?p=7/7.0.htm'>\
            <n txt='7.1. Координаты узлов' ref='Help.aspx?p=7/7.1.htm' />\
            <n txt='7.2. Описание структуры' ref='Help.aspx?p=7/7.2.htm' />\
            <n txt='7.3. Ортогональные связи' ref='Help.aspx?p=7/7.3.htm' />\
            <n txt='7.4. Неортогональные связи' ref='Help.aspx?p=7/7.4.htm' />\
            <n txt='7.5. Конечные элементы' ref='Help.aspx?p=7/7.5.htm' />\
            <n txt='7.6. Материалы' ref='Help.aspx?p=7/7.6.htm' />\
            <n txt='7.7. Параметрическая нагрузка' ref='Help.aspx?p=7/7.7.htm' />\
            <n txt='7.8. Статические узловые нагрузки' ref='Help.aspx?p=7/7.8.htm' />\
            <n txt='7.9. Статические местные нагрузки' ref='Help.aspx?p=7/7.9.htm' />\
            <n txt='7.10. Динамические узловые нагрузки' ref='Help.aspx?p=7/7.10.htm' />\
            <n txt='7.11. Частоты гармонических воздействий' ref='Help.aspx?p=7/7.11.htm' />\
            <n txt='7.12. Стационарное случайное воздействие' ref='Help.aspx?p=7/7.12.htm' />\
            <n txt='7.13. Частотные интервалы' ref='Help.aspx?p=7/7.13.htm' />\
            <n txt='7.14. Произвольные динамические воздействия' ref='Help.aspx?p=7/7.14.htm' />\
            <n txt='7.15. Нагрузка произвольного динамического воздействия' ref='Help.aspx?p=7/7.15.htm' />\
            <n txt='7.16. Статические начальные условия' ref='Help.aspx?p=7/7.16.htm' />\
            <n txt='7.17. Динамические начальные условия' ref='Help.aspx?p=7/7.17.htm' />\
            <n txt='7.18. Коэффициент внутреннего неупругого сопротивления' ref='Help.aspx?p=7/7.18.htm' />\
            <n txt='7.19. Сейсмика' ref='Help.aspx?p=7/7.19.htm' />\
            <n txt='7.20. Пульсационный ветер' ref='Help.aspx?p=7/7.20.htm' />\
            <n txt='7.21. Маршруты накатки линий влияния' ref='Help.aspx?p=7/7.21.htm' />\
            <n txt='7.22. Подвижная нагрузка' ref='Help.aspx?p=7/7.22.htm' />\
            <n txt='7.23. Подвижное динамическое воздействие' ref='Help.aspx?p=7/7.23.htm' />\
            <n txt='7.24. Граф комбинаций' ref='Help.aspx?p=7/7.24.htm' />\
            <n txt='7.25. Заказы комбинаций' ref='Help.aspx?p=7/7.25.htm' />\
            <n txt='7.26. Установки вантовых элементов' ref='Help.aspx?p=7/7.26.htm' />\
        </n>\
        \
        <n txt='8. База данных материалов' ref='Help.aspx?p=8/8.0.htm'>\
            <n txt='8.1. Создание новой базы материалов' ref='Help.aspx?p=8/8.1.htm' />\
            <n txt='8.2. Открытие существующей базы материалов' ref='Help.aspx?p=8/8.2.htm' />\
            <n txt='8.3. Редактирование базы материалов' ref='Help.aspx?p=8/8.3.htm' />\
        </n>\
        \
        <n txt='9. Комбинации' ref='Help.aspx?p=9/9.0.htm'>\
            <n txt='9.1. Граф сочетаний' ref='Help.aspx?p=9/9.1/9.1.0.htm' >\
                <n txt='9.1.1. Формирование графа сочетаний' ref='Help.aspx?p=9/9.1/9.1.1.htm' />\
                <n txt='9.1.2. Параметрический граф сочетаний' ref='Help.aspx?p=9/9.1/9.1.2.htm' />\
                <n txt='9.1.3. Стандартные графы сочетаний' ref='Help.aspx?p=9/9.1/9.1.3.htm' />\
            </n>\
            <n txt='9.2. Заказ комбинаций' ref='Help.aspx?p=9/9.2.htm' />\
            <n txt='9.3. Графический редактор режима Комбинации' ref='Help.aspx?p=9/9.3/9.3.0.htm' >\
                <n txt='9.3.1. Отображение графов сочетаний' ref='Help.aspx?p=9/9.3/9.3.1.htm' />\
                <n txt='9.3.2. Элементы управления заказами комбинаций' ref='Help.aspx?p=9/9.3/9.3.2/9.3.2.0.htm' >\
                    <n txt='9.3.2.1. Подготовка заказов комбинаций' ref='Help.aspx?p=9/9.3/9.3.2/9.3.2.1.htm' />\
                    <n txt='9.3.2.2. Создание нового заказа комбинаций' ref='Help.aspx?p=9/9.3/9.3.2/9.3.2.2.htm' />\
                    <n txt='9.3.2.3. Удаление существующего заказа комбинаций' ref='Help.aspx?p=9/9.3/9.3.2/9.3.2.3.htm' />\
                    <n txt='9.3.2.4. Переключение заказов комбинаций' ref='Help.aspx?p=9/9.3/9.3.2/9.3.2.4.htm' />\
                </n>\
                <n txt='9.3.3. Расчет комбинаций и анализ результатов' ref='Help.aspx?p=9/9.3/9.3.3.htm' />\
                <n txt='9.3.4. Печать результатов' ref='Help.aspx?p=9/9.3/9.3.4.htm' />\
            </n>\
        </n>\
        \
        <n txt='10. Проверка и подбор сечений' ref='Help.aspx?p=10/10.0.htm'>\
            <n txt='10.1. Редактор режима проверки и подбора сечений' ref='Help.aspx?p=10/10.1/10.1.0.htm' >\
                <n txt='10.1.1. Переназначение сечений' ref='Help.aspx?p=10/10.1/10.1.1.htm' />\
                <n txt='10.1.2. Проверка и подбор сечений' ref='Help.aspx?p=10/10.1/10.1.2.htm' />\
                <n txt='10.1.3. Унификация' ref='Help.aspx?p=10/10.1/10.1.3.htm' />\
                <n txt='10.1.4. Включение модифицированных сечений в расчет' ref='Help.aspx?p=10/10.1/10.1.4.htm' />\
            </n>\
            <n txt='10.2. Проверка сечений стержневых элементов по нормам СНиП II-23-81 - Стальные конструкции' ref='Help.aspx?p=10/10.2/10.2.0.htm' >\
                <n txt='10.2.1. Установка параметров звдачи' ref='Help.aspx?p=10/10.2/10.2.1.htm' />\
                <n txt='10.2.2. Установка параметров элемента' ref='Help.aspx?p=10/10.2/10.2.2.htm' />\
                <n txt='10.2.3. Прототипы сечений' ref='Help.aspx?p=10/10.2/10.2.3.htm' />\
            </n>\
        </n>\
        \
        <n txt='11. Расчет железобетонных конструкций.' ref='Help.aspx?p=11.htm' />\
        <n txt='12. Формирование отчета' ref='Help.aspx?p=12/12.0.htm' >\
            <n txt='12.1. Распечатка результатов расчета' ref='Help.aspx?p=12/12.1.htm' />\
            <n txt='12.2. Редактирование отчета' ref='Help.aspx?p=12/12.2.htm' />\
            <n txt='12.3. Редактирование отчета в Excel' ref='Help.aspx?p=12/12.3.htm' />\
        </n>\
        \
        <n txt='13. Калькулятор системы' ref='Help.aspx?p=13.htm' />\
        <n txt='14. Работа с демонстрационной версией' ref='Help.aspx?p=14.htm' />\
        \
        <n txt='15. Примеры расчета' ref='Help.aspx?p=15/15.0.htm' >\
            <n txt='15.1. Frame' ref='Help.aspx?p=15/15.1.htm' />\
            <n txt='15.2. Plate' ref='Help.aspx?p=15/15.2.htm' />\
            <n txt='15.3. Concentrator' ref='Help.aspx?p=15/15.3.htm' />\
            <n txt='15.4. Frame Buckling' ref='Help.aspx?p=15/15.4.htm' />\
            <n txt='15.5. Wind' ref='Help.aspx?p=15/15.5.htm' />\
            <n txt='15.6. Seismic' ref='Help.aspx?p=15/15.6.htm' />\
            <n txt='15.7. Absorber' ref='Help.aspx?p=15/15.7.htm' />\
            <n txt='15.8. Movable' ref='Help.aspx?p=15/15.8.htm' />\
            <n txt='15.9. Конический бункер' ref='Help.aspx?p=15/15.9.htm' />\
        </n>\
    </n>");

    $('#helpmenu').html(d.toString()); //Now we use html code for SEO
});
