

function sendQuerystring(url,v_id,focus) {
	
    var http=null;
    http=getXmlHttpObject();
    http.open("POST", url, true);
    http.onreadystatechange = function(){
        if (http.readyState <= 1){
            document.getElementById(v_id).innerHTML = "<img src='images/loading.gif' border='0'/>";
        }
        if (http.readyState == 4){
			
            var results = http.responseText;
            document.getElementById(v_id).innerHTML =results;

            if(focus){
                var onf=document.getElementById(focus);
                onf.focus();
            }
            http=null;
        }
    }
    http.send(null);
        

}



function getXmlHttpObject() {
    var xmlHttp=null;
    try{
        xmlHttp = new XMLHttpRequest();
    }
    catch(e){
        try {
            xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e) {
            try {
                xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch (E) {
                xmlHttp  = null;
            }
        }
    }
    return xmlHttp;
}

function loadFrame(id){
    var frame;
    frame=document.getElementById(id).contentDocument || document.getElementById(id).contentWindow.document;
    frame.designMode='on';   
}

function doSubmit(txt,frame) {
    document.getElementById(txt).value = document.getElementById(frame).contentWindow.document.body.innerHTML;
}


/*function backward(){
	var sal = new salajax();
    sal.Debug = 0;
    sal.EnableBackButton(true); //turns on the back buttons.
    sal.EnableBookmarks(true); //saves state in the clients cookies so bookmarks will work provided they havn't deleted their cookies.
    sal.OnStart = 'TestOnStart()'; //enables a script to run before the request is made. e.g. change pointer/icon/loading section of page.
    sal.OnEnd = 'TestOnEnd()'; //enables a script to run after the request is returned. e.g. change pointer/icon/loading section of page.
    sal.PresendHtml = '<img border="0" src="http://www.ajaxload.info/cache/ff/ff/ff/00/80/ff/24-1.gif"/>';
    sal.OnError = 'DefaultOnError()';//set a function to pass to if there is an error.
    sal.OnErrorHtml = '<img border="0" src="http://www.register.com/images/icons/error_icon.gif" /><font color="red">Error!</font>'; //When calling  etInnerHTMLFromAjaxResponse and there is an error, this will be displayed.
    sal.EvalScripts = true; //if set to true, will evaluate any javascript in the responseText. 
                             //NOTE: to use functions returned in your responseText you must declare the functions in your ajax response like this:
                             //         var FunctionToChange = function(var1,var2)
                             //         { 
                             //             //do stuff
                             //         }
                             //            
    this.KeepDotNetViewState = true; //if set to true will post the current viewstate when using .NET
    //end setting the salajax settings.
	SetInnerHtmlFromAjaxResponse('index.php?action=consultarColmenares&dni={dni}','cuerpo');
	sendQuerystring('index.php?action=consultaUsuarios','cuerpo');
}*/



	


