function fixPNG(element)
{
  //Если браузер IE версии 5.5-6
  if (/MSIE (5\.5|6).+Win/.test(navigator.userAgent))
  {
    var src;

    if (element.tagName=='IMG') //Если текущий элемент картинка (тэг IMG)
    {
      if (/\.png$/.test(element.src)) //Если файл картинки имеет расширение PNG
      {
        src = element.src;
        element.src = "/images/blank.gif"; //заменяем изображение прозрачным gif-ом
      }
    }
    else //иначе, если это не картинка а другой элемент
    {
	  //если у элемента задана фоновая картинка, то присваеваем значение свойства background-шmage переменной src
      src = element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i);
      if (src)
      {
        src = src[1]; //берем из значения свойства background-шmage только адрес картинки
        element.runtimeStyle.backgroundImage="none"; //убираем фоновое изображение
      }
    }
    //если, src не пуст, то нужно загрузить изображение с помощью фильтра AlphaImageLoader
    if (src) element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
  }
}

   var ttInterval;
   var pressed = 0;

   function scup() {
      ttInterval = window.setInterval('scrollup()', 5);
   }
   function scdw() {
      ttInterval = window.setInterval('scrolldown()', 5);
   }
   function scrollup() {
       var k = document.getElementById ? document.getElementById("p") : document.all.p
       var t = k.style.top ? parseInt(k.style.top) + 1*(pressed*6+1) : 0;
       if(t<0) k.style.top = t;
   }
   function scrolldown() {
       var k = document.getElementById ? document.getElementById("p") : document.all.p
       var t = k.style.top ? parseInt(k.style.top) - 1*(pressed*6+1) : 0;
       if (t + contentheight > boxheight) k.style.top = t;
   }

   iens6=document.all||document.getElementById
   ns4=document.layers
   contentheight = 0
   contentheight2 = 0

   function getcontent_height() {
     if (iens6) {
       var crossobj = document.getElementById ? document.getElementById("p") : document.all.p
       contentheight=crossobj.offsetHeight
       crossobj = document.getElementById ? document.getElementById("box") : document.all.box
       boxheight=crossobj.offsetHeight
       if(contentheight < boxheight) {
           var s = document.getElementById ? document.getElementById("scroll1") : document.all.p
           s.style.display = 'none'
           s = document.getElementById ? document.getElementById("scroll2") : document.all.p
           s.style.display = 'none'
       }
     }
     if (iens6) {
       var crossobj2 = document.getElementById ? document.getElementById("p2") : document.all.p2
       contentheight2=crossobj2.offsetHeight
       crossobj2 = document.getElementById ? document.getElementById("box2") : document.all.box2
       boxheight2=crossobj2.offsetHeight
       if(contentheight2 < boxheight2) {
           var s2 = document.getElementById ? document.getElementById("scroll12") : document.all.p2
           s2.style.display = 'none'
           s2 = document.getElementById ? document.getElementById("scroll22") : document.all.p2
           s2.style.display = 'none'
       }
     }
   }


   var ttInterval2;
   var pressed2 = 0;

   function scup2() {
      ttInterval2 = window.setInterval('scrollup2()', 5);
   }
   function scdw2() {
      ttInterval2 = window.setInterval('scrolldown2()', 5);
   }
   function scrollup2() {
       var k2 = document.getElementById ? document.getElementById("p2") : document.all.p2
       var t2 = k2.style.top ? parseInt(k2.style.top) + 1*(pressed2*6+1) : 0;
       if(t2<0) k2.style.top = t2;
   }
   function scrolldown2() {
       var k2 = document.getElementById ? document.getElementById("p2") : document.all.p2
       var t2 = k2.style.top ? parseInt(k2.style.top) - 1*(pressed2*6+1) : 0;
       if (t2 + contentheight2 > boxheight2) k2.style.top = t2;
   }

   window.onload=getcontent_height;