function kada_AutoResWindow(theURL, winName, width, height, features) {
    if (window.screen) {
        per_ancho = (width / 800) * 100;
        per_alto = (height / width) * 100;
        win_ancho = (screen.width * per_ancho) / 100;
        win_alto = (win_ancho * per_alto) / 100;
        x = (screen.width - win_ancho) / 2;
        y = (screen.height - win_alto) / 2;
    } else {
        x = 0;
        y = 0;
        win_ancho = w;
        win_alto = y;
    }
    winfeatures = ("top=" + y + ",left=" + x + ",width=655,height=700," + features);
    window.open(theURL, winName, winfeatures);
}