//codigo de estatus de ajax var S_READY = 4; /** * Crear objeto XmlHttpRequest de manera * portable entre browsers IE y FF. Retorna * una referencia al objeto listo para usarse * en comunicacion Ajax */ function getHttpObject() { var obj = null; if (window.XMLHttpRequest) { obj = new XMLHttpRequest(); } else if (window.ActiveXObject) { obj = new ActiveXObject("Microsoft.XMLHTTP"); } return obj; } /** * Invocar servicio Ajax * httpMethod: String GET o POST * uri: Path del servicio, no incluir el contexto. Ejemplo: /action/xxxx/yyyy * divResponse: ID del DIV donde se muestra la respuesta en caso de que sea HTML * divProgress: ID del DIV a mostrar mientras se ejecuta la llamada * formName: Nombre del formulario en caso que httpMethod sea igual a POST * afterResponseFn: Apuntador a funcion a ejecutar despues de mostrar una respuesta HTML * onErrorFn: Apuntador a funcion a ejecutar en caso de error http 500, 403, 404, 401, etc. * Puede utilizarse para restaurar los DIVs que se escondieron antes de invocar * esta funcion. */ function ajaxCall(httpMethod, uri, divResponse, divProgress, formName, afterResponseFn, onErrorFn) { //mostrar indicador de progreso var progress = document.getElementById(divProgress); if (progress!=null) progress.style.display=''; //ensamblar el URL var server = "http://v3.besalcomaquinarias.cl:80"; var url = server + "/proveedor" + uri; if (url.indexOf("?")>0) url = url + "&random=" + Math.random(); else url = url + "?random=" + Math.random(); //ensamblar formulario var data = null; if (formName!=null) data = getFormValues(formName); //send request var http = getHttpObject(); //manejador de respuesta AJAX http.onreadystatechange = function () { if (http.readyState == S_READY) { var contentType = http.getResponseHeader("Content-type"); var text = http.responseText; //verificacion de sesion de seguridad activa (redirect a login) if (text.indexOf("_ajax_VE8374yz_")>0) { window.location="/proveedor/index.htm"; } else { //apagar indicador de progreso if (progress!=null) progress.style.display='none'; //verificacion de error y seguridad if (http.status == 500) alert("Error en el sistema."); else if (http.status == 403) alert("Acceso denegado."); else if (http.status == 404) alert("El servicio solicitado no existe."); else if (http.status == 401) alert("El servicio solicitado requiere comunicación vía SSL."); else { //tratar caso cuando no hay comunicacion con el servidor if (contentType==null || (http.status !=200 && http.status!=400)) { alert("El servidor no responde."); //invocar callback en caso de error if (onErrorFn!=null) onErrorFn(); return false; } //ok - responder de acuerdo al tipo de contenido if( contentType.indexOf("text/javascript")>=0 ) { eval(text); } else { if (divResponse!=null) { var div = document.getElementById(divResponse); div.innerHTML = text; div.style.display=''; } if (http.status == 200 && afterResponseFn!=null) afterResponseFn(); } } //invocar callback en caso de error if (http.status != 200) { if (onErrorFn!=null) onErrorFn(); } } } }; http.open(httpMethod, url, true); http.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"); if (data!=null) http.setRequestHeader("Content-length", data.length); http.send(data); return false; } /** * Limpiar los controles de un formulario, * los comboBox se ubican en el 1er elemento, el * atributo value del resto de los controles se * pone en "" vacio. El focus se pone en el 1er * control activo. * formName: nombre del formulario */ function clearForm(formName) { var f = document.forms[formName]; for (i=0;i pageHeight()) overlay.style.height = document.body.scrollHeight + 'px'; else overlay.style.height = pageHeight() + 'px'; overlay.setAttribute("id", "_overlay"); document.body.appendChild(overlay); } else { if (document.body.scrollHeight > pageHeight()) overlay.style.height = document.body.scrollHeight + 'px'; else overlay.style.height = pageHeight() + 'px'; } /* ---- */ /* NOTE: Original author: JTricks.com :: http://www.jtricks.com/ */ var obj = document.getElementById(objID); var newID = objID + "_popup"; var borderStyle = "#9d9d9d 1px solid"; var boxdiv = document.getElementById(newID); if (boxdiv != null) { /* soporte para lightbox */ overlay.style.display='block'; boxdiv.style.zIndex = 1002; /* ---- */ if (boxdiv.style.display=='none') { if (url!=null) { var f = window.frames[objID + "_iframe"]; f.document.open(); f.document.write("
"); f.document.write("

