//BROWSER FUNCTIONS

function get_browser_width() {

  if (parseInt(navigator.appVersion)>3) {
    if (navigator.appName=="Netscape") {
      return window.innerWidth;
    }
    if (navigator.appName.indexOf("Microsoft")!=-1) {
      return document.body.offsetWidth;
    }
  }

}

function get_x_browser_size() {
  var ret_array = new Array(2);

  if ( typeof(window.innerWidth) == 'number' ) {
    //non IE
    ret_array[0] = window.innerWidth;
    ret_array[1] = window.innerHeight;
  } else if ( document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight) ) {
    //IE6+ in standards compliant mode
    ret_array[0] = document.documentElement.clientWidth;
    ret_array[1] = document.documentElement.clientHeight;

  } else if ( document.body && (document.body.clientWidth || document.body.clientHeight) ) {
    //IE4 compatible
    ret_array[0] = document.body.clientWidth;
    ret_array[1] = document.body.clientHeight;

  }

  return ret_array;

}


function get_x_browser_width() {

  var ret_val;

  if ( typeof(window.innerWidth) == 'number' ) {
    //non IE
    ret_val = window.innerWidth;
  } else if ( document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight) ) {
    //IE6+ in standards compliant mode
    ret_val = document.documentElement.clientWidth;

  } else if ( document.body && (document.body.clientWidth || document.body.clientHeight) ) {
    //IE4 compatible
    ret_val = document.body.clientWidth;

  }

  return ret_val;

}


function get_x_browser_height() {

  var ret_val;

  if ( typeof(window.innerHeight) == 'number' ) {
    //non IE
    ret_val = window.innerHeight;
  } else if ( document.documentElement && (document.documentElement.clientHeight || document.documentElement.clientHeight) ) {
    //IE6+ in standards compliant mode
    ret_val = document.documentElement.clientHeight;

  } else if ( document.body && (document.body.clientHeight || document.body.clientHeight) ) {
    //IE4 compatible
    ret_val = document.body.clientHeight;

  }

  return ret_val;

}


function is_browser_IE() {
  var version = 0;
  if (navigator.appVersion.indexOf("MSIE") != -1){
    temp=navigator.appVersion.split("MSIE");
    version=parseFloat(temp[1]);
  }
  
  if (version == 0) {
    return false;
  } else {
    return true;
  }  
  
}
