    function makeAJAXRequest(url) 
    {

	    var http_request = false;
            if (window.XMLHttpRequest) 
	    { // Mozilla, Safari,...
                http_request = new XMLHttpRequest();
	    } 
	    else if (window.ActiveXObject) 
	    { // IE
		try {
			http_request = new ActiveXObject("Msxml2.XMLHTTP");
		    } catch (e) 
		    {
			try {
			    http_request = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {}
		    }
	    }

	    if (!http_request) 
	    {
		alert('Giving up :( Cannot create an XMLHTTP instance');
		return false;
	    }

	    http_request.onreadystatechange = function() { alertContents(http_request); };
	    http_request.open('GET', url, true);
	    http_request.send(null);
    }

    function alertContents(http_request) 
    {
        if (http_request.readyState == 4) 
	{
            if (http_request.status == 200) 
	    {
                alert(http_request.responseText);
            } 
	    else 
	    {
                alert('There was a problem with the request.');
            }
        }

    }

function show(object)
{
    if (document.getElementById){
                if(document.getElementById(object) != null) {
         document.getElementById(object).style.visibility='visible';
         document.getElementById(object).style.display='block';
    }}
}
function hide(object)
{
    if (document.getElementById){
                if (document.getElementById(object) != null) {
         document.getElementById(object).style.visibility='hidden';
         document.getElementById(object).style.display='none';
    }}
}

function toggle(divname)
{
	//alert(document.getElementById(divname).style.visibility );
    if (document.getElementById)
	{
		if (document.getElementById(divname) != null) 
		{
			if(document.getElementById(divname).style.visibility != 'hidden' && document.getElementById(divname).style.display !='none' )
			{
				document.getElementById(divname).style.visibility == 'hidden';
				document.getElementById(divname).style.display='none';
			}
			else
			{
		         document.getElementById(divname).style.visibility='visible';
        		 document.getElementById(divname).style.display='block';
			}
		}
	}
}


function smartSubmit(form)
{
	if (!validateUserData(form)) return;
	form.submit();
	return;
}

function validatePrompt (Ctrl, PromptStr)
{
	alert (PromptStr)
	Ctrl.focus();
	return;
}


function putSmily(addSmilie) 
{
	var box = document.getElementsByName('msg')[0];
	var currentMessage = box.value;
	box.value = currentMessage+addSmilie;
	return;
}

	function putCTag(action) 
	{
		var box = document.getElementsByName('MSG')[0];

		var currentMessage = box.innerText;

		if (action == "url") {
			var thisURL = prompt("Enter the complete URL for the link you wish to add.", "http://");
			if (thisURL == null){return;}

			var thisTitle = prompt("Now enter the title of the web page you wish to reference.  For instance, if you are linking to the URL for Enthuware, you might use the title- Enthuware Homepage.", "Page Title");
			if (thisTitle == null){return;}

			box.innerText = currentMessage+"[url="+thisURL+"]"+thisTitle+"[/url]";

			return;
		}

		if (action == "email") {
			var thisEmail = prompt("Enter the complete email address that you wish to add.", "");
			if (thisEmail == null){return;}

			box.innerText = currentMessage + "[email]"+thisEmail+"[/email]";
			return;
		}

		if (action == "bold") {
			var thisBold = prompt("Enter the text that you wish to make bold.", "");
			if (thisBold == null){return;}

			box.innerText = currentMessage + "[b]"+thisBold+"[/b]";
			return;
		}

		if (action == "italics") {
			var thisItal = prompt("Enter the text that you wish to italicize.", "");
			if (thisItal == null){return;}

			box.innerText = currentMessage + "[i]"+thisItal+"[/i]";
			return;
		}

		if (action == "image") {
			var thisImage = prompt("Enter the complete URL for the image you wish to display.", "http://");
			if (thisImage == null){return;}

			box.innerText = currentMessage + "[img]"+thisImage+"[/img]";
			return;
		}

		if (action == "quote") {
			box.innerText = currentMessage + "[quote]  [/quote]";
			return;
		}

		if (action == "code") {
			box.innerText = currentMessage + "[code]  [/code]";
			return;
		}

		if (action == "liststart") {
			box.innerText = currentMessage + "[list]";
			return;
		}

		if (action == "listend") {
			box.innerText = currentMessage + "[/list]";
			return;
		}

		if (action == "listitem") {
			var thisItem = prompt("Enter the new list item.  You must already have the [list] tag before adding the list items. Don't forget to end the list using [/list] tag after adding all the items.", "");
			if (thisItem == null){return;}
			box.innerText = currentMessage + "[*]" + thisItem;
			return;
		}

	}
