﻿// _bro: 1=NN6+, 2=NN4, 3=IE, 4=Opera, 0=others
_bro=(window.opera?4:(document.all?3:(document.getElementById?1:(document.layers?2:0))));
// _ie5: true=IE5+
_ie5=(navigator.appName.indexOf('Microsoft Internet Explorer')>=0 && document.getElementById)?true:false;
// _mac : true = macintosh, false = other os
_mac=navigator.userAgent.indexOf('Mac')>=0;
//=======================================================================
function getDivTop(div){
  if(typeof window.crypto!="undefined" &&
     typeof window.getComputedStyle!="undefined"){ 
    return parseInt(div.style.top);
  }
  else 
   return document.layers?
     div.top:(div.offsetTop||parseInt(div.style.top)||div.style.pixelTop||0);
}
function moveDivTo(div,left,top){
  if(document.layers){ div.moveTo(left,top); return; } 
  if(typeof div.style.left!="undefined"&& typeof div.style.left=="string"){ 
    div.style.left=left+'px';
    div.style.top =top +'px';
  }
  else if(typeof div.style.pixelLeft!="undefined"){ 
    div.style.pixelLeft=left;
    div.style.pixelTop =top;
  }
}
function moveDivBy(div,left,top){
  if(document.layers){ div.moveBy(left,top); return; } 
  if(typeof window.crypto!="undefined" &&
     typeof window.getComputedStyle!="undefined"){ 
    div.style.left=(parseInt(div.style.left)+Math.round(left))+'px';
    div.style.top =(parseInt(div.style.top) +Math.round(top) )+'px';
    return;
  } 
  if(typeof div.style.left!="undefined"&& typeof div.style.left=="string"){
    div.style.left=(div.offsetLeft+Math.round(left))+'px';
    div.style.top =(div.offsetTop +Math.round(top) )+'px';
    return; 
  }
  if(typeof div.style.pixelLeft!="undefined"){
    div.style.pixelLeft+=Math.round(left);
    div.style.pixelTop +=Math.round(top);
    return;
  }
}
function initDivSize(div){
  if(document.layers) return;
  if(typeof div.style.width!="undefined"&& typeof div.style.width=="string"){
   div.style.width =div.offsetWidth +'px';
   div.style.height=div.offsetHeight+'px';
  }
  else if(typeof div.style.pixelWidth!="undefined"){ 
   div.style.pixelWidth =div.offsetWidth;
   div.style.pixelHeight=div.offsetHeight;
  }
}
function getDivHeight(div){
  return document.layers?
         div.clip.height:(div.offsetHeight||div.style.pixelHeight||0);
}
function setDivVisibility(div,visible){
  (div.style||div).visibility=(visible)?
   ((window.opera && !document.documentElement)?'visible':'inherit'):'hidden';
}
function resizeDivTo(div,width,height){
  if(document.layers) { 
   div.resizeTo(width,height);
  }
  else if(typeof div.style.width!="undefined"&& typeof div.style.width=="string"){
   div.style.width =width +'px';
   div.style.height=height+'px';
  }
  else if(typeof div.style.pixelWidth!="undefined"){ 
   div.style.pixelWidth  = width;
   div.style.pixelHeight = height;
  }  
}

if(_bro==1){
  document.write(
     '<style type="text/css">\n'
    +'.item{ padding-bottom:1px; }\n'
    +'<\/style>'
  );
}
