//-------------------------------------------------------//
// Author:Rodolfo Machon
// Company:WebSoft, SA de CV 
// Nombre del archivo: inmueble_bsws.js
// Created: 2017-10-01
// Updates: 2017-10-01
// Copyright - All Rights Reserved
//-------------------------------------------------------//
//-------------------------------------------------------//
var openwindow=new Array(10);
//-------------------------------------------------------//
window.onload = function(){
    window.resizeTo(1000,765);
};
//-------------------------------------------------------//
// LEVEL 1
function passBackId (eid,gen){
    parent.opener.parent.opener.parent.form.document.getElementById("i8_"+gen+"_id").value = eid;
    parent.opener.parent.opener.parent.form.document.getElementById(gen).checked=true;
    parent.opener.parent.opener.parent.form.document.getElementById('ir').click();
    parent.opener.parent.close();
    close();
}
//--------------------------------------------------------//
// LEVEL 2

function OpenBalance(id,gen){
    var clase="";
    if (gen=="inmueble"){clase="inmueble";}
    if (gen=="empresa"){clase="empresa";}
    if (gen=="agua"){clase="agua";}
    if (gen=="puesto"){clase="puesto";}    
    winame=gen+"_balance";
    var fields="";
    var values="";
    if (!openwindow[winame] || openwindow[winame].closed){
        win ="window.open('../bin/BSWS.pl?clase="+clase+"&id="+id+"&fields="+fields+"&values="+values+"','"+winame+"','left=0,top=0,width=100,height=100,resizable=yes,scrollbars=yes')";
        openwindow[winame]=eval(win);
    }
    else{openwindow[winame].focus()}
}
//-------------------------------------------------------//
//-------------------------------------------------------//
// AUXILIAR
