function mandaSearch(divId,formId){
    var q = new String(document.getElementById("txt_query").value);
    q = trim(q);
    /*q.replace("é","&eacute;");
    q.replace("é","&eacute;");
    q.replace("í","&íacute;");
    q.replace("ó","&oacute;");
    q.replace("ñ","&ntilde;");*/
	
    if(q != "")
{
        var search_str = new String(document.getElementById(formId).value+"?"+"q="+q+
		"&filter="+document.getElementById("filter_p").value+													
        "&site="+document.getElementById("site_p").value+
        "&client="+document.getElementById("client_p").value+
        "&proxystylesheet="+document.getElementById("proxy_p").value+ 
        "&proxyreload="+document.getElementById("proxyr_p").value+
        "&output="+document.getElementById("output_p").value+
		"&ie="+document.getElementById("ie_p").value+
		"&entqr="+document.getElementById("entqr_p").value+
		"&sort="+document.getElementById("sort_p").value+
		"&getfields=*"+
		"&num=8"+
		"&oe="+document.getElementById("oe_p").value);
		
		/*"&as_oq="+document.getElementById("as_oq_p").value+
		"&getfields="+document.getElementById("getfields_p").value+*/
        
		document.getElementById(divId).innerHTML = "";
        document.getElementById(divId).innerHTML = '<iframe frameborder="0" style="overflow:hidden;" width="98%" height="1600px" src="'+search_str+'"></iframe>';

    }
}

function trim(stringToTrim) {
    return stringToTrim.replace(/^\s+|\s+$/g,"");
}

