scrollWidth = 18; //ScrollBarWidth
alphastart = 40;
alphaend = 55;

if (browser.isIE) { //only Bill Gates know why
  document.body.style.overflow = 'auto'; //hide scrollbar
  if (browser.isMac) { document.body.style.overflow = 'hidden'; }
  else { if (!window.parent.content && !browser.isMac) { BWidth -= 4; BHeight -= 4; } }
}

function initTitle() { //div height = 100% don't work in Opera
  if (browser.isOpera) document.getElementById('title').style.height = BHeight;
}

//alpha
function initAlpha() {
  if (!browser.isIE || browser.isMac) {
    document.getElementById('alphadown').src = 'images/alpha.png';
    document.getElementById('alphascrolldown').src = 'images/alpha.png';
  }
  document.getElementById('alphascroll').style.left = BWidth - scrollWidth;
  document.getElementById('alphascrollup').style.width = scrollWidth;
  document.getElementById('alphascrolldown').style.width = scrollWidth;
  document.getElementById('alpha').style.width = BWidth - scrollWidth;
  document.getElementById('alphaup').style.width = BWidth - scrollWidth;
  document.getElementById('alphadown').style.width = BWidth - scrollWidth;
  setAlpha(alphastart, alphaend);
}
function setAlpha(start, end) {
  document.getElementById('alphaup').style.height = start;
  document.getElementById('alphadown').style.height = end-start;
  document.getElementById('alphascrollup').style.height = start;
  document.getElementById('alphascrolldown').style.height = end-start;
  if (browser.isIE && !browser.isMac) {
    document.getElementById('alphadown').style.filter = 'Alpha(opacity=100, finishopacity=0, style=1, startx=0, starty=0, finishx=0, finishy='+(end+start)+')';
    document.getElementById('alphascrolldown').style.filter = 'Alpha(opacity=100, finishopacity=0, style=1, startx=0, starty=0, finishx=0, finishy='+(end+start)+')';  
  }	
}
function refresh() {
  if (!window.parent.content) location.reload();
  else parent.location.reload();
}
function initContent() {
 document.getElementById('content').style.top = 36;
 document.getElementById('content').style.width = BWidth - 50;
 document.getElementById('content').style.height = BHeight - 36;
}