"); f.document.write(""); f.document.write("Loading..."); f.document.write("
"); f.document.close(); f.location = url; } if (centerPage==null) moveBox(obj, boxdiv); boxdiv.style.display='block'; } else boxdiv.style.display='none'; return false; } boxdiv = document.createElement('div'); boxdiv.setAttribute('id', newID); boxdiv.style.display = 'none'; boxdiv.style.position = 'absolute'; boxdiv.style.width = width + 'px'; boxdiv.style.height = height + 'px'; boxdiv.style.border = borderStyle; boxdiv.style.backgroundColor = '#F7F7F7'; boxdiv.style.padding = "0px"; //si se desea que el DIV este alineado en el centro de la pagina if (centerPage!=null && centerPage=="true") { boxdiv.style.top = (pageHeight() - height) / 2 + 'px'; boxdiv.style.left = (pageWidth() - width) / 2 + 'px'; } contents = document.createElement('iframe'); if (centerPage!=null && centerPage=="true") contents.scrolling = 'yes'; else contents.scrolling = 'no'; contents.frameBorder = '0'; contents.style.width = width + 'px'; contents.style.height = height + 'px'; contents.marginHeight = 0; contents.marginWidth = 0; contents.setAttribute('id', objID + "_iframe"); contents.setAttribute('name', objID + "_iframe"); boxdiv.appendChild(contents); document.body.appendChild(boxdiv); if (url!=null) { var f = window.frames[objID + "_iframe"]; f.document.open(); f.document.write("
"); f.document.write("

