var SelMnu=new Array('none','none');
var Item=0;

//Посвящение
document.write('<div id="Dima" style="position:absolute;left:10;top:10;filter:revealtrans"><img id="DimaI" style="position:absolute;visibility:hidden;filter:revealtrans" src="http://www.isety.net/i/Dima.gif"></div>')

function DynFilterOn () {
 if (DimaI.filters) {
  DimaI.filters(0).Apply()
  DimaI.style.visibility="visible"
  DimaI.filters(0).Transition=23
  DimaI.filters(0).play(2)
 } else {
  DimaI.style.visibility="visible"
 }
}

function DynFilterOff () {
 if (DimaI.filters) {
  DimaI.filters(0).Apply()
  DimaI.style.visibility="visible"
  DimaI.style.visibility="hidden"
  DimaI.filters(0).play(2)
 } else {
  DimaI.style.visibility="visible"
  DimaI.style.visibility="hidden"
 }
}

window.onload=function() {
//  top.document.title=document.title
   DynFilterOn()
   setTimeout("DynFilterOff()",15000)
}

function mailer (email) {
   email=replaceStr(email,"[J]","@")
   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 SlideMnu(id) {
   if (Item>0 && id.indexOf('_')<0) {
      ClearMnu();
	  SelMnu[Item]='none';
	  Item=0;
   }
   if (id.indexOf('_')>0) {
      if (Item==0) {
	     Item=1;
	  }
   }
   if (SelMnu[Item]!='none') {
       ClearMnu();
   }
   if (SelMnu[Item]==id) {
      SelMnu[Item]='none';
      return false;
   }
   if (document.getElementById('d'+id)) {
      document.getElementById('d'+id).style.display='block';
   }
   document.getElementById('m'+id).style.backgroundImage='url(i/on.jpg)';
   document.getElementById('m'+id).style.color='#0000FF';
   SelMnu[Item]=id;
   return false;
}

function ClearMnu() {
  if (SelMnu[Item]!='none') {
   if (document.getElementById('d'+SelMnu[Item])) {
      document.getElementById('d'+SelMnu[Item]).style.display='none';
   }
   document.getElementById('m'+SelMnu[Item]).style.backgroundImage='url(i/off.jpg)';
   document.getElementById('m'+SelMnu[Item]).style.color='#0080C0';
  }
}

function Select(id1,id2) {
   SlideMnu(id1);
   if (id2) {
      SlideMnu(id2);
   }
}

function OverMnu(id) {
   document.getElementById('m'+id).style.backgroundImage='url(i/offon.jpg)';
}

function OutMnu(id) {
  if (id==SelMnu[0] || id==SelMnu[1]) {
   document.getElementById('m'+id).style.backgroundImage='url(i/on.jpg)';
  } else {
   document.getElementById('m'+id).style.backgroundImage='url(i/off.jpg)';
  } 
}
