  function Image1($link) {
    document.getElementById($link + "-link").style.display = "inline";
    document.getElementById($link + "-link2").style.display = "none";
  }
  function Image2($link) {
    document.getElementById($link + "-link2").style.display = "inline";
    document.getElementById($link + "-link").style.display = "none";
  }
  function GetValue($value) {
    return Number($value.substring(0,$value.length-2));
  }
  function Resize() {
    $content_height = document.getElementById("content").clientHeight + 135 + 64;
    $sidebar_height = document.getElementById("side-bar").clientHeight + 135 + 64;
    if($content_height > $sidebar_height) {
      $height = $content_height;
    }
    else {
      $height = $sidebar_height;
    }
    if(navigator.appName == "Microsoft Internet Explorer") {
      $total_height = screen.availHeight - window.screenTop - 20;
    }
    else {
      $total_height = window.innerHeight;
    }
    if($height > $total_height) {
      document.getElementById("background").style.height = String($height) + "px";
      document.getElementById("red-bar-v").style.height = String($height) + "px";
      document.getElementById("bottom-bar").style.top = String($height - 44) + "px";
    }
    else {
      document.getElementById("bottom-bar").style.top = String($total_height - 44) + "px";
    }
    document.getElementById("bottom-bar").style.display = "block";
  }
  function windowResize() {
    var newWidth = 0;
    var c_start = document.cookie.indexOf("screen_width=") + 13;
    var c_end = document.cookie.indexOf(";", c_start);
    if(c_end == -1) {
      c_end = document.cookie.length;
    }
    var currentWidth = Number(document.cookie.substring(c_start, c_end));
    if(typeof(window.innerWidth) == 'number') {
      //Non-IE
      newWidth = window.innerWidth;
    }
    else if(document.documentElement && document.documentElement.clientWidth) {
      //IE 6+ in 'standards compliant mode'
      newWidth = document.documentElement.clientWidth;
    }
    else if(document.body && document.body.clientWidth) {
      //IE 4 compatible
      newWidth = document.body.clientWidth;
    }
    if(newWidth != currentWidth) {
      document.cookie = "screen_width=" + String(newWidth) + ";; path=/"; 
      window.location = window.location;
    }
  }