//---------------------------------------------------
// Design & copyright © 2006-2008 by МР Пластилин
// Мастерская рекламы Пластилин
// mail@mrplastilin.ru
// автор Онищенко Ю. Н.
//---------------------------------------------------

// body onload
//
/*
startList = function allclose() {
for (i=0; i < id_menu.length; i++){
     document.getElementById(id_menu[i]).style.display = "none" ;  //
     }
}

window.onload = startList;
*/

//============







function openMenu(id){
for (i=0; i < id_menu.length; i++){
    if (id != id_menu[i]){
        //document.getElementById(id_menu[i]).style.display = "none";
       }
}
if (document.getElementById(id).style.display == "none"){
        document.getElementById(id).style.display = "";
}else{
        document.getElementById(id).style.display = "none";
       }
} // функция, меняющая свойства CSS display.




function allclose(noclosemenu)
{
   for (i=0; i < id_menu.length; i++)
   {
     if((noclosemenu-1)!=i)
     {
       document.getElementById(id_menu[i]).style.display = "none" ;  //
     }
   }

   // подсветка
   for (var i = 0; i < document.links.length; i++)
   {
     if(document.links[i].href == window.location)
      {
        document.links[i].href = '#';
        document.links[i].style.color = '#007CC2';
        //document.links[i].title='Текущая страница';
        document.links[i].innerHTML = '<b>'+ document.links[i].innerHTML +'</b>';
      }
   }
}






// показать статистику
function showc() {
var st = document.getElementById('st');

if (st.style.position !='relative')
 {
  st.style.visibility = 'visible';
  st.style.height = '246';  // 184 215 246 высота
  st.style.left = '0';
  st.style.position = 'relative';
  st.style.top = '0';
  st.style.width = '120';
 } else {
  st.style.visibility = 'hidden';
  st.style.height = '0';
  st.style.left = '-1000';
  st.style.position = 'absolute';
  st.style.top = '-1000';
  st.style.width = '0';
 }
return false;
}


function opwin(u)
{
var myhtml = "<!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN\">\r\n"+
"<html><head><title>Просмотр<\/title>\r\n"+
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1251\">\r\n"+
"<script language=\"javascript\" type=\"text\/javascript\">\r\n"+
"self.menubar.visible=false;self.toolbar.visible=false;self.locationbar.visible=false;self.personalbar.visible=false;self.scrollbars.visible=false;self.statusbar.visible=false;"+
"function winit()\r\n"+
"{\r\n"+
"  document.getElementById(\"waitlayer\").style.visibility = \"hidden\";\r\n"+
"  var myimage = document.getElementById('image1');\r\n"+
"  var iheight = myimage.height + 110;\r\n"+
"  var iwidth  = myimage.width + 40;\r\n"+
"  var newT = Math.round(screen.width\/2 - iwidth\/2);\r\n"+
"  var newL = Math.round(screen.height\/2 - iheight\/2);\r\n"+
"  if (newT < 0) newT = 0;if (newL < 0) newL = 0;\r\n"+
"  window.resizeTo(iwidth,iheight);\r\n"+
"  window.moveTo(newT,newL);\r\n"+
"}\r\n"+
"<\/script>\r\n"+
"<\/head>\r\n"+
"<body onload=\"winit()\">\r\n"+
"<DIV id=waitlayer style=\"HEIGHT: 50px; LEFT: 3px; POSITION: absolute; TOP: 4px; WIDTH: 220px; Z-INDEX: 1;font-size:18px;font-family:arial;background-color:white;\">Загрузка изображения<br><MARQUEE> . . . </MARQUEE><br><br></DIV>\r\n"+
"<div align=\"center\"><img id=\"image1\" src=\"" + u + "\" onload=\"winit()\" onDblClick=\"window.close()\" alt=\" Double click = close window \r\n Двойной клик = закрыть окно \"><br><br>\r\n"+
"<img src=\"/counters/1/counter.php\" width=\"88\" height=\"31\" alt=\"\" border=\"0\">\r\n"+
"</div>\r\n<\/body>\r\n<\/html>";
myname = window.open('','myname','toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=yes, width=200, height=20');
myname.document.open();
myname.document.write(myhtml);
myname.document.close();
myname.window.focus();
}

