function store(strName, oVal) {
  document.cookie = strName + '=' + oVal + '; path=/';
}

function recall(strName) {
  var entries = document.cookie.split(/;\s*/);
  var val;
  for (var i = 0; i < entries.length; i++) {
    var entry = entries[i].split(/=/);
    if (entry[0] == strName) {
      val = entry[1];
    }
  }
  return val;
}

function getStyle(oElem, strCssRule){
  var strValue = "";
  if(document.defaultView && document.defaultView.getComputedStyle){
    strValue = document.defaultView.getComputedStyle(oElem, "").getPropertyValue(strCssRule);
  }
  else if(oElem.currentStyle){
    strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){
      return p1.toUpperCase();
    });
    strValue = oElem.currentStyle[strCssRule];
  }
  return strValue;
}

function stripUnit(strVal) {
  var val = strVal.replace(/\D+$/, '');
  if (val == '') {
    return 0
  }
  else {
    return parseFloat(val);
  }
}

function getUnit(strVal) {
  var val = strVal.replace(/.*\d(\D+)$/, '$1');
  if (val) {
    return val;
  }
  else {
    return '';
  }
}

function getExtent(oElem, strCssRule) {
  var val = getStyle(oElem, strCssRule);
  return stripUnit(val);
}
