//Copyright 2003-2004 A9.com or its affiliates
 
// For non standard attribute, Mozilla wants you to access the
// attribute using getAttribute and setAttribute.  Safari wants
// you to access it using obj[attr].  IE doesn't care
// TODO: verify this, do this better
function a9SetAttribute(obj, attr, value) {
	/*
  if (a9IsSafari) {
    obj[attr] = ""+value;
  } else {
    obj.setAttribute(attr, value);
  }
	*/
	obj[attr] = ""+value;
}

function a9GetAttribute(obj, attr) {
	/*
  if (a9IsSafari) {
    return obj[attr];
  } else {
    return obj.getAttribute(attr);
  }
	*/
	return obj[attr];
}

// if encodeURIComponent is available, use it, otherwise use escape
function a9Encode(s) {
  if (typeof(encodeURIComponent) != "undefined") {
    return encodeURIComponent(s);
  }
  return escape(s);
}

function a9Decode(s) {
  if (typeof(decodeURIComponent) != "undefined") {
    return decodeURIComponent(s);
  }
  return unescape(s);
}

function a9PopupWin(url,name,options){
  var win = window.open(url,name,options);
  win.opener = this;
  win.focus();
}
