// Скрипт создан Семищенко С.А. (http://www.isety.net), все права принадлежат ему.

//Начальные настройки
var Butlef = new Image()
Butlef.src = "http://www.isety.net/grafics/Butlef.jpg" //Указатель подменю вне документа
var Butdow = new Image()
Butdow.src = "http://www.isety.net/grafics/Butdow.jpg" //Указатель подменю в документе

var InMnu=0
var FUNC=""
var ChMnu
var YesDop=false
var DTime=0
var AlErr=0

//Общий стиль
document.writeln('<style type="text/css">')
// document.writeln('A {font-family:Arial;font-size:10pt}')
document.writeln('A:LINK {text-decoration:underline}')
document.writeln('A:VISITED {text-decoration:underline}')
document.writeln('A:ACTIVE {text-decoration:none;color:red}')
document.writeln('A:HOVER {text-decoration:none;color:FF8040}')

document.writeln('H1 {width:100%;text-align:center;font-size:30pt;font-weight:bold;color:008000;filter:dropshadow(color="c0c0c0",offx=-5,offy=-5)}')
document.writeln('H2 {width:100%;text-align:center;font-size:24pt;font-weight:bold;color:00BF00;filter:dropshadow(color="c0c0c0",offx=-5,offy=-5)}')
document.writeln('H3 {width:100%;text-align:center;font-size:18pt;font-weight:bold;color:22FF22;filter:dropshadow(color="c0c0c0",offx=-5,offy=-5)}')
document.writeln('H4 {width:100%;text-align:center;font-size:16pt;font-weight:bold;color:0000A0;filter:dropshadow(color="c0c0c0",offx=-5,offy=-5)}')
document.writeln('SAMP {font-size:12pt;color:004080;font-style:italic}')
document.writeln('CITE {color:red}')
document.writeln('CAPTION {width:100%;text-align:center;font-size:14pt;font-weight:bold;color:0000A0;filter:dropshadow(color="c0c0c0",offx=-5,offy=-5)}')
document.writeln('.d1 {border-style:inset;border-color:blue;border-width:3px;padding:5px;margin:5px;margin-left:31px}')
document.writeln('.d2 {border-style:inset;border-color:blue;border-width:5px;padding:5px;margin:5px;margin-left:31px}')
document.writeln('.d3 {border-style:inset;border-color:blue;border-width:7px;padding:5px;margin:5px;margin-left:31px;background-image:url("http://www.isety.net/grafics/p.gif")}')
document.writeln('.t1 {border-style:inset;border-color:blue;border-width:3px;padding:5px;margin-left:5px;margin-bottom:15px;width:-5%}')
document.writeln('.t2 {border-style:inset;border-color:blue;border-width:3px;padding:5px;margin:5px;width:-5%}')
document.writeln('.mn1 {border-style:none}')
document.writeln('TD {border-style:solid;border-color:blue;border-width:1px}')
document.writeln('TH {background-color:00FFFF;border-color:000000;border-width:2px;font-weight:normal;text-align:left}')
document.writeln('</style>')

//Посвящение
document.write('<div id="Dima" style="position:absolute;left:5;top:70;filter:revealtrans"><img id="DimaI" style="position:absolute;visibility:hidden;filter:revealtrans" src="http://www.isety.net/grafics/Dima.gif"></div>')
//Стрелка вверх
document.write('<a href="#top" title="наверх" style="position:absolute;top:0;left:0" id="UpH"><img src="http://www.isety.net/grafics/top-db.gif" border="0"></a>')
window.onscroll()

setTimeout("bbg()",1);

function modTime() {
// Дата изменения документа

var Dt=document.lastModified
var Dta=new Array()
Dta=Dt.split("/")
document.write('Изменен: ' + Dta[1] + "." + Dta[0] + "." + Dta[2] + ' С.А.Семищенко')
}

function bbg() {
  tdt = new Date()
  tmid = tdt.getMonth()
  if (tmid==11 || tmid==0) {
    document.body.background="http://isety.net/grafics/isetysnow.jpg"
  }
}

function DynFilterOn () {
  DimaI.filters(0).Apply()
  DimaI.style.visibility="visible"
  DimaI.filters(0).Transition=23
  DimaI.filters(0).play(2)
}

function DynFilterOff () {
  DimaI.filters(0).Apply()
  DimaI.style.visibility="visible"
  DimaI.style.visibility="hidden"
  DimaI.filters(0).play(2)
}

function window.onload() {
//  top.document.title=document.title
   DynFilterOn()
   setTimeout("DynFilterOff()",10000)
}

function ifNoFrames() {
// Проверка, загружено-ли меню

var t=0;
}

function et() {
 InMnu=1

}

function clmnu() {

 if (InMnu==0) {
   document.all.Dop.style.display='none'
   clearInterval(ChMnu)
 }
 InMnu=0

}

