﻿
		$ = function(id) {
			return document.getElementById(id);
		}
		
		function ShowMe(ElementId)
		{
		    $(ElementId).style.visibility = 'visible';
		    $(ElementId).style.display = 'block';
		}
		
		function HideMe(ElementId)
		{
		    $(ElementId).style.visibility = 'hidden';
		    $(ElementId).style.display = 'none';
		}

		// a function to get the ajax object for any browser that supports it.
		function $AjaxObj() {
		    var xmlhttp = null;
		    if (window.XMLHttpRequest) {
		        //modern browsers.  yes, even IE7+
		        xmlhttp = new XMLHttpRequest();
		    }
		    else if (window.ActiveXObject) {
		        //lame-o browsers pre IE7...
		        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		    }
		    return xmlhttp;
		}

		// Takes all textboxes on the page
		// and causes the onfocus to select all text.
		// I don't know why, but adding this.select to the onfocus
		// did not work. so 2 functions where made.
		// strangely enough, if i add this.select() to the onfocus
        // event on the .aspx side of things, all is well.
		function selectText() {
		    this.select();
		}
		function textBoxLikeCells() {
		    var Inputs = document.getElementsByTagName('input');
		    for (var q = 0; q < Inputs.length; ++q) {
		        if (Inputs[q].type == 'text') {
		            Inputs[q].onfocus = selectText;
		        }
		    }
		}

