﻿function Imprimir()
{
  inputs = document.getElementsByTagName("input");
  for(var i=0; i< inputs.length;i++)
  {
    inp = inputs[i];
    if(inp.checked && inp.label)
    {
        inp.label.innerHTML = "X";
    }    
  }
    window.print();
    
  inputs = document.getElementsByTagName("input");
  for(var i=0; i< inputs.length;i++)
  {
    inp = inputs[i];
    if(inp.checked && inp.label)
    {
        inp.label.innerHTML = " ";
    }
  }
}

function SoloNumeros(e)
{
    var tecla=new Number();
    if(window.event) {
        tecla = e.keyCode;
    }else if(e.which) {
        tecla = e.which;
    }else { return true; }
    if(tecla==8)
        return true;
    code9 = "9".charCodeAt(0);
    code0 = "0".charCodeAt(0);
    
    if(tecla <= code9 && tecla >= code0){
        return true;
    }  
    return false;
}

function ImagenDefault(imagen, tipo){
    if(tipo =='propiedad')
    {
        url = 'propiedades_uploads/nofoto.png';
        imagen.src= url;
    }else if(tipo =='edificio')
    {
        url = 'edificios_uploads/nofoto.png';
        imagen.src= url;
    }else if(tipo =='mapa')
    {
        url = 'images/nofotoHomeG.gif';
        imagen.src= url;
    }
}
////////////////////////////////////////////////////////
function abrirCalc() {
laURL = "CalculadoraConversor.aspx";
leftPos = 0;
topPos = 0;
ancho = 437;
alto = 225;
Mancho = ancho / 2;
Malto = alto / 2;
defstatus='no';
defscrollbars='no';
if (screen){
leftPos = (screen.width / 2) - Mancho;
topPos = (screen.height / 2) - Malto;
}
ElementWindow = window.open(laURL,'visor','status='+defstatus+',scrollbars='+defscrollbars+',width='+ancho+',height='+alto+',left='+leftPos+',top='+topPos);
ElementWindow.focus();
}
////////////////////////////////////////////////////////
////////////////////////////////////////////////////////
function abrirWindow(laURL, nombreVentana, ancho,alto,status,scrollbars) {
leftPos = 0;
topPos = 0;
Mancho = ancho / 2;
Malto = alto / 2;
defstatus='no';
defscrollbars='yes';
if (status!=''){
defstatus = status;
}
if (scrollbars!=''){
defscrollbars = scrollbars;
}
if (screen){
leftPos = (screen.width / 2) - Mancho;
topPos = (screen.height / 2) - Malto;
}
ElementWindow = window.open(laURL,nombreVentana,'resizable=1, status='+defstatus+',scrollbars='+defscrollbars+',width='+ancho+',height='+alto+',left='+leftPos+',top='+topPos);
ElementWindow.focus();
}
////////////////////////////////////////////////////////
