var reimers = {
	"ajax" : {
		"xhr" : function() {
		    var objXMLHttp=null;
		    if ( window.XMLHttpRequest ) {
				objXMLHttp=new XMLHttpRequest();
	        } else if ( window.ActiveXObject ) {
	            try {
		           objXMLHttp = new ActiveXObject( "Msxml2.XMLHTTP" );
				} catch( e ) {
					try {
						objXMLHttp = new ActiveXObject( "Microsoft.XMLHTTP" );
					} catch( e ) { }
				}
			}
			return objXMLHttp;
		},
		
		"getPage" : function(url,returnfunction){
			var xmlHttp = reimers.ajax.xhr();
			if ( xmlHttp == null ) {
				alert ("Browser does not support HTTP Request");
				return;
			}
			url=url+"&sid="+Math.random();
			xmlHttp.onreadystatechange=returnfunction;
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);
		},
		
		"postForm" : function(url,form,returnfunction){
			var xmlHttp = reimers.ajax.xhr();
			if ( xmlHttp == null ) {
				alert ("Browser does not support HTTP Request");
				return;
			}
			url=url+"?sid="+Math.random();
			xmlHttp.onreadystatechange=returnfunction;
			xmlHttp.open("POST",url,true);
			xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
			xmlHttp.setRequestHeader("Content-length", form.length);
			xmlHttp.setRequestHeader("Connection", "close");
			xmlHttp.send(form);
		}
	}, //End of ajax
	
	"ui" : {
		"elm" : function(name) {
			return document.getElementById(name);
		},
		
		"tag" : function(name) {
			return document.getElementsByTagName(name);
		},
		
		"toggle" : function(name) {
			var theElement = reimers.ui.elm(name);
			if(theElement.style.display == '') {
				theElement.style.display = 'none';
			} else {
				theElement.style.display = '';
			}
			return theElement;
		}
	} //End of ui.
} //End of reimers