//Se utiliza en Portada. Selecciona el idioma de la web y nos lleva a una url
EntradaWeb = function (newIdioma, page) {
    //theForm.__Idioma.value = newIdioma;
    var form = document.forms[0];
    form.__Idioma.value = newIdioma;
    form.action = page;
    form.submit();
}
//Cambiamos el idioma de la web
CambiarIdioma = function (newIdioma) {
    var form = document.forms[0];
    //theForm.__Idioma.value = newIdioma;
    form.__Idioma.value = newIdioma;
    form.submit();
}
//Vamo a la url
Goto = function (page) {
    var form = document.forms[0];
    if (form.__GoPage == null){
        form.__GoPage.value = 0;
    } 
    form.action = page;
    form.submit();
}
//Vamo a la url asignando un Id para localización de registro
GotoById = function (page,id) {
    var form = document.forms[0];
    if (form.__GoPage == null){
        orm.__GoPage.value = 0;
    }
    form.__Id.value = id;
    form.action = page;
    form.submit();
}
//Vamos a la página de la grid ??
GoPage = function (number) {
    var form = document.forms[0];
    form.__GoPage.value = number.toString();
    form.submit();
}
//
OperCalculator = function (operation) {
    var form = document.forms[0];
    form.__OP.value = operation;
    form.submit();
}
ResetForm = function () {
 var form = document.forms[0];
    form.capital.value="";
    form.periodo.value="";
    form.interes.value=""; 
    form.cuota.value="";
 
}

// Redimensiona los iframes
function resizeFrame() {
    document.getElementById("oFrameBusc").style.height = eval("window.frames." + "oFrameBusc"+ ".document.documentElement.scrollHeight") + "px";        
}

// Focus para inputs en IE
sfFocus = function() {
    var sfEls = document.getElementsByTagName("INPUT");
    for (var i=0; i<sfEls.length; i++) {
        sfEls[i].onfocus=function() {
            this.className+=" sffocus";
        }
        sfEls[i].onblur=function() {
            this.className=this.className.replace(new RegExp(" sffocus\\b"), "");
        }
    }
}
if (window.attachEvent) window.attachEvent("onload", sfFocus);


// Focus para textareas en IE
sfFocus = function() {
    var sfEls = document.getElementsByTagName("TEXTAREA");
    for (var i=0; i<sfEls.length; i++) {
        sfEls[i].onfocus=function() {
            this.className+=" sffocus";
        }
        sfEls[i].onblur=function() {
            this.className=this.className.replace(new RegExp(" sffocus\\b"), "");
        }
    }
}
if (window.attachEvent) window.attachEvent("onload", sfFocus);


// Focus para select en IE
sfFocus = function() {
    var sfEls = document.getElementsByTagName("SELECT");
    for (var i=0; i<sfEls.length; i++) {
        sfEls[i].onfocus=function() {
            this.className+=" sffocus";
        }
        sfEls[i].onblur=function() {
            this.className=this.className.replace(new RegExp(" sffocus\\b"), "");
        }
    }
}
if (window.attachEvent) window.attachEvent("onload", sfFocus);

