DOM  = function(){

      var keyHandler = null;
      
      /* Public methods and variables */
      return {
	            
	      centerEl : function(el){
		     try{
			     var winY = ((YAHOO.util.Dom.getViewportHeight()/2) - (this.getElementHeight(el)/2)) + YAHOO.util.Dom.getDocumentScrollTop() ;   
			     var winX = (YAHOO.util.Dom.getViewportWidth()/2) - (this.getElementWidth(el)/2) + YAHOO.util.Dom.getDocumentScrollLeft();
			     YAHOO.util.Dom.setStyle(el, "top", winY + "px");
			     YAHOO.util.Dom.setStyle(el, "left", winX+ "px");
		         YAHOO.util.Dom.setStyle(el, "zIndex", 1000);	   	   
			     YAHOO.util.Dom.setStyle(el, "display", "block");
			     YAHOO.util.Dom.setStyle(el, "visibility", "visible");
		     }
		     catch(err){
		        alert(err + ":Dom");
		     }  
	      },

	      centerElHoriz : function(el){
		     try{
			     var winX = (YAHOO.util.Dom.getViewportWidth()/2) - (this.getElementWidth(el)/2) + YAHOO.util.Dom.getDocumentScrollLeft();
			     YAHOO.util.Dom.setStyle(el, "left", winX+ "px");
		              YAHOO.util.Dom.setStyle(el, "zIndex", 1000);	   	   
			     YAHOO.util.Dom.setStyle(el, "display", "block");
			     YAHOO.util.Dom.setStyle(el, "visibility", "visible");
		     }
		     catch(err){
		        alert(err + ":Dom");
		     }  
	      },
	      
	      getElementWidth : function(elem){
			    if (elem.style.pixelWidth) {
			       xPos = elem.style.pixelWidth;
			    } 
			    else {
			      xPos = elem.offsetWidth;
			    }
			    
			    return xPos;      
	      },
	      
	      getElementHeight : function(elem){
			    if (elem.style.pixelHeight) {
			       xPos = elem.style.pixelHeight;
			    } 
			    else {
			       xPos = elem.offsetHeight;
			    }
			    return xPos;     
	      }, 

      }; 

}();