"); f.document.write(""); f.document.write("Loading..."); f.document.write("
"); f.document.close(); f.location = url; } /* soporte para lightbox */ overlay.style.display='block'; boxdiv.style.zIndex = 1002; /* ---- */ if (centerPage==null) moveBox(obj, boxdiv); boxdiv.style.display = 'block'; return false; } /** * Esconde un DIV + IFRAME abierto con la * función showBox() * objID: ID del DIV que sera ocultado */ function closeBox(objID) { var obj = document.getElementById(objID); if (!obj.readonly) obj.focus(); document.getElementById(objID + "_popup").style.display = "none"; /* soporte para lightbox */ var overlay = document.getElementById('_overlay'); if (overlay!=null) overlay.style.display='none'; } /** * Retorna TRUE si el navegador * es Internet Explorer */ function isIE() { if (navigator.appName.indexOf("Explorer")>0) return true; else return false; } /** * Retorna TRUE si el valor representa una fecha * de lo contrario retorna FALSE. Si el año viene con 2 dígitos * y en menor que 30, se asume el 20XX, de lo contrario 19XX. * value: String que representa una fecha con formato dd-mm-yyyy o dd/mm/yyyy */ function isValidDate(value) { var d = convertDate(value); if (d==null) return false; else return true; } /** * Retorna un objeto DATE si el valor representa una fecha * de lo contrario retorna NULL. Si el año viene con 2 dígitos * y es menor que 30, se asume el 20XX, de lo contrario 19XX. * value: String que representa una fecha con formato dd-mm-yyyy o dd/mm/yyyy */ function convertDate(value) { value = value.replace(new RegExp("/", "g") ,"-"); var values = value.split("-"); if (values.length!=3) return null; var day = values[0]; var month = values[1]; var year = values[2]; if (year.length!=2 && year.length!=4) return null; if (year.length==2 && parseInt(year)<30) year = "20" + year; else if (year.length==2 && parseInt(year)>=30) year = "19" + year; month = month-1; var dteDate = new Date(year,month,day); var r = ((day==dteDate.getDate()) && (month==dteDate.getMonth()) && (year==dteDate.getFullYear())); if (r) return dteDate; else return null; } /** * Mostrar un Calendario debajo y alineado * a la izquierda del elemento designado * por el parametro objID. El elemento debe * ser un textbox. * objID: ID del elemento en donde sera colocada la fecha seleccionada * lboundID: ID del elemento que contiene una fecha menor que sera usada para * no permitir seleccionar fechas menores en el calendario a la fecha en el elemento objID, * permite nulos cuando no se requiere. * uboundID: ID del elemento que contiene una fecha mayor que sera usada para * no permitir seleccionar fechas mayores en el calendario a la fecha en el elemento objID, * permite nulos cuando no se requiere. * isMovil: true para mostrar centrado en la pantalla del dispositivo */ function calendarOpen(objID, lboundID, uboundID, isMovil) { var d = document.getElementById(objID).value; var url = "/proveedor/action/calendar?id=" + objID + "&date=" + d; if (lboundID != null) url = url + "&date.lbound=" + document.getElementById(lboundID).value; if (uboundID != null) url = url + "&date.ubound=" + document.getElementById(uboundID).value; if ( isMovil!=null ) showBox(objID, 240,154, url, "true"); else showBox(objID, 240,154, url); } /** * Retorna valor seleccionado en el calendario * poniendolo dentro del textbox asociado y * cierra el calendario * objID: ID del textbox asociado al calendario * sdate: String que representa una fecha en formato dd-mm-yyyy */ function calendarReturnValue(objID, sdate) { document.getElementById(objID + "_popup").style.display = "none"; document.getElementById(objID).value = sdate; /* soporte para lightbox */ var overlay = document.getElementById('_overlay'); if (overlay!=null) overlay.style.display='none'; return false; } /** * Filtrar caracteres no permitidos en campos fecha, se usa * de esta manera: document.forms1.text1.onkeypress = keypressDate * en el evento onload del body. */ function keypressDate(e) { var mask = "0123456789-"; var keyCode = e ? e.which : window.event.keyCode; var key = String.fromCharCode(keyCode); if (mask.indexOf(key)==-1 && keyCode != 8 && keyCode!=0 && keyCode!=13) return false; } /** * Filtrar caracteres no permitidos en campos enteros, se usa * de esta manera: document.forms1.text1.onkeypress = keypressInteger * en el evento onload del body. */ function keypressInteger(e) { var mask = "0123456789"; var keyCode = e ? e.which : window.event.keyCode; var key = String.fromCharCode(keyCode); if (mask.indexOf(key)==-1 && keyCode != 8 && keyCode!=0 && keyCode!=13) return false; } /** * Filtrar caracteres no permitidos en campos con decimales, se usa * de esta manera: document.forms1.text1.onkeypress = keypressDouble * en el evento onload del body. Solo acepta el punto "." como separador * de decimales. */ function keypressDouble(e) { var mask = "0123456789."; var keyCode = e ? e.which : window.event.keyCode; var elem = e ? e.target : window.event.srcElement; var key = String.fromCharCode(keyCode); if (mask.indexOf(key)==-1 && keyCode != 8 && keyCode!=0 && keyCode!=13) return false; if (key=="." && elem.value.indexOf(".") > -1) return false; } /** * Retorna la trama requerida para hacer un POST del * formulario indicado usando Ajax * formName: Nombre del formulario */ function getFormValues(formName) { returnString =""; if( formName == "" ) return returnString; formElements=document.forms[formName].elements; for ( var i=formElements.length-1; i>=0; --i ) { if (formElements[i].name!=""){ //añade elementos radio y checkbox if (formElements[i].type=="checkbox" && !formElements[i].checked){ //este checkbox si no ha sido seleccionado es ignorado }else{ if (formElements[i].type=="radio" && !formElements[i].checked){ //este radio si no ha sido seleccionado es ignorado } else { var value = formElements[i].value; value = encodeURI(value); value = value.replace(new RegExp("&", "g") ,"%26"); returnString = returnString + formElements[i].name + "=" + value + "&"; } } } } returnString = returnString.substring(0, returnString.length - 1); return returnString; } /** * Retorna checkboxes o radiobutton con la propiedad * checked = true * radioName: Nombre del checkbox o radiobutton * radioValue: Valor del checkbox o radiobutton * formName: Nombre del formulario */ function setCheckboxValue(radioName,radioValue,formName) { if( formName == "") { //si forName es nulo no hace nada return; }else{ formElements=document.forms[formName].elements; } for ( var i=formElements.length-1; i>=0; --i ) { if (formElements[i].name == radioName && (formElements[i].type=="radio" || formElements[i].type=="checkbox") ){ //añade elementos radio y checkbox if (formElements[i].value==radioValue){ formElements[i].checked = true; return; } } } } /** * Retorna combos con la propiedad * select = true * comboName: Nombre del combo * comboValue: Valor del combo * formName: Nombre del formulario */ function setComboValue(comboName,comboValue,formName) { var combo = document.forms[formName].elements[comboName]; var cantidad = combo.length; for (i = 0; i < cantidad; i++) { if (combo[i].value == comboValue) { combo[i].selected = true; } } } /** * Remplazar el valor "," por "." en un elemento que contiene * un valor de tipo decimal. * elem: Elemento que contiene el valor a ser remplazado */ function replaceDecimal(elem) { var value = elem.value; elem.value = value.replace(new RegExp(",", "g") ,"."); } /** * Funciones de soporte para los grid * contiene funciones para la vista pagina, * panel de control, regresar a la pagina indicada, * y ordenamiento por columnas. */ //variables de control var lastPage=0; var currentPage=0; var recordsFound=0; /** * Ir a la primera pagina */ function pageFirst() { currentPage = 1; viewPage(); } /** * Ir a la ultima pagina */ function pageLast() { currentPage = lastPage; viewPage(); } /** * Ir a la pagina anterior */ function pagePrev() { if (currentPage>1) { currentPage=currentPage - 1; viewPage(); } else alert("Está viendo la primera página."); } /** * Ir a la pagina siguiente */ function pageNext() { if (currentPage=0) lbox.remove(lbox.selectedIndex); } /** * Eliminar todos los items de un listbox * elementId: ID del control que representa al ListBox */ function listboxClear(elementId) { var lbox = document.getElementById(elementId); if (lbox==null) { alert("ERROR (listboxClear): no existe un elemento con ID: " + elementId); return; } while (lbox.length>0) { lbox.remove(0); } } /** * Obtener los IDs de los items de un listbox concatenados como un String * y separados por un caracter, por defecto es ";" si no se especifica * elementId: ID del control que representa al ListBox * separator: caracter a utilizar para separar los items * Nota: si el control esta vacio retorna un string vacio */ function listboxGetItemValues(elementId, separator) { if (separator==null) separator=";"; var lbox = document.getElementById(elementId); if (lbox==null) { alert("ERROR (listboxGetItemValues): no existe un elemento con ID: " + elementId); return; } var ids = ""; for (var i=0;i Element ID: " + formElementId); } } setInnerHtml(id, text); } /** * By Dustin Diaz - http://www.dustindiaz.com/top-ten-javascript/ * Retorna un array de elementos que tengan una clase dada, * los parametros node y tag pueden ser null * searchClass: Clase * node: Nodo * tag: TagName */ function getElementsByClass(searchClass,node,tag) { var classElements = new Array(); if ( node == null ) node = document; if ( tag == null ) tag = '*'; var els = node.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp('(^|\\\\s)'+searchClass+'(\\\\s|$)'); for (i = 0, j = 0; i < elsLen; i++) { if ( pattern.test(els[i].className) ) { classElements[j] = els[i]; j++; } } return classElements; } /** * Código tomado de: * http://www.codingforums.com/showthread.php?p=178077#post178077 * Permite dar formato a un decimal y mostrar un cierto numero de decimales * n: Numero de decimales a mostrar */ Number.prototype.toDecimals=function(n){ n=(isNaN(n))? 2: n; var nT=Math.pow(10,n); function pad(s){ s=s||'.'; return (s.length>n)? s: pad(s+'0'); } return (isNaN(this))? this: (new String( Math.round(this*nT)/nT )).replace(/(\.\d*)?$/,pad); }; /** * Código tomado de: * http://www.webdeveloper.com/forum/showthread.php?t=68675 * Permite obtener tanto el alto como ancho de la pagina HTML que se esta usando */ function pageWidth() {return window.innerWidth != null? window.innerWidth: document.body != null? document.body.clientWidth:null;} function pageHeight() {return window.innerHeight != null? window.innerHeight: document.body != null? document.body.clientHeight:null;} /** * Soporte para DialogBox centrado en una pagina HTML */ //variable de control var dialogID = null; /** * Muestra un DIV + IFRAME en el centro de una pagina * dialogID: ID del dialog que sera centrado * url: URL del action que contiene la informacion que sera impresa dentro del DIV + IFRAME * ancho: Ancho del DIV + IFRAME * altura: Altura del DIV + IFRAME */ function openDialog(dialogID, url, ancho, altura) { this.dialogID = dialogID; //mostrar popup dhtml showBox(dialogID, ancho, altura, url, "true"); } /** * Oculta un DIV + IFRAME que se encuentra en el centro * de una pagina */ function closeDialog() { document.getElementById(dialogID + "_popup").style.display = "none"; /* soporte para lightbox */ var overlay = document.getElementById('_overlay'); if (overlay!=null) overlay.style.display='none'; } /********************************ACA EMPIEZA FCO LOVERA**************************************************/ /********************************************************************************************************/ /********************************************************************************************************/ function pageFirst1() { currentPage = 1; viewPage1(); } function pageLast1() { currentPage = lastPage; viewPage1(); } function pagePrev1() { if (currentPage>1) { currentPage=currentPage - 1; viewPage1(); } else alert("Está viendo la primera página."); } function pageNext1() { if (currentPage1) { currentPage=currentPage - 1; viewPage3(); } else alert("Está viendo la primera página."); } function pageNext3() { if (currentPage1) { currentPage=currentPage - 1; viewPage4(); } else alert("Está viendo la primera página."); } function pageNext4() { if (currentPage1) { currentPage=currentPage - 1; viewPage5(); } else alert("Está viendo la primera página."); } function pageNext5() { if (currentPage0)) ano = 2000 + uno; milisegundos=parseInt(incremento*24*60*60*1000); fecha = new Date(ano,mes,dia,0,0,0); tiempo=fecha.getTime(); total=fecha.setTime(parseInt(tiempo-milisegundos)); dia1=fecha.getDate(); mes1=fecha.getMonth(); anio1=fecha.getYear(); if (dia1<10) dia1='0'+dia1;if (mes1<10) mes1='0'+mes1; if ((anio1)<10)anio1='200'+anio1;else if (anio1<100)anio1='20'+anio1; else if ((anio1>100)&&(anio1<1000))anio1='2'+anio1; else anio1=anio1; oForm.value =dia1+"-"+mes1+"-"+anio1; } function number_format( number, decimals, dec_point, thousands_sep ) { var n = number, c = isNaN(decimals = Math.abs(decimals)) ? 2 : decimals; var d = dec_point == undefined ? "." : dec_point; var t = thousands_sep == undefined ? "," : thousands_sep, s = n < 0 ? "-" : ""; var i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + "", j = (j = i.length) > 3 ? j % 3 : 0; return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : ""); } function Formateo(dia1,mes1,ano1) { var dia=dia1; var mes=mes1; var ano=ano1; if (parseInt(mes) < 10) mes = "0" + eval(mes); if (eval(dia) < 10) dia = "0" + eval(dia); var fecha = dia +"-"+mes+"-"+ano; return fecha; } function ValidarFecha(Dia,Mes,Anyo) { var Dia_Mes_Mal = false; if( Dia == "" && Mes == "" && Anyo == "" ) return true; else { Dia = eval(Dia); Mes = eval(Mes); Anyo = eval(Anyo); if( !isNaN(Dia) && !isNaN(Mes) && !isNaN(Anyo) && (Dia >= 1) && (Dia <= 31) && (Anyo >= 1900) && (Anyo <= 2050) &&(Mes >=1) && (Mes <= 12)) { if((Mes == 1 || Mes == 3 || Mes == 5 || Mes == 7 || Mes == 8 || Mes == 10 || Mes == 12) && Dia > 31) Dia_Mes_Mal = true; if((Mes == 4 || Mes == 6 || Mes == 9 || Mes == 11) && Dia > 30) Dia_Mes_Mal = true; if( Mes == 2 && ( Dia > 29 || ( Dia == 29 && ((Anyo % 400 != 0) && ((Anyo % 4 != 0) || (Anyo % 100 == 0)))))) Dia_Mes_Mal = true; if(Dia_Mes_Mal) { return false; } else return true; } else { return false; } } } function IrFecha(campo) { var Error = "La fecha introducida es invalida.\n" + "Revisela, por favor."; var aux = str = campo.value; var oField = campo; var contador=pos=aux1=0; for (i=0;i -1) { if (aux1==2) pos ++; aux = aux.substr(aux1+1,aux.length); contador++; } } aux=str; if((str.length == 6)&&(contador==0)) { dia = str.substr(0,2); mes = str.substr(2,2); if (eval(mes)==0) mes = "aa"; else ano = str.substr(4,2); ano = "20"+ano; } else { if(contador==2) { var matriz = str.split("-"); dia = matriz[0]; mes = matriz[1]; if ((eval(mes)==0)&&(eval(mes) < 1)&&(eval(mes) > 12)) mes = "aa"; else mes = matriz[1]; ano = matriz[2]; if ((ano.length == 2)&&(eval(ano)!=0)) {ano = "20"+ano; } else { if ((ano.length == 1)&&(eval(ano)!=0)) {ano = "200"+ ano; } else if ((ano.length == 4)&&(eval(ano)!=0)) ano =ano; else ano = "aa"; } } else { alert(Error); oField.value=""; // oField.focus(); return false; } } if(ValidarFecha(eval(dia),eval(mes),eval(ano))) { oField.value=Formateo(eval(dia),eval(mes),eval(ano)); return true; } else { alert(Error); oField.value=""; // oField.focus(); return false; } } function clearCombobox(formName,comboName) { var f = document.forms[formName].elements[comboName]; for (var i=f.options.length-1;i>-1;i--) { f.options[i]=null; } var no1 = new Option(); no1.value = "0"; no1.text = "Seleccione"; f.options[0] = no1; } function clearComboboxTodo(formName,comboName) { var f = document.forms[formName].elements[comboName]; for (var i=f.options.length-1;i>-1;i--) { f.options[i]=null; } } function insertCombobox(formName,comboName,comboValue,comboText) { var f = document.forms[formName].elements[comboName]; i= f.options.length; var no = new Option(); no.value = comboValue; no.text = comboText; f.options[i] = no; } function pausa(numberMillis) { var now = new Date(); var exitTime = now.getTime() + numberMillis; while (true) { now = new Date(); if (now.getTime() > exitTime) return; } } function InvertirFecha(fecha) { var fechaarray=fecha.split("-"); newfecha=fechaarray[2]+"-"+fechaarray[1]+"-"+fechaarray[0]; return newfecha; } function ConvertirFecha(fecha) { var fechaarray=fecha.split("-"); newfecha=fechaarray[0]+"-"+fechaarray[1]+"-"+fechaarray[2]; return newfecha; } function setInputValue(inputName,inputValue,formName) { document.forms[formName].elements[inputName].value = inputValue; } function IsNumeric(strString) { var strValidChars = "0123456789."; var strChar; var blnResult = true; if (strString.length == 0) return false; for (i = 0; i < strString.length && blnResult == true; i++) { strChar = strString.charAt(i); if (strValidChars.indexOf(strChar) == -1) blnResult = false; } return blnResult; } function trim(cadena) { for(i=0; i=0; i=cadena.length-1) { if(cadena.charAt(i)==" ") cadena=cadena.substring(0,i); else break; } return cadena; } function privilegios(serv,formulario,variable) { texto ="usuario="+""+"&servicio="+serv+"&nameform="+formulario+"&variable="+variable; texto = "/action/privilegios/privilegio?"+texto; return ajaxCall(httpMethod="GET", uri=texto, divResponse=null, divProgress="status", formName=null, afterResponseFn=null, onErrorFn=null); } function getComboText(comboName,formName) { var combo = document.forms[formName].elements[comboName]; var indice = combo.selectedIndex; return combo.options[indice].text; } function keypressDoubleNegativo(e) { var mask = "0123456789.-"; var keyCode = e ? e.which : window.event.keyCode; var elem = e ? e.target : window.event.srcElement; var key = String.fromCharCode(keyCode); if (mask.indexOf(key)==-1 && keyCode != 8 && keyCode!=0 && keyCode!=13) return false; /*if (key=="." && elem.value.indexOf(".") > -1) return false;*/ } function gotoPage1(url) { //llamada Ajax... ajaxCall(httpMethod="GET", uri= url + "?pagenumber=" + currentPage, divResponse="response", divProgress="grid-progress", formName=null, afterResponseFn=null, onErrorFn=null); } function FormateoFecha(fecha) { // fecha --> document.form1.fecha.value var fechaarray=fecha.split("-"); var dia =fechaarray[0]; var mes =fechaarray[1]; var ano =fechaarray[2]; dia = dia * 1; mes = mes*1; if (dia < 10) {dia = "0"+dia; } if (mes<10) {mes = "0"+mes;} newfecha=dia+"-"+mes+"-"+ano; return newfecha; } function pageFirst7() { currentPage = 1; viewPage7(); } function pageLast7() { currentPage = lastPage; viewPage7(); } function pagePrev7() { if (currentPage>1) { currentPage=currentPage - 1; viewPage7(); } else alert("Está viendo la primera página."); } function pageNext7() { if (currentPage