/*  
 * xlisting.js
 *
/*--------------------------------------------------------------------------*/

var DOM = new Object();

DOM = {

v1 : function(o,s){
  try{
    var nl = $A(o.getElementsByTagName(s));
    if(nl.length == 0)
      return "";
    return nl[0].firstChild.nodeValue;
  }catch(e){
    return null;
  }
},
e1 : function(o,s){
  try{
    return o.getElementsByTagName(s)[0];
  }catch(e){
    return null;
  }
},
t1 : function(o){
  text = null;
  var es = $A(o.childNodes);
  es.find(function(e){
    try{
	  if(e.nodeType==3 && ((e.data).replace(" ", "")).length ) {
		text = e.data;
		return true;
	  }
	}catch(e){}
  });
  return text;
},
allv1 : function(o){
  var v1s = {};
  var all = $A(o.childNodes);
  all.each(function(e){
    try{v1s[e.tagName] = e.firstChild.nodeValue;}catch(e){}
  });
  return v1s;
},
removeAllChild : function(o){
  o.innerHTML = "";
},
create : function(s,options){
  var e = document.createElement(s);
  for(k in options){
    if(k=="text"){
	  var t = DOM.createText(options[k]);
	  e.appendChild(t);
    }else{
      e.setAttribute(k,options[k]);
    }
  }
  return e;
},
createText : function(s){
  return document.createTextNode(s);
}

}
