    //FUNCTION: ajax_send
    //performs an ajax call 
    //parameters:
    //      sMethod             (string) the http method with which to send the request
    //                                    { "HEAD", "OPTIONS", "GET", "POST" }
    //      sUrl                (string) the url to call
    //      elementid           (string) a string to return as the second parameter in the callback
    //                                    to use default callback supply an element id to be set to
    //                                    display block here
    //      callbackfunction    (string) the name of a custom callback function (see below)
    //                                    omit for default behaviour
    //      sPost               (string) the value to send in a http post call
    //
    //returns:
    //      True    if ajax is supported
    //      False   if ajax is not supported
    function ajax_send(sMethod, sUrl, parameter, /*OPTIONAL*/callbackfunction, /*OPTIONAL*/ sPost)
    {
        var xmlreq = null;
        if(callbackfunction == null) callbackfunction = ajax_callback;
        if(window.XMLHttpRequest) xmlreq = new XMLHttpRequest();
        else if (window.ActiveXObject) xmlreq = new ActiveXObject("Microsoft.XMLHTTP");
        if(xmlreq==null) return false;
        xmlreq.open(sMethod, sUrl);
        xmlreq.onreadystatechange = function() {
			callbackfunction( xmlreq, parameter) ;
		}
		
		//new Function(callbackfunction + "(xmlreq, \""+parameter+"\");");
		if(sMethod.toUpperCase() == "POST")
		{
		    xmlreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		    xmlreq.setRequestHeader("Content-length", sPost.length);
            xmlreq.setRequestHeader("Connection", "close");
		    
		}
		
        xmlreq.send(sPost);
        return true;
    };

    //default callback behaviour if no callback function name is specified
    // ***** will set the display type of the element supplied to "block" if
    // ***** the returned status is 200 (OK)
    function ajax_callback(xmlreq, sElement){
		if(xmlreq.readyState == 4)
		if(xmlreq.status == 200) document.getElementById(sElement).style.display = "block";
	}
    
//    //To change default behaviour implement your own callback function and supply 
//    //  the name to the ajax_send method parameters
//    function My_callBack(objXMLHttpRequest, strElementID)
//    {
//        var objStateElement = document.getElementById(strElementID);
//        if(objXMLHttpRequest.readyState == 4)
//        {
//            //call completed do stuff!
//        }
//    }