// Miguel Luis González miguelktzar@hotmail.com  . Código libre, usar citando al autor
proporcion = 1;

function abrirVentana(url,title,ancho,alto){ //Abre la ventana y llama a al función que la hace crecer
//alert(ancho + " " +alto);
props = "height="+alto+",width="+ancho;
c = window.open('about:blank',"",props);
c.window.moveTo(100,100);
}

function Imagen(foto, x, y, titulo){
//alert(foto+" " +x+" " + y);

	ancho = (x/proporcion)+60 ;
	alto  = (y/proporcion)+106 ;
	x = x/proporcion ;
	y = y/proporcion ;
	//abrirVentana('about:blank','Exposición virtual',x+100,y+75);
	//
	props = "height="+alto+",width="+ancho;
	miVentana = window.open('about:blank',"",props);
	if(!titulo) {
		titulo = "";
		}

	
	//
	
	hola = '<html>'+
'<head>'+
'<title>Exposición Virtual</title>'+
'</head>'+
'<link rel="stylesheet" href="style.css" type="text/css">'+
'<body bgcolor="#919E8D" class="texto" text="#000000" leftmargin="0"  topmargin="0" marginheight="0" marginwidth="0">'+
'<div id="Layer1" style="position:absolute; width:65px; height:56px; z-index:1; left: 0; top: 0"><img src="img/logo_mini.gif" width="65" height="56"></div>'+
'<table width="100%" border="0" cellspacing="0" cellpadding="0">'+
'  <tr> '+
'    <td> '+
'      <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">'+
'        <tr> '+
'          <td bgcolor="cecec0" valign="middle" align="center" valign="center">'+ titulo +'<br><img src="' + foto + '" width="'+x+'" height="'+y+'"><br><br></td>'+
'        </tr>'+
'      </table>'+
'    </td>'+
'  </tr>'+
'  <tr> '+
'    <td bgcolor="#717E6D">'+
'      <div align="right"><a href="javascript:window.close();"><img src="img/cerrar.gif" width="50" height="13" border="0"></a></div>'+
'    </td>'+
'  </tr>'+
'</table>'+
'</body>'+
'</html>'
//alert(c);
	miVentana.document.write( hola ); 
		}


function test(){
error = 0;

if(window.document.formulario.EMAIL.value+window.document.formulario.TELEFONO.value == "") {
	alert("Para responderle necesitamos un teléfono y/o correo electrónico");
	error = 1;}

if (error > 0)
     	{
return false;
        }
else
	{
        return true;
     	}
 		}


