function xopen_window(source, width, height, scrolling)
{
  if(!width)
    width = 400;
  if(!height)
    height = 160;
  if(!source)
    source = "";
  var left = 0;
  var top = 0;
  if(typeof(window.innerWidth) == "number") {
    left = window.innerWidth;
    top = window.innerHeight;
  }
  else {
    if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
      left = document.documentElement.clientWidth;
      top = document.documentElement.clientHeight;
    }
    else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
      left = document.body.clientWidth;
      top = document.body.clientHeight;
    }
  }
  if(typeof(window.screenLeft) == "number") {
    left = (left / 2) + window.screenLeft;
    top = (top / 2) + window.screenTop;
  }
  else {
    left = (left / 2) + window.screenX;
    top = (top / 2) + window.screenY;
  }
  left -= width / 2;
  top -= height / 2;
  if(navigator.userAgent.indexOf("Opera") != -1)
    top /= 2;
  obj = window.open(source, "_support", "height=" + height + ",width=" + width + ",left=" + left + ",top=" + top + ",toolbar=no,menubar=no,scrollbars=" + (scrolling?"yes":"no") + ",resizable=no,location=no,directories=no,status=no");
  return(obj);
}

function filter_nonnumeric(str)
{
  return(str.replace(/[^0-9]/g, ""));
}

var image_preloads = new Array();

function image_preload(images)
{
  if(typeof(images) == "string")
    images = new Array(images);
  for(i in images)
    image_preloads.push(images[i]);
}

function _mover(element)
{
  if(element.src.substr(element.src.length - 5, element.src.length) != "2.gif")
    element.src = element.src.substr(0, element.src.length - 4) + "2.gif";
}

function _mout(element)
{
  if(element.src.substr(element.src.length - 5, element.src.length) == "2.gif")
    element.src = element.src.substr(0, element.src.length - 5) + ".gif";
}


