////////////////////////////////////////////////   SCROLL VERTIKAL	/////////////////////////////////////////////////////////////  


 var gTop=0;
  var gIncVal=0;
  function scrollMe(arg)
  {    
    var objEncNav=document.getElementById('encNav');
    var scrollAmount=150;
    var objEncNavHeight=parseInt(objEncNav.offsetHeight);
    var objEncNavTop=objEncNav.style.top;
    var barHeight=300;
    if(!objEncNavTop)
      objEncNavTop=0;
    else
      objEncNavTop=objEncNavTop.substring(0,objEncNavTop.length-2);
      
    if(arg>0)
    {
      if(objEncNavTop>=0 || objEncNavTop>(-(objEncNavHeight-(barHeight+scrollAmount))))
      {
        incrementValue=scrollAmount;
      }
      else if(objEncNavTop<(-(objEncNavHeight-(barHeight+scrollAmount))))
      {
        incrementValue=(objEncNavHeight-barHeight)+parseInt(objEncNavTop);
      }
      else
      {
        incrementValue=0;
      }
      encSmoothScroll("minus", parseInt(objEncNavTop), parseInt(incrementValue));
    }
    else
    {
      if(objEncNavTop<0 && ((parseInt(objEncNavTop)+scrollAmount) < 0))
      {
        incrementValue=scrollAmount;
      }
      else
      {
        incrementValue=-objEncNavTop-0;     
      }
      encSmoothScroll("plus", parseInt(objEncNavTop), parseInt(incrementValue));
    }
  }
  function encSmoothScroll(dir, currentVal, incValue)
  {
    gTop=currentVal;
    gIncVal=incValue;
    encScrollBy(dir, 0)
  }
  function encScrollBy(dir, val)
  { 
    if(val<gIncVal)
    {
      var tmpInc;      
      if((gIncVal-val)>1)      
      {
        tmpInc=Math.ceil((gIncVal-val)/10);
        if(tmpInc <1)
          tmpInc=1;
      }
      else
      {
        tmpInc=gIncVal-val;
      }
      
      val+=tmpInc;
           
      
      var objEncNav=document.getElementById('encNav');
      if(dir=="plus")
      {
        objEncNav.style.top=gTop+val+"px";
      }
      else if(dir=="minus")
      {
        objEncNav.style.top=gTop-val+"px";
      }
      var t=setTimeout("encScrollBy('"+dir+"', "+val+");", 10);
    }
    else
    {
      clearTimeout(t);
    }
  }
 
////////////////////////////////////////////////   SCROLL HORIZONTAL	/////////////////////////////////////////////////////////////  

  var gLeft=0;
  var gIncVal=0;
  function scrollMe2(arg)
  {    
    var objHorNav=document.getElementById('horNav');
    var scrollAmount=229;
    var objHorNavWidth=parseInt(objHorNav.offsetWidth);
    var objHorNavLeft=objHorNav.style.left;
    var barWidth=435;
    if(!objHorNavLeft)
      objHorNavLeft=0;
    else
      objHorNavLeft=objHorNavLeft.substring(0,objHorNavLeft.length-2);
      
    if(arg>0)
    {
      if(objHorNavLeft>=0 || objHorNavLeft>(-(objHorNavWidth-(barWidth+scrollAmount))))
      {
        incrementValue=scrollAmount;
      }
      else if(objHorNavLeft<(-(objHorNavWidth-(barWidth+scrollAmount))))
      {
        incrementValue=(objHorNavWidth-barWidth)+parseInt(objHorNavLeft);
      }
      else
      {
        incrementValue=0;
      }
      horSmoothScroll("minus", parseInt(objHorNavLeft), parseInt(incrementValue));
    }
    else
    {
      if(objHorNavLeft<0 && ((parseInt(objHorNavLeft)+scrollAmount) < 0))
      {
        incrementValue=scrollAmount;
      }
      else
      {
        incrementValue=-objHorNavLeft-0;     
      }
      horSmoothScroll("plus", parseInt(objHorNavLeft), parseInt(incrementValue));
    }
  }
  function horSmoothScroll(dir, currentVal, incValue)
  {
    gLeft=currentVal;
    gIncVal=incValue;
    horScrollBy(dir, 0)
  }
  function horScrollBy(dir, val)
  { 
    if(val<gIncVal)
    {
      var tmpInc;      
      if((gIncVal-val)>1)      
      {
        tmpInc=Math.ceil((gIncVal-val)/10);
        if(tmpInc <1)
          tmpInc=1;
      }
      else
      {
        tmpInc=gIncVal-val;
      }
      
      val+=tmpInc;
           
      
      var objHorNav=document.getElementById('horNav');
      if(dir=="plus")
      {
        objHorNav.style.left=gLeft+val+"px";
      }
      else if(dir=="minus")
      {
        objHorNav.style.left=gLeft-val+"px";
      }
      var t=setTimeout("horScrollBy('"+dir+"', "+val+");", 10);
    }
    else
    {
      clearTimeout(t);
    }
  }
  
  
////////////////////////////////////////////////   SHOW LAYER	/////////////////////////////////////////////////////////////  


function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }}

