// replicate base xmlhttprequest.js loadContent using jquery methodsfunction loadContent(href, tagId, method, form_obj, local_debug) {    // make the tag jquery friendly :)    jQtag = '#'+tagId;    // make sure the element we want to target exists    if ($(jQtag).length)    {        href = href + '&pageName=module';        if (local_debug == null || local_debug == '') local_debug = false;        // default method = get        if (method == null || method == '')         {             method = 'GET';        }        method = method.toUpperCase();        argstr = '';        if (method == 'POST')        {            if (form_obj !== undefined)             {                // make the form tag jquery friendly too                form_obj = '#'+form_obj;                // make sure we have a form                if ($(form_obj).length)                {                    // get all form elements with a name attribute                    $(form_obj).children('[@name]').each(function()                    {                        // and add them to the args for this request                        argstr = argstr + '&' + $(this).attr('name') + '=' + $(this).val();                    }                    );                }            }        }        // let the user know we're working        document.body.style.cursor = 'wait';		$('#loading_box').show();        // finally, call our request        $.ajax({            url: href,            type: method,            dataType: 'html',            data: argstr,            timeout: 5000,            error: function(){                document.body.style.cursor='default'; 				$('#loading_box').hide();                if (local_debug)                {                    alert('Error loading document at URL: '+href+argstr+' using method: '+method);                }                document.location = href+argstr;            },            success: function(dataout){               // find our replacement element                if ($(dataout).find(jQtag).length)                {                    // and replace the html in our target                    $(jQtag).html($(dataout).find(jQtag).html());                }                document.body.style.cursor='default'; 				$('#loading_box').hide();            }        });        return false;    }}