var total=1;
var db = new Array();
// -- Enter Values Here --
// Format: dbAdd(parent[true|false] , description, URL [blank for nohref], level , TARGET [blank for "content"], new? [1=yes])
dbAdd( false , "Главная" , "index.shtml" , 0 , "" , 0)
dbAdd( true , "О нас" , "" , 0 , "" , 0)
dbAdd( false , "Положение" , "pologenie.shtml" , 1 , "" , 0)
dbAdd( false , "История" , "history.shtml" , 1 , "" , 0)
dbAdd( false , "Структура" , "struktura.shtml" , 1 , "" , 0)
dbAdd( false , "Адрес и реквизиты" , "rekvizit.shtml" , 1 , "" , 0)
dbAdd( false , "Перечень(план) статистических работ Росстата на 2008-2010 годы" , "http://www.gks.ru/metod/fpl08-10.html" , 1 , "" , 0)
// dbAdd( false , "Статистика посещений" , "stat" , 1 , "" , 0)
dbAdd( true , "Информация для предприятий" , "" , 0 , "" , 0)
dbAdd( false , "Формы федерального государственного стат. наблюдения" , "http://www.gks.ru/metod/forma.html" , 1 , "" , 0)
dbAdd( false , "Бухгалтерская отчетность" , "bux_otch.shtml" , 1 , "" , 0)
dbAdd( true , "Официальная статинформация" , "" , 0 , "" , 0)
dbAdd( false , "Каталог изданий и инф.услуг в целом по Воронежской области" , "_katalog_obl.shtml" , 1 , "" , 0)
dbAdd( false , "Каталог изданий и инф.услуг по районам и городским округам г.Воронежа" , "_katalog_ray.shtml" , 1 , "" , 0)
dbAdd( false , "Социально-экономическое положение Воронежской области" , "sozial-ec.shtml" , 1 , "" , 0)
dbAdd( true , "Наши издания" , "" , 0 , "" , 0)
dbAdd( false , "Доклады" , "doklad.shtml" , 1 , "" , 0)
dbAdd( false , "Сборники" , "sbornik.shtml" , 1 , "" , 0)
dbAdd( false , "Бюллетени" , "bulleten.shtml" , 1 , "" , 0)
dbAdd( false , "Списки" , "spiski.shtml" , 1 , "" , 0)
dbAdd( false , "Аналитические записки" , "an_zap.shtml" , 1 , "" , 0)
dbAdd( false , "Территориальные органы статистики" , "http://www.gks.ru/committee/default.asp" , 0 , "" , 0)
dbAdd( false , "Базы данных" , "bd.shtml" , 0 , "" , 0)
dbAdd( false , "Услуги" , "uslugi.shtml" , 0 , "" , 0)
dbAdd( false , "Гостевая книга" , "http://web.vrn.ru/cgi-bin/gbook?book=FSSVO&act=view", 0 , "" , 0)
// Get current cookie setting
var current=getCurrState()
function getCurrState() {
var label = "currState="
var labelLen = label.length
var cLen = document.cookie.length
var i = 0
while (i < cLen) {
var j = i + labelLen
if (document.cookie.substring(i,j) == label) {
var cEnd = document.cookie.indexOf(";",j)
if (cEnd == -1) { cEnd = document.cookie.length }
return unescape(document.cookie.substring(j,cEnd))
}
i++
}
return ""
}
// Add an entry to the database
function dbAdd(mother,display,URL,indent,top,newitem) {
db[total] = new Object;
db[total].mother = mother
db[total].display = display
db[total].URL = URL
db[total].indent = indent
db[total].top = top
db[total].newitem = newitem
total++
}
// Record current settings in cookie
function setCurrState(setting) {
var expire = new Date();
expire.setTime(expire.getTime() + ( 7*24*60*60*1000 ) ); // expire in 1 week
document.cookie = "currState=" + escape(setting) + "; expires=" + expire.toGMTString();
}
// toggles an outline mother entry, storing new value in the cookie
function toggle(n) {
if (n != 0) {
var newString = ""
var expanded = current.substring(n-1,n) // of clicked item
newString += current.substring(0,n-1)
newString += expanded ^ 1 // Bitwise XOR clicked item
newString += current.substring(n,current.length)
setCurrState(newString) // write new state back to cookie
}
}
// returns padded spaces (in mulTIPles of 2) for indenting
function pad(n) {
var result = ""
for (var i = 1; i <= n; i++) { result += " " }
return result
}
// Expand everything
function explode() {
current = "";
initState="";
for (var i = 1; i < db.length; i++) {
initState += "1"
current += "1"
}
setCurrState(initState);
history.go(0);
}
// Collapse everything
function contract() {
current = "";
initState="";
for (var i = 1; i < db.length; i++) {
initState += "0"
current += "0"
}
setCurrState(initState);
history.go(0);
}
function tree_close() {
window.parent.location = window.parent.content.location;
}
// end -->
// Set the initial state if no current state or length changed
if (current == "" || current.length != (db.length-1)) {
current = ""
initState = ""
for (i = 1; i < db.length; i++) {
initState += "0"
current += "0"
}
setCurrState(initState)
}
var prevIndentDisplayed = 0
var showMyDaughter = 0
// end -->
var Outline=""
// cycle through each entry in the outline array
for (var i = 1; i < db.length; i++) {
var currIndent = db[i].indent // get the indent level
var expanded = current.substring(i-1,i) // current state
var top = db[i].top
if (top == "")// { top="content" } // если снять коментарий то будет ссылка в новом окне
// display entry only if it meets one of three criteria
if ((currIndent == 0 || currIndent <= prevIndentDisplayed || (showMyDaughter == 1 && (currIndent - prevIndentDisplayed == 1)))) {
Outline += pad(currIndent)
// Insert the appropriate GIF and HREF
newitem = "";
if (db[i].newitem) { newitem="_new"; }
if (!(db[i].mother)) {
Outline += ""
}
else {
if (current.substring(i-1,i) == 1) {
Outline += ""
Outline += ""
Outline += ""
}
else {
Outline += ""
Outline += ""
Outline += ""
}
}
Outline += " ";
if (db[i].URL == "" || db[i].URL == null) {
Outline += " " + db[i].display // no link, just a listed item
}
else {
Outline += " " + db[i].display + ""
}
// Bold if at level 0
if (currIndent == 0) {
Outline = "" + Outline + ""
}
Outline += "
"
prevIndentDisplayed = currIndent
showMyDaughter = expanded
// if (i == 1) { Outline = ""}
if (db.length > 25) {
document.write(Outline)
Outline = ""
}
}
}
document.write(Outline)
// end -->