function upsubmnu(IDVal) {

 if (InMnu==0) {
   document.all[IDVal+""].style.display='none'
   document.all[IDVal+"Main"].style.color='FFFFFF'
   FUNC=""
   clearInterval(ChMnu)
 }
 InMnu=0

}

function downsubmnu(IDVal) {

 if (FUNC!="") {
   InMnu=0
   eval(FUNC)
 }
 AllErr=1
 clearInterval(ChMnu)
 document.all[IDVal+"Main"].style.color='FF8040'
 document.all[IDVal+""].style.display=''
 FUNC="upsubmnu('"+IDVal+"')"
 ChMnu=setInterval(FUNC,3000)
 AllErr=0
 InMnu=1
}

function csubmnu(IDVal) {

 document.all[IDVal+""].style.display='none'
 document.all[IDVal+"Main"].style.color='FFFFFF'
 FUNC=""
 clearInterval(ChMnu)
 InMnu=0

}

function shmnu() {

 AllErr=1
 clearInterval(ChMnu)
 document.all.Dop.style.display=''

 ChMnu=setInterval("clmnu()",3000)
 AllErr=0

}

function SubMenuTShow(String) {
// Создает подменю, вызов: SubMenuShow("Имя пункта1;Описание пункта1;url(если на другой странице)1;Анкер(если есть с #)1")

 var Mnu=new Array

 Mnu=String.split(";;")
 var stri="",But
 for (var i=0; i<Mnu.length; i++) {
  if (!Mnu[i]) {Mnu[i]=""}

 }
 var Clk=""
 YesDop=true
 document.write('<a href="#" title="Меню" id="SpSc" style="position:absolute;top:10;left:3" onClick="return false" onMouseOver="shmnu()"><img src="http://www.isety.net/grafics/dop.gif" width="31" height="31" border="0"></a><div id="Dop" style="position:absolute;top:45;left:3;display:none" onMouseMove="et()"><table border="0" cellspacing="2">')
 for (var i=0; i<Mnu.length; i+=4) {
  if (Mnu[i+2]!="") {But=Butlef.src} else {But=Butdow.src}
  if (Mnu[i+2]=="#") {Clk=' onClick="' + Mnu[i+3] + '"';Mnu[i+3]=""}
  stri+='<tr><td align="center" bgcolor="#C0C0C0"><a href="'+Mnu[i+2]+Mnu[i+3]+'"'+Clk+'><img src="'+But+'"alt="'+Mnu[i+1]+'" border="0"></a></td><td align="center" bgcolor="#C0C0C0"><a href="'+Mnu[i+2]+Mnu[i+3]+'" title="'+Mnu[i+1]+'"'+Clk+'>'+Mnu[i]+'</a></td></tr>'

  Clk=""
 }
 document.write(stri+"</table></div>")

}

function window.onscroll() {
 AllErr=1
 document.all["UpH"].style.top = document.body.scrollTop+document.body.offsetHeight - 50
 document.all["UpH"].style.left = document.body.offsetWidth - 50
 if (YesDop) {

   if (DTime!=0) {clearInterval(DTime)}
   if (document.body.scrollTop > document.all.SpSc.style.posTop) {DTime=setInterval("shnip()",10)} else {DTime=setInterval("dshnip()",10)}

 }
AllErr=0
}

function shnip() {

   if (document.body.scrollTop-document.all.SpSc.style.posTop>1000) {var Plu=100} else {var Plu=5}
   document.all.SpSc.style.posTop += Plu
   document.all.Dop.style.posTop += Plu
   if (document.body.scrollTop < document.all.SpSc.style.posTop) {
      clearInterval(DTime)
      document.all.SpSc.style.posTop=document.body.scrollTop+10
      document.all.Dop.style.posTop=document.body.scrollTop+45
   }

}

function dshnip() {

   if (document.all.SpSc.style.posTop-document.body.scrollTop>1000) {var Plu=100} else {var Plu=5}
   document.all.SpSc.style.posTop -= Plu
   document.all.Dop.style.posTop -= Plu
   if (document.body.scrollTop > document.all.SpSc.style.posTop) {
      clearInterval(DTime)
      document.all.SpSc.style.posTop=document.body.scrollTop+10
      document.all.Dop.style.posTop=document.body.scrollTop+45
   }

}

function mailer (email) {
   email=replaceStr(email,"_a_","@")
   document.location.href="mailto:" + email
}

function replaceStr (string,f,r) {
 var i=string.indexOf(f),res="",j=0
 while (j>=0) {
  if (i==-1) {res+=string.substring(j);j=-1;break}
  res+=string.substring(j,i)+r
  j=i+f.length
  i=string.indexOf(f,i+1)

 }
 return res
}

function readCookie() {
   if (document.cookie.indexOf("NoRing=y") > -1) {
     return true;
   }
   return false;
}

function erazeCookie() {
   document.cookie="NoRing=n; expires=01-Jan-70 00:00:01 GMT; domain=isety.net";
}
