<!--
var url =  "http://e-dag.ru/"

var CGI_BIN=url+"cgi-bin/"

var tm
var MENUCOLOR='87ABC3'//'5689C2'//'4279B7'
var BTCOLOR='80A0C0'
var BLCOLOR='80A0C0'

function out(){smenu.style.visibility="hidden"}
function sl(){if(tm) clearTimeout(tm); event.srcElement.className = 'bevel'}
function ds(){event.srcElement.className = 'nobevel'; tm = setTimeout("out()",300) }
function dat(){
var dtime = new Date();
date.innerText = dtime.toLocaleString();
setTimeout("dat()",1000);
}

function slct() {
obj = event.srcElement;
var caption = obj.innerText.substring(1,obj.innerText.length -1);
for(var i in menus) {
    if (caption == menus[i][0]) {dsp(menus[i][1]); return}
    for (var j in smenus[i]) if (caption == smenus[i][j][0]) {dsp(smenus[i][j][1]); return}
  }
}

function dsp(path) { out(); if (path=="") content.innerHTML = "<h1 style='margin-top: 20; margin-right: 10; line-height: 20pt; text-align: center'><i>Извините, но страница еще не закончена :(</i></h1>"; else { document.location = url+path; }}

function init() { inp.src = path;	menu(); content.innerHTML = cnt;}

function menu() {
  txt ='<link REL="stylesheet" TYPE="text/css" HREF="'+url+'styles/main.css"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><img src="'+url+'images/title.gif" width="340" height="59" alt="Республика Дагестан"></td><td>&nbsp</td><td></td><td><a href=" '+url+'iao/default.htm#1"><img src=" '+url+'images/bldtop.jpg" width="150" height="60" align="right" border="none"></a></td></tr><tr><td style="color: #FFFFFF; font-weight:bold; margin-left: 50; margin-bottom: 5">ОФИЦИАЛЬНЫЙ САЙТ ПРАВИТЕЛЬСТВА</td><td></td><td>&nbsp</td><td><img src="'+url+'images/bldbtn.jpg" width="150" height="25" align="right"></td></tr></table>';
  txt+= '<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td>';	
  txt += "<div><table style='z-index : 10' cellpadding='0' cellspacing='0' style='background-color: #A0C0D0; border: 0;' ><tr>";
  for(i in menus) {txt += "<td  class = 'nobevel'  onmouseover='sl();smen()' onclick= 'slct()' onmouseout='ds()'>&nbsp"+menus[i][0] + "&nbsp</td>"}
  txt += "</tr></table></div></td><td id='date' style='color: #FFFFFF; font-weight: bold; text-align: right'></td></tr></table><div id='smenu' visibility = 'hidden'></div>";
  setTimeout("dat()",1);  
  document.write(txt);
}


function smen()
{
   var obj = event.srcElement;
   var num = obj.cellIndex;
   smenu.style.cssText = "position: absolute; background-color: #A0C0D0;  top:" +obj.offsetBottom+"; left: "+obj.offsetLeft+"; height: 10; border-right: #000000 3px solid; border-bottom: #000000 3px solid; border-top: #7090A0 1px solid; border-left: #7090A0 1px solid; cursor: hand";
   smenu.innerHTML = "<p><table border='0' cellspacing='0' cellpadding='0'>";   
   for (i in smenus[num]) 
         {smenu.innerHTML += "<tr><td class='nobevel' style='text-align: left' onmouseover='sl()' onclick= 'slct()' onmouseout='ds()'>&nbsp"+smenus[num][i][0]+"&nbsp</td></tr>";}  
   smenu.innerHTML += "</table><p>";   
if (smenus[num][0][0] == "") smenu.style.visibility = "hidden"; else {smenu.style.visibility = "visible"; smenu.style.zIndex = "5"}
}

function scrl() {lmenu.style.visibility = "hidden"; var a = document.body.scrollTop - 110; if (a < 0) lmenu.style.top = document.body.scrollTop; else lmenu.style.top = a; lmenu.style.visibility = "visible"}

function vmenus() {
   var str = '<div id="lmenu" style="position: relative; left: 5; z-index: 2; width: 95%"><ul>';
   for (var i in vmen) {
        if (vmen[i][1]=="1") str += '<p>&nbsp;</p><p style="color: #FFFFFF">' + vmen[i][0] + '</p><p>&nbsp;</p>'; 
        else str += '<li class="lt"><a href="' +vmen[i][2]+ '" class="lt">'+vmen[i][0] +'</a></li>';
   }
   str += '</ul></div>'
   vmenu.innerHTML = str;
}
//-->