﻿function doNothing(){
status="";
return true};

window.onerror=doNothing;

function clearStatus(){
  status="";
  return
}

function mailStatus(mail){
  status='Отправить E-Mail на '+mail.innerHTML;
  return
}

function CloseAllStatus (){
  status='Сложить все вложения каталога'
  return
}

/* ----------------menu---------------*/
function click(i){
  i+="";
  var p="pm_"+i;
  if (document.getElementById(i).style.display=="inline" ){
    document.getElementById(i).style.display="none";
    document.getElementById(p).innerHTML="+";
/*    for (var j=0;j<top.catalog.length;j++){
      if (top.catalog[j]==i){
        top.catalog=top.catalog.slice(0,j).concat(top.catalog.slice(j+1));
        break;
      } 
    }
*/          
  }
  else {
    document.getElementById(i).style.display="inline";
    document.getElementById(p).innerHTML="-";
//    top.catalog[top.catalog.length]=i;
  }
  return
}

/*----------------------------------*/
function CloseAll (){
//  document.getElementById("LeftMenu").innerHTML=top.lm;
  document.getElementById('katalog').innerHTML=lm;
//  top.catalog.length=0;
  return
}

function Map(){
  open('map.htm','map','height=540,width=720,left=0,top=0,scrollbars=0,menubar');
  return
}

function Open(href,width,height,border){

  function WritetoWindow(){
    if(top.cat.document){
      top.cat.focus();
      top.cat.document.write('<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1251"><title></title></head><body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" bgcolor="#ffffff"><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0"><tr><td align="center"><img src="');
      top.cat.document.write(''+href+'" width="'+width+'" height="'+height+'"></td></tr></table></body></html>');
    }
    return;
  }
  if (top.catIsOpen == true){
    if (top.cat.closed == false){
      top.cat.close()
    }
  }
  var wwidth=width+border*2;
  var wheight=height+border*2;
  top.cat=open('','cat','width='+wwidth+', height='+wheight+', top=0, left=0');
  top.catIsOpen = true;
  setTimeout(WritetoWindow,500);
 
return;
}

function ModifyImg(ImgName,IDent1,IDent2)//смена значка кнопки
{
  document.getElementById(IDent1).src='images/'+ImgName;
  if ((IDent2) && (IDent2 != ''))
    document.getElementById(IDent2).src='images/'+ImgName;
  return;
}