<!--
	midas.document = {
		doc: document,
		
		setDocument: function(doc)
		{
			this.doc = doc;
		},
	
		getElementById: function(id)
		{
			if ( this.doc.getElementById )
				return this.doc.getElementById(id);
			else if ( this.doc.all )
				return this.doc.all[id];
			else if ( this.doc.layers )
				return this.doc.layers[id];
			else
				return null;
		},
		
		getElementsByClass: function(searchClass, tag)
		{
			var classElements = new Array();
			var els = this.doc.getElementsByTagName(tag);
			var elsLen = els.length;
			var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
			
			for ( i = 0, j = 0; i < elsLen; i++ )
			{
				if ( pattern.test(els[i].className) )
				{
					classElements[j] = els[i];
					j++;
				}
			}
					
			return classElements;
		}
	};
//-->