﻿// JScript File

function AbrirVentana(sURL, sWidth, sHeight){
/************************************************
DESCRIPCION: Abre una ventana Modal

PARAMETROS:
   sURL - Direccion de la pagina a abrir
   sWidth - Ancho
   sHeight - Alto
   
RETORNA:
   True o False, segun si devuelve 1 o no.


*************************************************/
    var sParam;
    var sRet;
    
    sParam = "center:yes; resizable:no; status:no; ";
    sParam = sParam + "dialogWidth:" + sWidth + "px; dialogHeight:" + sHeight + "px";
    
    sRet = window.showModalDialog(sURL, window, sParam);
    return (sRet == "1");
}

function AVScroll(sURL, sWidth, sHeight)
{
/************************************************
DESCRIPCION: Abre una ventana Modal con Scrolls

PARAMETROS:
   sURL - Direccion de la pagina a abrir
   sWidth - Ancho
   sHeight - Alto
   
RETORNA:
   True o False, segun si devuelve 1 o no.
*************************************************/
    var sParam;
    var sRet;
    
    sParam = "center:yes; resizable:no; status:no; scrollbars:yes; ";
    sParam = sParam + "dialogWidth:" + sWidth + "px; dialogHeight:" + sHeight + "px";
    
    sRet = window.showModalDialog(sURL, window, sParam);
    return (sRet == "1");
}

function AbrirVentanaNoModal(sURL, sWidth, sHeight){
/************************************************
DESCRIPCION: Abre una ventana NO Modal

PARAMETROS:
   sURL - Direccion de la pagina a abrir
   sWidth - Ancho
   sHeight - Alto
   
RETORNA:
   True o False, segun si devuelve 1 o no.


*************************************************/
    var sParam;
    var sRet;
    
    sParam = "center:yes; resizable:no; status:no; scrollbars:yes;";
    sParam = sParam + "width:" + sWidth + "px; height:" + sHeight + "px";
    
    window.open(sURL, "", sParam);
    
}

function AbrirVentanaRequest(sURL, sWidth, sHeight){
/************************************************
DESCRIPCION: Abre una ventana Modal

PARAMETROS:
   sURL - Direccion de la pagina a abrir
   sWidth - Ancho
   sHeight - Alto
   
RETORNA:
   el valor que se asigne a RequestValue


*************************************************/
    var sParam;
    
    sParam = "center:yes; resizable:no; status:no; ";
    sParam = sParam + "dialogWidth:" + sWidth + "px; dialogHeight:" + sHeight + "px";
    
    return window.showModalDialog(sURL,window , sParam);
}

