Calculadora V3

mail@pastecode.io avatar
unknown
plain_text
a year ago
183 kB
1
Indexable
Never
<!DOCTYPE html>
<!-- saved from url=(0037)https://calculadorav3.adejeverde.com/ -->
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><style>.LGLeeN-keyboard-shortcuts-view{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.LGLeeN-keyboard-shortcuts-view table,.LGLeeN-keyboard-shortcuts-view tbody,.LGLeeN-keyboard-shortcuts-view td,.LGLeeN-keyboard-shortcuts-view tr{background:inherit;border:none;margin:0;padding:0}.LGLeeN-keyboard-shortcuts-view table{display:table}.LGLeeN-keyboard-shortcuts-view tr{display:table-row}.LGLeeN-keyboard-shortcuts-view td{-moz-box-sizing:border-box;box-sizing:border-box;display:table-cell;color:#000;padding:6px;vertical-align:middle;white-space:nowrap}.LGLeeN-keyboard-shortcuts-view td:first-child{text-align:end}.LGLeeN-keyboard-shortcuts-view td kbd{background-color:#e8eaed;border-radius:2px;border:none;-moz-box-sizing:border-box;box-sizing:border-box;color:inherit;display:inline-block;font-family:Google Sans Text,Roboto,Arial,sans-serif;line-height:16px;margin:0 2px;min-height:20px;min-width:20px;padding:2px 4px;position:relative;text-align:center}
</style><style>.gm-control-active>img{-webkit-box-sizing:content-box;box-sizing:content-box;display:none;left:50%;pointer-events:none;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.gm-control-active>img:nth-child(1){display:block}.gm-control-active:focus>img:nth-child(1),.gm-control-active:hover>img:nth-child(1),.gm-control-active:active>img:nth-child(1),.gm-control-active:disabled>img:nth-child(1){display:none}.gm-control-active:focus>img:nth-child(2),.gm-control-active:hover>img:nth-child(2){display:block}.gm-control-active:active>img:nth-child(3){display:block}.gm-control-active:disabled>img:nth-child(4){display:block}sentinel{}
</style><link type="text/css" rel="stylesheet" href="./Calculadora - Adeje Verde_files/css"><link type="text/css" rel="stylesheet" href="./Calculadora - Adeje Verde_files/css(1)"><style>.gm-ui-hover-effect{opacity:.6}.gm-ui-hover-effect:hover{opacity:1}.gm-ui-hover-effect>span{background-color:#000}@media (forced-colors:active),(prefers-contrast:more){.gm-ui-hover-effect>span{background-color:ButtonText}}sentinel{}
</style><style>.gm-style .gm-style-cc a,.gm-style .gm-style-cc button,.gm-style .gm-style-cc span,.gm-style .gm-style-mtc div{font-size:10px;-webkit-box-sizing:border-box;box-sizing:border-box}.gm-style .gm-style-cc a,.gm-style .gm-style-cc button,.gm-style .gm-style-cc span{outline-offset:3px}sentinel{}
</style><style>@media print {  .gm-style .gmnoprint, .gmnoprint {    display:none  }}@media screen {  .gm-style .gmnoscreen, .gmnoscreen {    display:none  }}</style><style>.gm-style-moc{background-color:rgba(0,0,0,.45);pointer-events:none;text-align:center;-webkit-transition:opacity ease-in-out;-o-transition:opacity ease-in-out;transition:opacity ease-in-out}.gm-style-mot{color:white;font-family:Roboto,Arial,sans-serif;font-size:22px;margin:0;position:relative;top:50%;-o-transform:translateY(-50%);transform:translateY(-50%);-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%)}sentinel{}
</style><style>.gm-style img{max-width: none;}.gm-style {font: 400 11px Roboto, Arial, sans-serif; text-decoration: none;}</style>



<!-- Google Tag Manager -->
<script type="text/javascript" async="" src="./Calculadora - Adeje Verde_files/destination"></script><script type="text/javascript" charset="UTF-8" async="" src="./Calculadora - Adeje Verde_files/cc.js.descarga"></script><script type="text/javascript" async="" src="./Calculadora - Adeje Verde_files/uc.js.descarga" id="Cookiebot"></script><script async="" src="./Calculadora - Adeje Verde_files/gtm.js.descarga"></script><script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-NXV5LRK');</script>
<!-- End Google Tag Manager -->

<title> Calculadora - Adeje Verde</title>	
<link rel="icon" type="image/x-icon" href="https://calculadora.adejeverde.com/favicon.ico">

<style>.LGLeeN-keyboard-shortcuts-view{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.LGLeeN-keyboard-shortcuts-view table,.LGLeeN-keyboard-shortcuts-view tbody,.LGLeeN-keyboard-shortcuts-view td,.LGLeeN-keyboard-shortcuts-view tr{background:inherit;border:none;margin:0;padding:0}.LGLeeN-keyboard-shortcuts-view table{display:table}.LGLeeN-keyboard-shortcuts-view tr{display:table-row}.LGLeeN-keyboard-shortcuts-view td{-moz-box-sizing:border-box;box-sizing:border-box;display:table-cell;color:#000;padding:6px;vertical-align:middle;white-space:nowrap}.LGLeeN-keyboard-shortcuts-view td .VdnQmO-keyboard-shortcuts-view--shortcut-key{background-color:#e8eaed;border-radius:2px;border:none;-moz-box-sizing:border-box;box-sizing:border-box;color:inherit;display:inline-block;font-family:Google Sans Text,Roboto,Arial,sans-serif;line-height:16px;margin:0 2px;min-height:20px;min-width:20px;padding:2px 4px;position:relative;text-align:center}</style>
	<style>.gm-control-active>img{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:none;left:50%;pointer-events:none;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.gm-control-active>img:nth-child(1){display:block}.gm-control-active:focus>img:nth-child(1),.gm-control-active:hover>img:nth-child(1),.gm-control-active:active>img:nth-child(1),.gm-control-active:disabled>img:nth-child(1){display:none}.gm-control-active:focus>img:nth-child(2),.gm-control-active:hover>img:nth-child(2){display:block}.gm-control-active:active>img:nth-child(3){display:block}.gm-control-active:disabled>img:nth-child(4){display:block}sentinel{}</style>
	<link type="text/css" rel="stylesheet" href="./Calculadora - Adeje Verde_files/css(2)">
	<link type="text/css" rel="stylesheet" href="./Calculadora - Adeje Verde_files/css(3)">
	<style>.gm-ui-hover-effect{opacity:.6}.gm-ui-hover-effect:hover{opacity:1}.gm-ui-hover-effect>span{background-color:#000}@media (forced-colors:active),(prefers-contrast:more){.gm-ui-hover-effect>span{background-color:ButtonText}}sentinel{}</style>
	<style>.gm-style .gm-style-cc a,.gm-style .gm-style-cc button,.gm-style .gm-style-cc span,.gm-style .gm-style-mtc div{font-size:10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.gm-style .gm-style-cc a,.gm-style .gm-style-cc button,.gm-style .gm-style-cc span{outline-offset:3px}sentinel{}</style>
	<style>@media print {  .gm-style .gmnoprint, .gmnoprint {    display:none  }}@media screen {  .gm-style .gmnoscreen, .gmnoscreen {    display:none  }}</style><style>.gm-style-moc{background-color:rgba(0,0,0,.45);pointer-events:none;text-align:center;-webkit-transition:opacity ease-in-out;-o-transition:opacity ease-in-out;transition:opacity ease-in-out}.gm-style-mot{color:white;font-family:Roboto,Arial,sans-serif;font-size:22px;margin:0;position:relative;top:50%;-moz-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%);-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%)}sentinel{}</style>
	<style>.gm-style img{max-width: none;}.gm-style {font: 400 11px Roboto, Arial, sans-serif; text-decoration: none;}</style>
    
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
            
    <script src="./Calculadora - Adeje Verde_files/jquery.min.js.descarga"></script>
    <script src="./Calculadora - Adeje Verde_files/polyfill.min.js.descarga"></script>    
    <script src="./Calculadora - Adeje Verde_files/b4j_ws.js.descarga"></script>
    <script src="./Calculadora - Adeje Verde_files/html2canvas.js.descarga"></script>

    <style>

    #data-input {
        display: flex;
        flex-wrap: wrap;
    }

    #data-input-txt {
        flex: 1;
        padding: 20px;
    }

    #data-input-img {
        flex: 1;
        padding: 20px;
        text-align:center !important;
      }

    @media (max-width: 600px) {
        #data-input-txt, #data-input-img {
            flex: 100%;
        }
    }

    #btn1pers, #btn2pers, #btn3pers, #btn4pers, #btn5pers, #btndetailed {width: 15%;}

    #contenedor {width: 50%; padding: 20px; text-align: center; margin: 0 auto; background-color:#F1F3ED; margin-top:20px; margin-bottom:20px; }
    #addresstb, #tablaform, #tablaform2 {width: 60%}
    .input-datos-factura {width:120px; }
    #datos-factura tbody tr td {padding:10px;}

    .buttonstyle {
		word-break: keep-all; 
		border-radius: 15px;
		border-style: none; 
		width: 50%; 
		height: 60px; 
		background-color: #0F5677; 
		color: #FFFFFF; 
		font-family: Arial, Helvetica, sans-serif; 
		font-style: normal; 
		font-variant: normal; 
		text-transform: none; 
		font-weight: bold; 
		text-align: center; 
	}
	
	.buttonstylegrey {
		word-break: keep-all; 
		border-radius: 15px;
		border-style: none; 
		width: 50%; 
		height: 60px; 
		background-color: #C0C0C0; 
		color: #FFFFFF; 
		font-family: Arial, Helvetica, sans-serif; 
		font-style: normal; 
		font-variant: normal; 
		text-transform: none; 
		font-weight: bold; 
		text-align: center; 
	}
	
	.buttonstyledemand {
		word-break: keep-all; 
		border-radius: 15px;
		border-style: none; 
		width: 19%; 
		height: 60px; 
		background-color: #0F5677; 
		color: #FFFFFF; 
		font-family: Arial, Helvetica, sans-serif; 
		font-style: normal; 
		font-variant: normal; 
		text-transform: none; 
		font-weight: bold; 
		text-align: left; 
		margin-left: auto;
		margin-right: auto;
	}
	
	.buttonstyledemand:hover 
      {
      background-color:#FAA82A;
      transition: 0.5s;
      cursor: pointer;     
      }


    /* Tablet Portrait size to standard 960 (devices and browsers) */
@media only screen and (min-width: 768px) and (max-width: 989px) {

#contenedor {width: 80%; padding: 20px; text-align: center; margin: 0 auto; margin-top:20px;}
#addresstb, #tablaform {width: 70%}
.input-datos-factura {width:120px; }
.buttonstyle {
		word-break: keep-all; 
		border-radius: 15px;
		border-style: none; 
		width: 65%; 
		height: 60px; 
		background-color: #0F5677; 
		color: #FFFFFF; 
		font-family: Arial, Helvetica, sans-serif; 
		font-style: normal; 
		font-variant: normal; 
		text-transform: none; 
		font-weight: bold; 
		text-align: center; 
	}
	
.buttonstylegrey {
		word-break: keep-all; 
		border-radius: 15px;
		border-style: none; 
		width: 65%; 
		height: 60px; 
		background-color: #C0C0C0; 
		color: #FFFFFF; 
		font-family: Arial, Helvetica, sans-serif; 
		font-style: normal; 
		font-variant: normal; 
		text-transform: none; 
		font-weight: bold; 
		text-align: center; 
	}
	
.buttonstyledemand {
		word-break: keep-all; 
		border-radius: 15px;
		border-style: none; 
		width: 19%; 
		height: 60px; 
		background-color: #0F5677; 
		color: #FFFFFF; 
		font-family: Arial, Helvetica, sans-serif; 
		font-style: normal; 
		font-variant: normal; 
		text-transform: none; 
		font-weight: bold; 
		text-align: left; 
		margin-left: auto;
		margin-right: auto;
	}
	
	.buttonstyledemand:hover 
      {
      background-color:#FAA82A;
      transition: 0.5s;
      cursor: pointer;     
      }

}

/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
@media only screen and (min-width: 480px) and (max-width: 767px) {

	

#contenedor {width: 90%; padding: 20px; text-align: center; margin: 0 auto; margin-top:20px;}
#addresstb, #tablaform {width: 80%}
.input-datos-factura {width:80px; }
.buttonstyle {
		word-break: keep-all; 
		border-radius: 15px;
		border-style: none; 
		width: 80%; 
		height: 60px; 
		background-color: #0F5677; 
		color: #FFFFFF; 
		font-family: Arial, Helvetica, sans-serif; 
		font-style: normal; 
		font-variant: normal; 
		text-transform: none; 
		font-weight: bold; 
		text-align: center; 
	}
.buttonstylegrey {
		word-break: keep-all; 
		border-radius: 15px;
		border-style: none; 
		width: 80%; 
		height: 60px; 
		background-color: #C0C0C0; 
		color: #FFFFFF; 
		font-family: Arial, Helvetica, sans-serif; 
		font-style: normal; 
		font-variant: normal; 
		text-transform: none; 
		font-weight: bold; 
		text-align: center; 
	}
	
	.buttonstyledemand {
		word-break: keep-all; 
		border-radius: 15px;
		border-style: none; 
		width: 19%; 
		height: 60px; 
		background-color: #0F5677; 
		color: #FFFFFF; 
		font-family: Arial, Helvetica, sans-serif; 
		font-style: normal; 
		font-variant: normal; 
		text-transform: none; 
		font-weight: bold; 
		text-align: left;
		margin-left: auto;
		margin-right: auto; 
	}
	
	.buttonstyledemand:hover 
      {
      background-color:#FAA82A;
      transition: 0.5s;
      cursor: pointer;     
      }

	
}



/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
@media only screen and (max-width: 479px) {
.auto-style39, .auto-style48 {font-size: 30px; line-height: 25px;}

#btn1pers, #btn2pers, #btn3pers, #btn4pers, #btn5pers, #btndetailed {width: 90%;}
#contenedor {width: 85%; padding: 20px; text-align: center; margin: 0 auto; margin-top:20px;}
#addresstb, #tablaform {width: 80%}
.input-datos-factura {width:70px; }
.buttonstyle {
		word-break: keep-all; 
		border-radius: 15px;
		border-style: none; 
		width: 80%; 
		height: 60px; 
		background-color: #0F5677; 
		color: #FFFFFF; 
		font-family: Arial, Helvetica, sans-serif; 
		font-style: normal; 
		font-variant: normal; 
		text-transform: none; 
		font-weight: bold; 
		text-align: center; 
	}
.buttonstylegrey {
		word-break: keep-all; 
		border-radius: 15px;
		border-style: none; 
		width: 80%; 
		height: 60px; 
		background-color: #C0C0C0; 
		color: #FFFFFF; 
		font-family: Arial, Helvetica, sans-serif; 
		font-style: normal; 
		font-variant: normal; 
		text-transform: none; 
		font-weight: bold; 
		text-align: center; 
	}
	.buttonstyledemand {
		word-break: keep-all; 
		border-radius: 15px;
		border-style: none; 
		width: 19%; 
		height: 60px; 
		background-color: #0F5677; 
		color: #FFFFFF; 
		font-family: Arial, Helvetica, sans-serif; 
		font-style: normal; 
		font-variant: normal; 
		text-transform: none; 
		font-weight: bold; 
		text-align: left; 
		margin-left: auto;
		margin-right: auto;
	}
	
	.buttonstyledemand:hover 
      {
      background-color:#FAA82A;
      transition: 0.5s;
      cursor: pointer;     
      }

}

    /* The alert message box */
	.alert {
  		width: "150px";
		height: "auto"; 
		background: "white"; 
		borderRadius: "5px";
		padding: "6px";
		fontFamily: "Arial,Helvetica";
		textAlign: "center";
		fontSize:"13px";
		zIndex:"999999";
	}	
	.style_hidden {
		font-family: Arial, Helvetica, sans-serif;
		font-size: medium;
		color: #0F5677;
		margin-left: 0px;
		display:none;
		position: relative;
		text-align: center;
	}
	.style_visible {
		font-family: Arial, Helvetica, sans-serif;
		font-size: medium;
		color: #0F5677;
		margin-left: 0px;
		visibility:visible
	}
	.style_visible_nosize {
		font-family: Arial, Helvetica, sans-serif;
		color: #0F5677;
		margin-left: 0px;
		visibility:visible
	}
	
	html, body {
		height: 100%;
		font-family: Arial, Helvetica, sans-serif;
		font-size: medium;
		color: #0F5677;
		margin: 0 auto;
		padding: 0;
    }

h1 {padding-top: 12px; margin: 0px;}
#lista-ordenada {
        font-size: 14px;  
        font-weight: normal; 
        text-align: left;
        padding: 20px 20px 0px 40px;
        }
#lista-ordenada li {margin-bottom: 20px;}

.clearer {clear: both;}

    #map {
		height:0;
		overflow: hidden;
		padding-bottom: 56%;
		position: relative;
		
		/*Chrome,Safari*/
		-webkit-clip-path: inset(0px);
		/* Firefox*/
		clip-path: inset(0px);
		/* iOS support */
		-webkit-mask: inset(0px);
	}
    
	.buttonstyle:hover 
      {
      background-color:#FAA82A;
      transition: 0.5s;
      cursor: pointer;
      }
      
	.buttonstyle:active 
      {
      background-color:#FAA82A;
      }


	.buttonstylegrey:hover 
      {
      background-color:#FAA82A;
      transition: 0.5s;
      }

	.buttonstyledemand:focus 
      {
      background-color:#FAA82A;
      }
      
	.buttonstyledemand:hover 
      {
      background-color:#FAA82A;
      transition: 0.5s;
      cursor: pointer;    
      }
	
	.inputbox {
		border: 2px solid #FAA82A; 
		border-radius: 15px 15px 15px 15px; 
		background-color: #FFFFFF; 
		vertical-align: middle; 
		text-align: center; 
		font-size: medium; 
		padding: 10px; 
		font-size: 14px;
		}
		
	.inputbox.hover {
		cursor: pointer;
		}	


	.fixedhelpbutton {
	    position: fixed;
	    bottom: 75%;
	    right: 10px;
	    word-break: keep-all; 
		border-radius: 15px;
		border-style: none; 
		width: 60px; 
		height: 30px; 
		background-color:#FAA82A; 
		color: #0F5677; 
		font-family: Arial, Helvetica, sans-serif; 
		font-style: normal; 
		font-variant: normal; 
		text-transform: none; 
		font-weight: bold; 
		text-align: center;
		overflow: hidden;
		
		
	}

   .fixedhelpbutton:hover   {
	    height: 150px;
	    width: 150px; 
	    transition: 0.5s;
	    cursor: pointer;
	}

	.fixedhelpbutton:hover:after {
	    height: 200px; 
	    transition: 0.5s;
	    content:"click aqui"; 
	    color:blue;
	}
	
	
	.helpbutton {
	    position: relative;
	    margin-top: 0%;
	    margin-right: auto;
	    margin-left: auto;

	    word-break: keep-all; 
		
		border-style: none; 
		width: 100%; 
		height: 40px; 
		background-color:#FAA82A; 
		color: #0F5677; 
		font-family: Arial, Helvetica, sans-serif; 
		font-style: normal; 
		font-variant: normal; 
		text-transform: none; 
		font-weight: bold; 
		text-align: center;
		overflow: hidden; 
		
	}

  .helpbutton:hover   {
	    height: 190px; 
	    transition: 0.5s;
	    cursor: pointer;
	}

	.helpbutton:hover:after {
	    height: 160px; 
	    transition: 0.5s;
	    content:"click aqui"; 
	    color:blue;
	}

	.auto-style1 {
		font-size: small;
	}

	.auto-style2 {
		text-align: center;
	}
	
	.scalecontainer {
		position: relative;
	}

	.scaletxt {
	    position: absolute;
	    top: 0px;
	    left: 70%;
	   }

	.auto-style3 {
		font-size: small;
		text-align: right;
	}

	.auto-style5 {
		color: #FF0000;
	}

	.auto-style6 {
		border: 0 solid #E5E5E5;
		font-size: small;
		text-align: center;
		background-color: #E5E5E5;
	}

	.auto-style8 {
		font-family: Arial, Helvetica, sans-serif;
		font-size: medium;
		color: #0F5677;
		margin-left: 0px;
		display: block;
		position: relative;
		text-align: center;
	}
	.auto-style9 {
		font-size: small;
		text-align: left;
	}
	
	.auto-style11 {
		text-align: center;
		}

	.auto-style14 {
		border: 0px solid #0F5677;
		text-align: center;
		background-color: rgba(255, 255, 255, 0.5);
	}
	.auto-style15 {
		border: 0 solid #E5E5E5;
		background-color: #E5E5E5;
	}
	.auto-style16 {
		border: 0 solid #E5E5E5;
		text-align: center;
		background-color: #E5E5E5;
	}
	.auto-style18 {
		border-style: solid;
		border-color: #CCCCCC;
		background-color: #CCCCCC;
	}
	
	.zoom {
		visibility: visible;
		text-align: center;
		border: 0px;  
        height: 40px;
        width: 40px;
        left: 50%; 
		background-position: center center;  
		background-size: 40px auto;
		background-color: transparent;
	}
    
    .zoom:hover{
    	transition: 0.5s;
    	transform:scale(1.25);
    	cursor:pointer;
    }

	.auto-style23 {
		font-family: Arial, Helvetica, sans-serif;
		color: #0F5677;
		visibility: visible;
		text-align: left;
	}

	.auto-style27 {
	border-style: solid;
	border-color: #CCCCCC;
	background-color: #CCCCCC;
	text-align: center;
}
.auto-style28 {
	border: 0 solid #E5E5E5;
	background-color: #E5E5E5;
}

	.auto-style29 {
		text-align: center;
		color: #FF0000;
		font-family: Arial, Helvetica, sans-serif;
		font-size: medium;
		font-weight: normal;
		font-style: normal;
		font-variant: normal;
	}

	.auto-style39 {
	color: #FFFFFF;
}

	.auto-style42 {
		text-align: left;
	}

  /* Style for the popup overlay */
    .popup-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      width: 100%;
      
      background-color: rgba(0, 0, 0, 0.5); /* semi-transparent black background */
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 9999; /* ensure the overlay is on top of other elements */
      opacity: 0;
      pointer-events: none; /* prevent clicking on elements below the overlay */
      transition: opacity 0.5s ease-in-out; /* add smooth transition effect */

    }

    /* Style for the popup content */
    .popup-content {
        position: fixed;
        padding: 20px;
        width: 100%;
        transform: translate(-50%, -50%); 
        margin-left:auto;
    	margin-right: auto;   
        background-color: rgba(255, 255, 255, 1);    	
        text-align: center;
        border-radius: 15px;

    	max-width: 500px;
    	top: 50%;
    	left: 50%;
    }

    /* Style for the close button */
    .popup-close {
      position: absolute;
      top: 10px;
      right: 10px;
      cursor: pointer;
    }

	.auto-style43 {
		font-size: medium;
	}

.imgbtn{
    justify-content: center;
    align-items: center;
    }

.imgbtn{
    transition: transform .3s;
    height:95px;
    margin:0 auto;
    border-radius: 10px;    
    }

.imgbtn:hover{
    transform:scale(1.25);
    }
	.auto-style44 {
		background-color: #FFFFFF;
	}
	.auto-style45 {
		/*margin-left: 0px;
		table-layout: auto;
		max-width:100%;
		white-space:nowrap;
		width: 100%;
		word-wrap: break-all;*/
	}
	.auto-style46 {
		text-align: right;
	}
	.auto-style47 {
		font-size: x-small;
	}
	.auto-style48 {
		color: #FAA82A;
	}
	.auto-style54 {
		font-family: Arial, Helvetica, sans-serif;
		color: #0F5677;
		visibility: visible;
		text-align: left;
		font-size: large;
	}
		
	.trashbtn {
		width: 90%;
		text-align:center;
		background-color: #FFFFFF; 
		border-top-right-radius: 15px;
		border-bottom-right-radius: 15px; 
		border: none;  
		padding: 10px;
		background-repeat: no-repeat; 
		background-position: center center; 
		background-size: 20px; 
		height: 35px;
		background-image: url('AVapp_files/borrar.png');	
    }

    .trashbtn:hover {
	cursor:pointer;
	}
	
	#loading {
	  position: fixed;
	  display: block;
	  width: 100%;
	  height: 100%;
	  top: 0;
	  left: 0;
	  text-align: center;
	  opacity: 0.9;
	  background-color: #fff;
	  z-index: 99;
	}
	
	#loading-image {
	  position: absolute;
	  text-align:center;
	  z-index: 100;
	}
	
	/*
	.field-tip {
    position:relative;
    cursor:help;
}
    .field-tip .tip-content {
        position:absolute;
        top:-10px; 
        right:9999px;
        width:200px;
        margin-right:-220px;
        padding:10px;
        color:#fff;
        background:#333;
        -webkit-box-shadow:2px 2px 5px #aaa;
           -moz-box-shadow:2px 2px 5px #aaa;
                box-shadow:2px 2px 5px #aaa;
        opacity:0;
        -webkit-transition:opacity 250ms ease-out;
           -moz-transition:opacity 250ms ease-out;
            -ms-transition:opacity 250ms ease-out;
             -o-transition:opacity 250ms ease-out;
                transition:opacity 250ms ease-out;
    }
        
        .field-tip .tip-content:before {
            content:' '; 
            position:absolute;
            top:50%;
            left:-16px; 
            width:0;
            height:0;
            margin-top:-8px; 
            border:8px solid transparent;
            border-right-color:#333;
        }
     */  
	.auto-style55 {
		margin-left: 40px;
	}
              
	.auto-style56 {
		margin-left: 40px;
		text-align: center;
	}
              
	.auto-style57 {
		margin-left: 20px;
		text-align: left;
	}
	
	.undobtn {
	  	visibility: visible;
		text-align: center;
		border: 0px;  
        height: 40px;
        width: 40px;
        left: 50%; 
		background-position: center center;  
		background-size: 40px auto;
		background-color: transparent;

	}
	
	.undobtn .tooltiptext {
	  visibility: hidden;
	  width: 120px;
	  background-color: white;
	  color: #0F5677;
	  text-align: center;
	  border-radius: 5px;
	  padding: 6px;
	  position: absolute;
	  z-index: 1;
	  bottom: 125%;
	  left: 50%;
	  margin-left: -60px;
	  opacity: 0.7;
	  transition: opacity 0.5s;
	  height : auto; 
	  font-family: Arial;
	  font-size: 12px;
	}
	
	.undobtn:hover .tooltiptext {
	  visibility: visible;
	  opacity: 1;
	}
     
	.undobtn:hover {
	  transition: 0.5s;
      transform:scale(1.25);
      cursor:pointer;
	}
         
	</style>


 <script src="./Calculadora - Adeje Verde_files/common.js.descarga"></script><script src="./Calculadora - Adeje Verde_files/util.js.descarga"></script><script src="./Calculadora - Adeje Verde_files/map.js.descarga"></script><script src="./Calculadora - Adeje Verde_files/maxzoom.js.descarga"></script><script src="./Calculadora - Adeje Verde_files/onion.js.descarga"></script><script src="./Calculadora - Adeje Verde_files/controls.js.descarga"></script><script src="./Calculadora - Adeje Verde_files/marker.js.descarga"></script><script src="./Calculadora - Adeje Verde_files/geometry.js.descarga"></script><script src="./Calculadora - Adeje Verde_files/poly.js.descarga"></script>

 <script type="text/javascript" charset="UTF-8" src="./Calculadora - Adeje Verde_files/common.js(1).descarga"></script><script type="text/javascript" charset="UTF-8" src="./Calculadora - Adeje Verde_files/util.js(1).descarga"></script><script type="text/javascript" charset="UTF-8" src="./Calculadora - Adeje Verde_files/map.js(1).descarga"></script><script type="text/javascript" charset="UTF-8" src="./Calculadora - Adeje Verde_files/maxzoom.js(1).descarga"></script><style type="text/css" id="CookieConsentStateDisplayStyles">.cookieconsent-optin-preferences,.cookieconsent-optin-statistics,.cookieconsent-optin-marketing,.cookieconsent-optin{display:none;}.cookieconsent-optout-preferences,.cookieconsent-optout-statistics,.cookieconsent-optout-marketing,.cookieconsent-optout{display:block;display:initial;}</style><script type="text/javascript" charset="UTF-8" src="./Calculadora - Adeje Verde_files/onion.js(1).descarga"></script><script type="text/javascript" charset="UTF-8" src="./Calculadora - Adeje Verde_files/controls.js(1).descarga"></script><script type="text/javascript" charset="UTF-8" src="./Calculadora - Adeje Verde_files/marker.js(1).descarga"></script><script type="text/javascript" charset="UTF-8" src="./Calculadora - Adeje Verde_files/geometry.js(1).descarga"></script><script type="text/javascript" charset="UTF-8" src="./Calculadora - Adeje Verde_files/poly.js(1).descarga"></script></head>
 
 <body style="margin:0 auto; text-align:center;" cz-shortcut-listen="true">
 
 <div id="loading" style="display: none;">
  <h2><br><br><br><br><br><br><br><br><br></h2>
  <img id="loading-image" src="./Calculadora - Adeje Verde_files/ajax-loader.gif" alt="Loading...">
  <h2><br><br><br><br>Preparando calculadora, por favor espere ...</h2>
 </div>

 <!-- Google Tag Manager (noscript) -->
 <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NXV5LRK"
 height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
 <!-- End Google Tag Manager (noscript) -->

 <div id="contenedor" class="auto-style46">
    
	 <div id="myheader" class="style_visible" style="width:100%;"> 
	 	<div>
	 		<img alt="Adejeverde" src="./Calculadora - Adeje Verde_files/AVlogo.png" width="150">
	 	</div> 
	 	
	    <table style="object-fit: fill; background-image: url(&#39;AVapp_files/PV.jpg&#39;); background-repeat: no-repeat; background-position: center top; border-style: solid; border-color: #005279;  border-width: thin; border-radius: 15px; padding: 15px 25px 25px 25px; background-color: #005279;">
			<tbody>
				<tr>			
					<td style="font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: medium;width:100%; height: 244px;">	
					<h2 class="elementor-heading-title elementor-size-default" style="box-sizing:border-box;margin:0px;font-family:Lato,sans-serif;line-height:1em;font-size:42px;padding:0px">
					<span class="auto-style39">Averigua cuánto puedes ahorrar con </span><span class="auto-style48">una instalación fotovoltaica.</span>&nbsp;</h2>
					<h2 class="elementor-heading-title elementor-size-default" style="font-family:Lato,sans-serif;font-size:32px;box-sizing:border-box;margin:0px;font-weight:400;line-height:1.2em;padding:0px">
					<span class="auto-style39">Sigue los pasos de esta calculadora y obtén tu presupuesto y estimación de ahorro <br></span> 
					<span class="auto-style48"><strong>en sólo 2 minutos.</strong></span></h2>
					</td>
				</tr>
		    </tbody>
		</table>
	 </div>
	 
	<div id="paddress" class="style_visible" style="left: 0px; top: 0px;  border-style: solid; margin: 0 auto; border-width: thin; border-radius: 15px; background-color: #DADBD7; width:100%; margin-top:25px; border-color: #DADBD7;">		
		<div class="auto-style11">
			<h2 style="text-align: left; padding-left: 20px;">¿Dónde está ubicada tu casa/edificio?</h2>	
			<input id="addresstb" type="text" style="border: 2px solid #FAA82A; border-radius: 15px 15px 15px 15px; background-color: #FFFFFF; vertical-align: middle; text-align: left; font-size: medium; padding: 10px; font-size: 14px;" placeholder="calle y número, ciudad">
			<br><br>
            <button type="submit" id="btnsearch" style="border-radius: 25px 25px 25px 25px; height: 44px; max-width: 200px;" class="buttonstyle">
			<strong>Buscar</strong></button>
			<br>&nbsp;
		</div>
    </div>
          
 	 <div class="auto-style2">
          
 	<!--div id="mapintro" class="style_hidden" style="width: 100%; background-color: #DADBD7; border-radius: 15px;">

		<h2 style="text-align: left; padding: 20px 0px 0px 20px;">Evalua el tamaño y la orientación de tu tejado</h2>

		<div>
				<img alt="como marcar" src="AVapp_files/comomarcar.gif" class="auto-style32"
				style="vertical-align: middle; margin: 0px 30px 30px 20px; border: 20px solid #F1F3ED; text-align: center; float:left;">
	
				<ul id="lista-ordenada">
					<li><strong>Localiza tu tejado</strong></li>
					<li><strong>Delimita tu tejado</strong> haciendo click en las esquinas y adaptando el área en sentido horario o antihorario </li>
					<li><strong>Indica la inclinación del tejado.</strong> Si es un tejado plano, haz click sobre el círculo naranja del centro. Si presenta inclinación, haz click sobre el círculo naranja de la vertiente correspondiente</li>				    
					<br>&nbsp;
					<br>&nbsp;
					<button id="btnunderstood" onclick="showmap()" style="border-radius: 25px 25px 25px 25px; height: 44px; width: 200px;" class="buttonstyle"><strong>Seguir</strong></button>
					<br>&nbsp;
					<br>&nbsp;
				</ul>
		</div>
	</div-->		
		 
	<div id="mapcontrol" class="style_hidden" style="left: 0px; top: 0px; margin: 25px auto 0px; border-width: thin; border-radius: 15px; background-color: rgb(218, 219, 215); width: 100%; border-color: grey; display: block;">     	
		 <br>&nbsp;

		 <div class="clearer"></div>
     	 <button id="fixedhelpbutton" onclick="help()" class="helpbutton" style="display: block;">	<span><br>¿Tienes dificultades de avanzar? <br><br>Si lo deseas, elaboraremos el diseño y la oferta para ti.<br><br> Llámanos al +34 658 60 28 31o visite nuestra pagina de contacto, <br>haciendo </span></button>


		<div id="map" style="display: block; position: relative; overflow: hidden; transform: scale(1); clip-path: inset(0%);"><div style="height: 100%; width: 100%; position: absolute; top: 0px; left: 0px; background-color: rgb(229, 227, 223);"><div class="gm-style" style="position: absolute; z-index: 0; left: 0px; top: 0px; height: 100%; width: 100%; padding: 0px; border-width: 0px; margin: 0px;"><div><button draggable="false" aria-label="Combinaciones de teclas" title="Combinaciones de teclas" type="button" style="background: none transparent; display: block; border: none; margin: 0px; padding: 0px; text-transform: none; appearance: none; position: absolute; cursor: pointer; user-select: none; z-index: 1000002; outline-offset: 3px; right: 0px; bottom: 0px; transform: translateX(100%);"></button></div><div tabindex="0" aria-label="Mapa" aria-roledescription="mapa" role="region" style="position: absolute; z-index: 0; left: 0px; top: 0px; height: 100%; width: 100%; padding: 0px; border-width: 0px; margin: 0px; cursor: pointer; touch-action: none;" aria-describedby="27178DA3-9182-449E-BEE5-A8AD3B020F6D"><div style="z-index: 1; position: absolute; left: 50%; top: 50%; width: 100%; will-change: transform; transform: translate(0px, 0px);"><div style="position: absolute; left: 0px; top: 0px; z-index: 100; width: 100%;"><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><div style="position: absolute; z-index: 979; transform: matrix(1, 0, 0, 1, -68, -82);"><div style="position: absolute; left: 0px; top: 0px; width: 256px; height: 256px;"><div style="width: 256px; height: 256px;"></div></div><div style="position: absolute; left: 0px; top: -256px; width: 256px; height: 256px;"><div style="width: 256px; height: 256px;"></div></div><div style="position: absolute; left: 256px; top: -256px; width: 256px; height: 256px;"><div style="width: 256px; height: 256px;"></div></div><div style="position: absolute; left: 256px; top: 0px; width: 256px; height: 256px;"><div style="width: 256px; height: 256px;"></div></div><div style="position: absolute; left: 256px; top: 256px; width: 256px; height: 256px;"><div style="width: 256px; height: 256px;"></div></div><div style="position: absolute; left: 0px; top: 256px; width: 256px; height: 256px;"><div style="width: 256px; height: 256px;"></div></div><div style="position: absolute; left: -256px; top: 256px; width: 256px; height: 256px;"><div style="width: 256px; height: 256px;"></div></div><div style="position: absolute; left: -512px; top: 256px; width: 256px; height: 256px;"><div style="width: 256px; height: 256px;"></div></div><div style="position: absolute; left: -256px; top: 0px; width: 256px; height: 256px;"><div style="width: 256px; height: 256px;"></div></div><div style="position: absolute; left: -256px; top: -256px; width: 256px; height: 256px;"><div style="width: 256px; height: 256px;"></div></div><div style="position: absolute; left: -512px; top: 0px; width: 256px; height: 256px;"><div style="width: 256px; height: 256px;"></div></div><div style="position: absolute; left: -512px; top: -256px; width: 256px; height: 256px;"><div style="width: 256px; height: 256px;"></div></div><div style="position: absolute; left: 512px; top: -256px; width: 256px; height: 256px;"><div style="width: 256px; height: 256px;"></div></div><div style="position: absolute; left: 512px; top: 0px; width: 256px; height: 256px;"><div style="width: 256px; height: 256px;"></div></div><div style="position: absolute; left: 512px; top: 256px; width: 256px; height: 256px;"><div style="width: 256px; height: 256px;"></div></div></div></div></div><div style="position: absolute; left: 0px; top: 0px; z-index: 101; width: 100%;"><div style="position: absolute; left: 0px; top: 0px; z-index: 30;"><div style="position: absolute; z-index: 979; transform: matrix(1, 0, 0, 1, -68, -82);"><div style="width: 256px; height: 256px; position: absolute; left: -256px; top: 0px;"></div><div style="width: 256px; height: 256px; position: absolute; left: -256px; top: -256px;"></div><div style="width: 256px; height: 256px; position: absolute; left: -512px; top: 0px;"></div><div style="width: 256px; height: 256px; position: absolute; left: -512px; top: -256px;"></div><div style="width: 256px; height: 256px; position: absolute; left: -256px; top: 256px;"></div><div style="width: 256px; height: 256px; position: absolute; left: -512px; top: 256px;"></div><div style="width: 256px; height: 256px; position: absolute; left: 0px; top: 0px;"></div><div style="width: 256px; height: 256px; position: absolute; left: 0px; top: -256px;"></div><div style="width: 256px; height: 256px; position: absolute; left: 256px; top: -256px;"></div><div style="width: 256px; height: 256px; position: absolute; left: 256px; top: 0px;"><canvas width="256" height="256" draggable="false" style="width: 256px; height: 256px; user-select: none; position: absolute; left: 0px; top: 0px;"></canvas></div><div style="width: 256px; height: 256px; position: absolute; left: 256px; top: 256px;"><canvas width="256" height="256" draggable="false" style="width: 256px; height: 256px; user-select: none; position: absolute; left: 0px; top: 0px;"></canvas></div><div style="width: 256px; height: 256px; position: absolute; left: 0px; top: 256px;"></div><div style="width: 256px; height: 256px; position: absolute; left: 512px; top: -256px;"></div><div style="width: 256px; height: 256px; position: absolute; left: 512px; top: 0px;"><canvas width="256" height="256" draggable="false" style="width: 256px; height: 256px; user-select: none; position: absolute; left: 0px; top: 0px;"></canvas></div><div style="width: 256px; height: 256px; position: absolute; left: 512px; top: 256px;"><canvas width="256" height="256" draggable="false" style="width: 256px; height: 256px; user-select: none; position: absolute; left: 0px; top: 0px;"></canvas></div></div></div></div><div style="position: absolute; left: 0px; top: 0px; z-index: 102; width: 100%;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 103; width: 100%;"><div style="position: absolute; left: 0px; top: 0px; z-index: -1;"><div style="position: absolute; z-index: 979; transform: matrix(1, 0, 0, 1, -68, -82);"><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 0px; top: 0px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 0px; top: -256px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 256px; top: -256px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 256px; top: 0px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: -256px; top: 0px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: -256px; top: -256px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: -512px; top: 0px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: -512px; top: -256px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 256px; top: 256px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 0px; top: 256px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: -256px; top: 256px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: -512px; top: 256px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 512px; top: -256px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 512px; top: 0px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 512px; top: 256px;"></div></div></div><div style="width: 39px; height: 39px; position: absolute; left: 390px; top: 57px; z-index: 80;"><canvas width="39" height="39" draggable="false" style="width: 39px; height: 39px; position: absolute; left: 0px; top: 0px; user-select: none;"></canvas></div><div style="width: 0px; height: 0px; overflow: hidden; position: absolute; left: 508px; top: 241px; z-index: 244;"><img alt="" src="./Calculadora - Adeje Verde_files/orangecircs.png" draggable="false" style="position: absolute; left: 0px; top: 0px; width: 0px; height: 0px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none; opacity: 1;"></div><div style="transform: translateZ(0px); position: absolute; left: 498px; top: 241px; z-index: 244;"><div style="height: 100px; transform: translate(-50%, -50px); display: table; border-spacing: 0px;"><div style="display: table-cell; vertical-align: middle; white-space: nowrap; text-align: center;"><div class="" aria-hidden="true" style="color: rgb(255, 255, 255); font-size: 22px; font-weight: 600; font-family: Roboto, Arial, sans-serif;">1</div></div></div></div></div><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><div style="position: absolute; z-index: 979; transform: matrix(1, 0, 0, 1, -68, -82);"><div style="position: absolute; left: 0px; top: 0px; width: 256px; height: 256px; transition: opacity 200ms linear 0s;"><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/kh" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/vt" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div></div><div style="position: absolute; left: -256px; top: 0px; width: 256px; height: 256px; transition: opacity 200ms linear 0s;"><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/kh(1)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/vt(1)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div></div><div style="position: absolute; left: -256px; top: -256px; width: 256px; height: 256px; transition: opacity 200ms linear 0s;"><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/kh(2)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/vt(2)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div></div><div style="position: absolute; left: 0px; top: -256px; width: 256px; height: 256px; transition: opacity 200ms linear 0s;"><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/kh(3)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/vt(3)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div></div><div style="position: absolute; left: 256px; top: -256px; width: 256px; height: 256px; transition: opacity 200ms linear 0s;"><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/kh(4)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/vt(4)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div></div><div style="position: absolute; left: 256px; top: 0px; width: 256px; height: 256px; transition: opacity 200ms linear 0s;"><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/kh(5)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/vt(5)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div></div><div style="position: absolute; left: 256px; top: 256px; width: 256px; height: 256px; transition: opacity 200ms linear 0s;"><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/kh(6)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/vt(6)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div></div><div style="position: absolute; left: 0px; top: 256px; width: 256px; height: 256px; transition: opacity 200ms linear 0s;"><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/kh(7)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/vt(7)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div></div><div style="position: absolute; left: -256px; top: 256px; width: 256px; height: 256px; transition: opacity 200ms linear 0s;"><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/kh(8)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/vt(8)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div></div><div style="position: absolute; left: -512px; top: 256px; width: 256px; height: 256px; transition: opacity 200ms linear 0s;"><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/kh(9)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/vt(9)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div></div><div style="position: absolute; left: -512px; top: 0px; width: 256px; height: 256px; transition: opacity 200ms linear 0s;"><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/kh(10)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/vt(10)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div></div><div style="position: absolute; left: -512px; top: -256px; width: 256px; height: 256px; transition: opacity 200ms linear 0s;"><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/kh(11)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/vt(11)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div></div><div style="position: absolute; left: 512px; top: -256px; width: 256px; height: 256px; transition: opacity 200ms linear 0s;"><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/kh(12)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/vt(12)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div></div><div style="position: absolute; left: 512px; top: 0px; width: 256px; height: 256px; transition: opacity 200ms linear 0s;"><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/kh(13)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/vt(13)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div></div><div style="position: absolute; left: 512px; top: 256px; width: 256px; height: 256px; transition: opacity 200ms linear 0s;"><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/kh(14)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"><img draggable="false" alt="" role="presentation" src="./Calculadora - Adeje Verde_files/vt(14)" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div></div></div></div></div><div style="z-index: 3; position: absolute; height: 100%; width: 100%; padding: 0px; border-width: 0px; margin: 0px; left: 0px; top: 0px; touch-action: pan-x pan-y;"><div style="z-index: 4; position: absolute; left: 50%; top: 50%; width: 100%; will-change: transform; transform: translate(0px, 0px);"><div style="position: absolute; left: 0px; top: 0px; z-index: 104; width: 100%;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 105; width: 100%;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 106; width: 100%;"><span id="48C1B89D-B9BD-4B4F-9BDD-87D29E509125" style="display: none;">Para desplazarte, pulsa las teclas de flecha.</span><div title="64" aria-label="64" role="img" style="width: 39px; height: 39px; overflow: hidden; position: absolute; cursor: pointer; touch-action: none; left: 390px; top: 57px; z-index: 80;" tabindex="-1"><img alt="" src="./Calculadora - Adeje Verde_files/transparent.png" draggable="false" style="width: 39px; height: 39px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div><div title="" aria-label="1" role="img" style="width: 0px; height: 0px; overflow: hidden; position: absolute; cursor: pointer; touch-action: none; left: 508px; top: 241px; z-index: 244;" tabindex="-1"><img alt="" src="./Calculadora - Adeje Verde_files/transparent.png" draggable="false" style="width: 0px; height: 0px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;"></div></div><div style="position: absolute; left: 0px; top: 0px; z-index: 107; width: 100%;"><button type="button" title="Deshacer último cambio" aria-label="Deshacer último cambio" style="background: transparent; border: none; margin: 0px; padding: 0px; z-index: -202; cursor: pointer; display: none; touch-action: none;"><span style="display: inline-block;"><div style="width: 30px; height: 27px; overflow: hidden; position: relative;"><img alt="" src="./Calculadora - Adeje Verde_files/undo_poly.png" draggable="false" style="position: absolute; left: 0px; top: 0px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none; width: 90px; height: 27px;"></div></span></button></div></div></div><div class="gm-style-moc" style="z-index: 4; position: absolute; height: 100%; width: 100%; padding: 0px; border-width: 0px; margin: 0px; left: 0px; top: 0px; opacity: 0; transition-duration: 0.2s;"><p class="gm-style-mot"></p></div><div class="LGLeeN-keyboard-shortcuts-view" id="27178DA3-9182-449E-BEE5-A8AD3B020F6D" style="display: none;"><table><tbody><tr><td><kbd aria-label="Flecha hacia la izquierda">←</kbd></td><td aria-label="Mover a la izquierda.">Mover a la izquierda</td></tr><tr><td><kbd aria-label="Flecha hacia la derecha">→</kbd></td><td aria-label="Mover a la derecha.">Mover a la derecha</td></tr><tr><td><kbd aria-label="Flecha hacia arriba">↑</kbd></td><td aria-label="Mover hacia arriba.">Mover hacia arriba</td></tr><tr><td><kbd aria-label="Flecha hacia abajo">↓</kbd></td><td aria-label="Mover hacia abajo.">Mover hacia abajo</td></tr><tr><td><kbd>+</kbd></td><td aria-label="Ampliar.">Ampliar</td></tr><tr><td><kbd>-</kbd></td><td aria-label="Reducir.">Reducir</td></tr><tr><td><kbd>Inicio</kbd></td><td aria-label="Saltar hacia la izquierda un 75 %.">Saltar hacia la izquierda un 75 %</td></tr><tr><td><kbd>Fin</kbd></td><td aria-label="Saltar hacia la derecha un 75 %.">Saltar hacia la derecha un 75 %</td></tr><tr><td><kbd>Re Pág</kbd></td><td aria-label="Saltar hacia arriba un 75 %.">Saltar hacia arriba un 75 %</td></tr><tr><td><kbd>Av Pág</kbd></td><td aria-label="Saltar hacia abajo un 75 %.">Saltar hacia abajo un 75 %</td></tr></tbody></table></div></div><iframe aria-hidden="true" frameborder="0" tabindex="-1" style="z-index: -1; position: absolute; width: 100%; height: 100%; top: 0px; left: 0px; border: none;" src="./Calculadora - Adeje Verde_files/saved_resource.html"></iframe><div style="pointer-events: none; width: 100%; height: 100%; box-sizing: border-box; position: absolute; z-index: 1000002; opacity: 0; border: 2px solid rgb(26, 115, 232);"></div><div></div><div></div><div></div><div></div><div><button draggable="false" aria-label="Cambiar a la vista en pantalla completa" title="Cambiar a la vista en pantalla completa" type="button" aria-pressed="false" class="gm-control-active gm-fullscreen-control" style="background: none rgb(255, 255, 255); border: 0px; margin: 10px; padding: 0px; text-transform: none; appearance: none; position: absolute; cursor: pointer; user-select: none; border-radius: 2px; height: 40px; width: 40px; box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px; overflow: hidden; display: none; top: 0px; right: 0px;"><img src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2018%2018%22%3E%3Cpath%20fill%3D%22%23666%22%20d%3D%22M0%200v6h2V2h4V0H0zm16%200h-4v2h4v4h2V0h-2zm0%2016h-4v2h6v-6h-2v4zM2%2012H0v6h6v-2H2v-4z%22/%3E%3C/svg%3E" alt="" style="height: 18px; width: 18px;"><img src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2018%2018%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M0%200v6h2V2h4V0H0zm16%200h-4v2h4v4h2V0h-2zm0%2016h-4v2h6v-6h-2v4zM2%2012H0v6h6v-2H2v-4z%22/%3E%3C/svg%3E" alt="" style="height: 18px; width: 18px;"><img src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2018%2018%22%3E%3Cpath%20fill%3D%22%23111%22%20d%3D%22M0%200v6h2V2h4V0H0zm16%200h-4v2h4v4h2V0h-2zm0%2016h-4v2h6v-6h-2v4zM2%2012H0v6h6v-2H2v-4z%22/%3E%3C/svg%3E" alt="" style="height: 18px; width: 18px;"></button></div><div></div><div></div><div></div><div></div><div></div><div><div style="margin: 0px 5px; z-index: 1000000; position: absolute; left: 0px; bottom: 0px;"><a target="_blank" rel="noopener" title="Abre esta zona en Google Maps (se abre en una nueva ventana)" aria-label="Abre esta zona en Google Maps (se abre en una nueva ventana)" href="https://maps.google.com/maps?ll=42.344168,-7.855179&amp;z=21&amp;t=h&amp;hl=es-ES&amp;gl=US&amp;mapclient=apiv3" style="display: inline;"><div style="width: 66px; height: 26px;"><img alt="Google" src="data:image/svg+xml,%3Csvg%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2069%2029%22%3E%3Cg%20opacity%3D%22.3%22%20fill%3D%22%23000%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%3E%3Cpath%20d%3D%22M17.4706%207.33616L18.0118%206.79504%2017.4599%206.26493C16.0963%204.95519%2014.2582%203.94522%2011.7008%203.94522c-4.613699999999999%200-8.50262%203.7551699999999997-8.50262%208.395779999999998C3.19818%2016.9817%207.0871%2020.7368%2011.7008%2020.7368%2014.1712%2020.7368%2016.0773%2019.918%2017.574%2018.3689%2019.1435%2016.796%2019.5956%2014.6326%2019.5956%2012.957%2019.5956%2012.4338%2019.5516%2011.9316%2019.4661%2011.5041L19.3455%2010.9012H10.9508V14.4954H15.7809C15.6085%2015.092%2015.3488%2015.524%2015.0318%2015.8415%2014.403%2016.4629%2013.4495%2017.1509%2011.7008%2017.1509%209.04835%2017.1509%206.96482%2015.0197%206.96482%2012.341%206.96482%209.66239%209.04835%207.53119%2011.7008%207.53119%2013.137%207.53119%2014.176%208.09189%2014.9578%208.82348L15.4876%209.31922%2016.0006%208.80619%2017.4706%207.33616z%22/%3E%3Cpath%20d%3D%22M24.8656%2020.7286C27.9546%2020.7286%2030.4692%2018.3094%2030.4692%2015.0594%2030.4692%2011.7913%2027.953%209.39009%2024.8656%209.39009%2021.7783%209.39009%2019.2621%2011.7913%2019.2621%2015.0594c0%203.25%202.514499999999998%205.6692%205.6035%205.6692zM24.8656%2012.8282C25.8796%2012.8282%2026.8422%2013.6652%2026.8422%2015.0594%2026.8422%2016.4399%2025.8769%2017.2905%2024.8656%2017.2905%2023.8557%2017.2905%2022.8891%2016.4331%2022.8891%2015.0594%2022.8891%2013.672%2023.853%2012.8282%2024.8656%2012.8282z%22/%3E%3Cpath%20d%3D%22M35.7511%2017.2905v0H35.7469C34.737%2017.2905%2033.7703%2016.4331%2033.7703%2015.0594%2033.7703%2013.672%2034.7343%2012.8282%2035.7469%2012.8282%2036.7608%2012.8282%2037.7234%2013.6652%2037.7234%2015.0594%2037.7234%2016.4439%2036.7554%2017.2961%2035.7511%2017.2905zM35.7387%2020.7286C38.8277%2020.7286%2041.3422%2018.3094%2041.3422%2015.0594%2041.3422%2011.7913%2038.826%209.39009%2035.7387%209.39009%2032.6513%209.39009%2030.1351%2011.7913%2030.1351%2015.0594%2030.1351%2018.3102%2032.6587%2020.7286%2035.7387%2020.7286z%22/%3E%3Cpath%20d%3D%22M51.953%2010.4357V9.68573H48.3999V9.80826C47.8499%209.54648%2047.1977%209.38187%2046.4808%209.38187%2043.5971%209.38187%2041.0168%2011.8998%2041.0168%2015.0758%2041.0168%2017.2027%2042.1808%2019.0237%2043.8201%2019.9895L43.7543%2020.0168%2041.8737%2020.797%2041.1808%2021.0844%2041.4684%2021.7772C42.0912%2023.2776%2043.746%2025.1469%2046.5219%2025.1469%2047.9324%2025.1469%2049.3089%2024.7324%2050.3359%2023.7376%2051.3691%2022.7367%2051.953%2021.2411%2051.953%2019.2723v-8.8366zm-7.2194%209.9844L44.7334%2020.4196C45.2886%2020.6201%2045.878%2020.7286%2046.4808%2020.7286%2047.1616%2020.7286%2047.7866%2020.5819%2048.3218%2020.3395%2048.2342%2020.7286%2048.0801%2021.0105%2047.8966%2021.2077%2047.6154%2021.5099%2047.1764%2021.7088%2046.5219%2021.7088%2045.61%2021.7088%2045.0018%2021.0612%2044.7336%2020.4201zM46.6697%2012.8282C47.6419%2012.8282%2048.5477%2013.6765%2048.5477%2015.084%2048.5477%2016.4636%2047.6521%2017.2987%2046.6697%2017.2987%2045.6269%2017.2987%2044.6767%2016.4249%2044.6767%2015.084%2044.6767%2013.7086%2045.6362%2012.8282%2046.6697%2012.8282zM55.7387%205.22081v-.75H52.0788V20.4412H55.7387V5.22081z%22/%3E%3Cpath%20d%3D%22M63.9128%2016.0614L63.2945%2015.6492%2062.8766%2016.2637C62.4204%2016.9346%2061.8664%2017.3069%2061.0741%2017.3069%2060.6435%2017.3069%2060.3146%2017.2088%2060.0544%2017.0447%2059.9844%2017.0006%2059.9161%2016.9496%2059.8498%2016.8911L65.5497%2014.5286%2066.2322%2014.2456%2065.9596%2013.5589%2065.7406%2013.0075C65.2878%2011.8%2063.8507%209.39832%2060.8278%209.39832%2057.8445%209.39832%2055.5034%2011.7619%2055.5034%2015.0676%2055.5034%2018.2151%2057.8256%2020.7369%2061.0659%2020.7369%2063.6702%2020.7369%2065.177%2019.1378%2065.7942%2018.2213L66.2152%2017.5963%2065.5882%2017.1783%2063.9128%2016.0614zM61.3461%2012.8511L59.4108%2013.6526C59.7903%2013.0783%2060.4215%2012.7954%2060.9017%2012.7954%2061.067%2012.7954%2061.2153%2012.8161%2061.3461%2012.8511z%22/%3E%3C/g%3E%3Cpath%20d%3D%22M11.7008%2019.9868C7.48776%2019.9868%203.94818%2016.554%203.94818%2012.341%203.94818%208.12803%207.48776%204.69522%2011.7008%204.69522%2014.0331%204.69522%2015.692%205.60681%2016.9403%206.80583L15.4703%208.27586C14.5751%207.43819%2013.3597%206.78119%2011.7008%206.78119%208.62108%206.78119%206.21482%209.26135%206.21482%2012.341%206.21482%2015.4207%208.62108%2017.9009%2011.7008%2017.9009%2013.6964%2017.9009%2014.8297%2017.0961%2015.5606%2016.3734%2016.1601%2015.7738%2016.5461%2014.9197%2016.6939%2013.7454h-4.9931V11.6512h7.0298C18.8045%2012.0207%2018.8456%2012.4724%2018.8456%2012.957%2018.8456%2014.5255%2018.4186%2016.4637%2017.0389%2017.8434%2015.692%2019.2395%2013.9838%2019.9868%2011.7008%2019.9868zM29.7192%2015.0594C29.7192%2017.8927%2027.5429%2019.9786%2024.8656%2019.9786%2022.1884%2019.9786%2020.0121%2017.8927%2020.0121%2015.0594%2020.0121%2012.2096%2022.1884%2010.1401%2024.8656%2010.1401%2027.5429%2010.1401%2029.7192%2012.2096%2029.7192%2015.0594zM27.5922%2015.0594C27.5922%2013.2855%2026.3274%2012.0782%2024.8656%2012.0782S22.1391%2013.2937%2022.1391%2015.0594C22.1391%2016.8086%2023.4038%2018.0405%2024.8656%2018.0405S27.5922%2016.8168%2027.5922%2015.0594zM40.5922%2015.0594C40.5922%2017.8927%2038.4159%2019.9786%2035.7387%2019.9786%2033.0696%2019.9786%2030.8851%2017.8927%2030.8851%2015.0594%2030.8851%2012.2096%2033.0614%2010.1401%2035.7387%2010.1401%2038.4159%2010.1401%2040.5922%2012.2096%2040.5922%2015.0594zM38.4734%2015.0594C38.4734%2013.2855%2037.2087%2012.0782%2035.7469%2012.0782%2034.2851%2012.0782%2033.0203%2013.2937%2033.0203%2015.0594%2033.0203%2016.8086%2034.2851%2018.0405%2035.7469%2018.0405%2037.2087%2018.0487%2038.4734%2016.8168%2038.4734%2015.0594zM51.203%2010.4357v8.8366C51.203%2022.9105%2049.0595%2024.3969%2046.5219%2024.3969%2044.132%2024.3969%2042.7031%2022.7955%2042.161%2021.4897L44.0417%2020.7095C44.3784%2021.5143%2045.1997%2022.4588%2046.5219%2022.4588%2048.1479%2022.4588%2049.1499%2021.4487%2049.1499%2019.568V18.8617H49.0759C48.5914%2019.4612%2047.6552%2019.9786%2046.4808%2019.9786%2044.0171%2019.9786%2041.7668%2017.8352%2041.7668%2015.0758%2041.7668%2012.3%2044.0253%2010.1319%2046.4808%2010.1319%2047.6552%2010.1319%2048.5914%2010.6575%2049.0759%2011.2323H49.1499V10.4357H51.203zM49.2977%2015.084C49.2977%2013.3512%2048.1397%2012.0782%2046.6697%2012.0782%2045.175%2012.0782%2043.9267%2013.3429%2043.9267%2015.084%2043.9267%2016.8004%2045.175%2018.0487%2046.6697%2018.0487%2048.1397%2018.0487%2049.2977%2016.8004%2049.2977%2015.084zM54.9887%205.22081V19.6912H52.8288V5.22081H54.9887zM63.4968%2016.6854L65.1722%2017.8023C64.6301%2018.6072%2063.3244%2019.9869%2061.0659%2019.9869%2058.2655%2019.9869%2056.2534%2017.827%2056.2534%2015.0676%2056.2534%2012.1439%2058.2901%2010.1483%2060.8278%2010.1483%2063.3818%2010.1483%2064.6301%2012.1768%2065.0408%2013.2773L65.2625%2013.8357%2058.6843%2016.5623C59.1853%2017.5478%2059.9737%2018.0569%2061.0741%2018.0569%2062.1746%2018.0569%2062.9384%2017.5067%2063.4968%2016.6854zM58.3312%2014.9115L62.7331%2013.0884C62.4867%2012.4724%2061.764%2012.0454%2060.9017%2012.0454%2059.8012%2012.0454%2058.2737%2013.0145%2058.3312%2014.9115z%22%20fill%3D%22%23fff%22/%3E%3C/svg%3E" draggable="false" style="position: absolute; left: 0px; top: 0px; width: 66px; height: 26px; user-select: none; border: 0px; padding: 0px; margin: 0px;"></div></a></div></div><div></div><div><div style="display: inline-flex; position: absolute; right: 50px; bottom: 0px;"><div class="gmnoprint" style="z-index: 1000001;"><div draggable="false" class="gm-style-cc" style="user-select: none; position: relative; height: 14px; line-height: 14px;"><div style="opacity: 0.7; width: 100%; height: 100%; position: absolute;"><div style="width: 1px;"></div><div style="background-color: rgb(245, 245, 245); width: auto; height: 100%; margin-left: 1px;"></div></div><div style="position: relative; padding-right: 6px; padding-left: 6px; box-sizing: border-box; font-family: Roboto, Arial, sans-serif; font-size: 10px; color: rgb(0, 0, 0); white-space: nowrap; direction: ltr; text-align: right; vertical-align: middle; display: inline-block;"><button draggable="false" aria-label="Combinaciones de teclas" title="Combinaciones de teclas" type="button" style="background: none; display: inline-block; border: 0px; margin: 0px; padding: 0px; text-transform: none; appearance: none; position: relative; cursor: pointer; user-select: none; color: rgb(0, 0, 0); font-family: inherit; line-height: inherit;">Combinaciones de teclas</button></div></div></div><div class="gmnoprint" style="z-index: 1000001;"><div draggable="false" class="gm-style-cc" style="user-select: none; position: relative; height: 14px; line-height: 14px;"><div style="opacity: 0.7; width: 100%; height: 100%; position: absolute;"><div style="width: 1px;"></div><div style="background-color: rgb(245, 245, 245); width: auto; height: 100%; margin-left: 1px;"></div></div><div style="position: relative; padding-right: 6px; padding-left: 6px; box-sizing: border-box; font-family: Roboto, Arial, sans-serif; font-size: 10px; color: rgb(0, 0, 0); white-space: nowrap; direction: ltr; text-align: right; vertical-align: middle; display: inline-block;"><button draggable="false" aria-label="Datos del mapa" title="Datos del mapa" type="button" style="background: none; border: 0px; margin: 0px; padding: 0px; text-transform: none; appearance: none; position: relative; cursor: pointer; user-select: none; color: rgb(0, 0, 0); font-family: inherit; line-height: inherit; display: none;">Datos del mapa</button><span style="">Datos del mapa ©2023 Inst. Geogr. Nacional</span></div></div></div><div class="gmnoscreen"><div style="font-family: Roboto, Arial, sans-serif; font-size: 11px; color: rgb(0, 0, 0); direction: ltr; text-align: right; background-color: rgb(245, 245, 245);">Datos del mapa ©2023 Inst. Geogr. Nacional</div></div><button draggable="false" aria-label="Escala del mapa: 2 m por 36 píxeles" title="Escala del mapa: 2 m por 36 píxeles" type="button" class="gm-style-cc" aria-describedby="E714702A-CFA5-4E98-8352-90A81E4B3C5F" style="background: none; display: none; border: 0px; margin: 0px; padding: 0px; text-transform: none; appearance: none; position: relative; cursor: pointer; user-select: none; height: 14px; line-height: 14px;"><div style="opacity: 0.7; width: 100%; height: 100%; position: absolute;"><div style="width: 1px;"></div><div style="background-color: rgb(245, 245, 245); width: auto; height: 100%; margin-left: 1px;"></div></div><div style="position: relative; padding-right: 6px; padding-left: 6px; box-sizing: border-box; font-family: Roboto, Arial, sans-serif; font-size: 10px; color: rgb(0, 0, 0); white-space: nowrap; direction: ltr; text-align: right; vertical-align: middle; display: inline-block;"><span>2 m&nbsp;</span><div style="position: relative; display: inline-block; height: 8px; bottom: -1px; width: 40px;"><div style="width: 100%; height: 4px; position: absolute; left: 0px; top: 0px;"></div><div style="width: 4px; height: 8px; left: 0px; top: 0px; background-color: rgb(255, 255, 255);"></div><div style="width: 4px; height: 8px; position: absolute; background-color: rgb(255, 255, 255); right: 0px; bottom: 0px;"></div><div style="position: absolute; background-color: rgb(102, 102, 102); height: 2px; left: 1px; bottom: 1px; right: 1px;"></div><div style="position: absolute; width: 2px; height: 6px; left: 1px; top: 1px; background-color: rgb(102, 102, 102);"></div><div style="width: 2px; height: 6px; position: absolute; background-color: rgb(102, 102, 102); bottom: 1px; right: 1px;"></div></div></div><span id="E714702A-CFA5-4E98-8352-90A81E4B3C5F" style="display: none;">Haz clic para alternar entre unidades métricas e imperiales</span></button><div class="gmnoprint gm-style-cc" draggable="false" style="z-index: 1000001; user-select: none; position: relative; height: 14px; line-height: 14px;"><div style="opacity: 0.7; width: 100%; height: 100%; position: absolute;"><div style="width: 1px;"></div><div style="background-color: rgb(245, 245, 245); width: auto; height: 100%; margin-left: 1px;"></div></div><div style="position: relative; padding-right: 6px; padding-left: 6px; box-sizing: border-box; font-family: Roboto, Arial, sans-serif; font-size: 10px; color: rgb(0, 0, 0); white-space: nowrap; direction: ltr; text-align: right; vertical-align: middle; display: inline-block;"><a href="https://www.google.com/intl/es-ES_US/help/terms_maps.html" target="_blank" rel="noopener" style="text-decoration: none; cursor: pointer; color: rgb(0, 0, 0);">Términos</a></div></div><div draggable="false" class="gm-style-cc" style="user-select: none; position: relative; height: 14px; line-height: 14px;"><div style="opacity: 0.7; width: 100%; height: 100%; position: absolute;"><div style="width: 1px;"></div><div style="background-color: rgb(245, 245, 245); width: auto; height: 100%; margin-left: 1px;"></div></div><div style="position: relative; padding-right: 6px; padding-left: 6px; box-sizing: border-box; font-family: Roboto, Arial, sans-serif; font-size: 10px; color: rgb(0, 0, 0); white-space: nowrap; direction: ltr; text-align: right; vertical-align: middle; display: inline-block;"><a target="_blank" rel="noopener" title="Informar a Google acerca de errores en las imágenes o en el mapa de carreteras" dir="ltr" href="https://www.google.com/maps/@42.3441678,-7.8551787,21z/data=!3m1!1e3!10m1!1e1!12b1?source=apiv3&amp;rapsrc=apiv3" style="font-family: Roboto, Arial, sans-serif; font-size: 10px; color: rgb(0, 0, 0); text-decoration: none; position: relative;">Notificar un problema de Maps</a></div></div></div><div style="padding: 5px; position: absolute; right: 0px; bottom: 0px;"><img src="./Calculadora - Adeje Verde_files/South_indicator.png" style="width: 40px; cursor: pointer;"></div></div></div></div></div>
                      
     	 <div id="zoomctrl" style=" text-align:center; margin:0 auto; padding-top: 10px; padding-bottom: 10px;"> 
     	 	<button type="submit" onclick="zoomout()" class="zoom" style="background-image: url(&#39;AVapp_files/zoomout.png&#39;); background-repeat: no-repeat;"></button>
     	 	<button class="undobtn" type="submit" onclick="removeLastMarker()" style="background-image: url(&#39;AVapp_files/undo.png&#39;);background-repeat : no-repeat; "><span id="tooltiptextundo" class="tooltiptext" style="display: none;"></span></button>	
     	 	<button type="submit" onclick="zoomin()" class="zoom" style="background-image: url(&#39;AVapp_files/zoomin.png&#39;);background-repeat : no-repeat;"></button>	
     	 </div>
     	 
     	 <div style="overflow-x:auto;">
         <table id="pvtable" class="auto-style45" style="display: block;">
		    <tbody>
	           <tr style="overflow: auto">
			        <td><b>Campo</b></td>
				    <td><b>Área</b></td>
				    <td><b>Orientación</b></td>
				    <td><b>Inclinación</b></td>
				    <td><b>Potencia</b></td>
				    <td><b>Rendimiento</b></td>
				    <td><b> </b></td>
			   </tr>
		    <tr style="border: none; padding: 10px;"><td style="border-bottom-left-radius: 15px; border-top-left-radius: 15px; background-color: white;">1</td><td style="background-color: white;">214.2 m²</td><td style="background-color: white;">64 °</td><td style="background-color: white;">30 °</td><td style="background-color: white;">39.6 kWp</td><td style="background-color: rgb(255, 80, 80);">881 kWh/kWp</td><td><button id="btndelete" onclick="deleteRow(this)" class="trashbtn"></button></td></tr><tr><td><input type="text" style="width: 90%; color: #0F5677;  font-weight: bold;  text-align:center;background-color:#DADBD7; border: none;  padding: 10px;" value=""></td><td><input type="text" style="width: 90%; color: #0F5677;  font-weight: bold;  text-align:center;background-color:#DADBD7; border: none;  padding: 10px;" value=""></td><td><input type="text" style="width: 90%; color: #0F5677;  font-weight: bold;  text-align:center;background-color:#DADBD7; border: none;  padding: 10px;" value=""></td><td><input type="text" style="width: 90%; color: #0F5677;  font-weight: bold;  text-align:center;background-color:#DADBD7; border: none;  padding: 10px;" value="Total:"></td><td><input type="text" style="width: 90%; color: #0F5677;  font-weight: bold;  text-align:center;background-color:#DADBD7; border: none;  padding: 10px;" value="39.6 kWp"></td><td><input type="text" style="width: 90%; color: #0F5677;  font-weight: bold;  text-align:center;background-color:#DADBD7; border: none;  padding: 10px;" value="881 kWh/kWp"></td></tr></tbody>
		 </table>
        </div>
    </div>

	<!-- Popup overlay -->
	<div id="popup-overlay" class="popup-overlay" style="opacity: 0; pointer-events: none;">
	  <!-- Popup content -->
	  <div id="popup"> 
	    
	    <div id="inclinationpopup" class="popup-content" style="display: none;">

	       <h1 class="auto-style43" style="border-radius: 15px">Selecciona el ángulo de inclinación aproximado</h1>
		    	<table style="width: 90%; margin-left: auto; margin-right: auto;" class="auto-style44">
					<tbody>
					<tr>
						<td style="width: 25%" class="auto-style14">
						  <div class="imgbtn">
						    <img id="tilt0" src="./Calculadora - Adeje Verde_files/tilt0.png" alt="tejado plano" style="width:100%; height:auto; box-shadow: 5px 5px 15px 6px #c0c0c0">
						  </div>
						</td>

						<td style="width: 25%" class="auto-style14">						
						  <div class="imgbtn">
						    <img id="tilt15" src="./Calculadora - Adeje Verde_files/tilt15.png" alt="tejado 15°" style="width:100%; height: auto; box-shadow: 5px 5px 15px 6px #c0c0c0">
						  </div>
						</td>

						<td style="width: 25%" class="auto-style14">
						  <div class="imgbtn">
						    <img id="tilt30" src="./Calculadora - Adeje Verde_files/tilt30.png" alt="tejado 30°" style="width:100%; height: auto; box-shadow: 5px 5px 15px 6px #c0c0c0">
						  </div>
                        </td>
                        
                        <td style="width: 25%" class="auto-style14">
						  <div class="imgbtn">
						    <img id="tilt45" src="./Calculadora - Adeje Verde_files/tilt45.png" alt="tejado 45°" style="width:100%; height: auto; box-shadow: 5px 5px 15px 6px #c0c0c0">
						  </div>
						</td>
					</tr>
					</tbody>
				</table>
	            <br>
	    </div>
	  
	    <div id="simulationresults" class="popup-content" style="background-color: rgb(255, 255, 255); padding: 5px; border-radius: 15px; display: none;">		
 	    	
 	    	<div id="pvresult" style="" class="auto-style2"><b>Este tejado inclinado dispone de superficie para instalar hasta 39,6 kWp de placas fotovoltaicas y generaría 34.871 kWh/año. <span style="color: #ff0000"><br> El rendimiento no es óptimo, podes usar un tejado alternativo orientado mas hacia sur? Si no, imprime la oferta y consulta nuestros expertos.</span></b><br><br></div>

 	    	<div style="background-color:#FFF; padding:5px; border-radius: 15px;">
 	    		<br>
		    	<div id="scalecontainer" class="auto-style8">
					<img src="./Calculadora - Adeje Verde_files/scale.png" alt="scale" style="width: 90%">
				
					<div id="scaletxt" style="top: -24px; position: absolute; transition: all 0.5s ease 0s; left: 0%;">881<br> kWh/kWp/a <br>      |</div>
					 
					<table style="width: 100%">
						 <tbody><tr>
						 <td><p class="auto-style9">Mal orientado <br> Rendimiento bajo <br> Amortizacion lenta </p></td>
						 <td><p class="auto-style3">Muy bien orientado <br> Rendimiento alto <br> Amortizacion rapida</p></td>
						 </tr></tbody>
					</table>
		    	</div>
		    </div>
		    
		    <div id="confirmandclose" class="style_hidden" style="display: none;">
		        <div style="" class="auto-style2">A continuación puedes añadir otro tejado, eliminar un tejado o solicitar directamente tu oferta.<br><br></div>		        
		        <button id="btnok" onclick="addPVandClose()" class="buttonstyle" style="width: 200px">OK</button>
		    </div>	
	        
	        <div id="simulationresultend" style="display: none;">&nbsp;</div>
	  
	    </div>
      </div>
    </div>

     <!--div id="main" class="style_hidden">
    	<h2>De qué manera querrías beneficiarte de la energía solar?</h2>		
        <button id="btnconsumer" class="buttonstyle">Quiero aprovechar las plantas solares en el barrio *</button>
        <br><span class="auto-style1">* Alquila paneles de vecinos y ahorra dinero sin compromiso a largo plazo</span> &nbsp;&nbsp; <br><br> 
        <button id="btnprosumer" class="buttonstyle" onclick="initMap()">Quiero invertir en un proprio sistema solar *</button>
        <br><span class="auto-style1">* Tengo casa propia o permiso del propietario</span><br>    
     </div-->
    
	<!--div id="Prosumertype" class="style_hidden" style="padding: 15px; background-color: #DADBD7; border-radius: 15px; left: 1px; top: 21px; position: relative;"> 		
			<h2 class="auto-style23" style="padding-left: 20px;">Puedo instalar el sistema en mi...&nbsp;</h2>
			<button id="btncasa" class="buttonstyle" style="background-position: right center; background-size: 40px; height: 60px; margin-bottom:15px; background-repeat: no-repeat; background-image: url('AVapp_files/sfh.png'); padding-right: 0px;">Casa unifamiliar</button>
			<button id="btncondo" class="buttonstyle" style="background-position: right center; background-size: 40px; height: 60px; margin-bottom:15px; background-repeat: no-repeat; background-image: url('AVapp_files/condo.png');padding-right: 0px;">Edificio de viviendas</button>
			<button id="btnedpub" class="buttonstyle" style="background-position: right center; background-size: 40px; height: 60px; margin-bottom:15px; background-repeat: no-repeat; background-image: url('AVapp_files/edpub.png');padding-right: 0px;">Edificio público</button>
			<button id="btncomm" class="buttonstyle" style="background-position: right center; background-size: 40px; height: 60px; margin-bottom:15px; background-repeat: no-repeat; background-image: url('AVapp_files/hotel.png');padding-right: 0px;">Edificio comercial/Hotel</button>
 	</div--> 	
     	
 	<div id="Demandsfhest" class="style_hidden" style="text-align: center; left: 0px; top: 0px; border-style: solid; margin: 25px auto 0px; border-width: thin; border-radius: 15px; background-color: rgb(218, 219, 215); width: 100%; border-color: rgb(218, 219, 215); display: block;"> 		
			
			<h2 class="auto-style54" style="padding-left: 20px;">Para estimar tu consumo necesitamos saber cuántas personas viven en tu hogar: &nbsp;</h2>

			<button id="btn1pers" class="buttonstyledemand" style="background-size: 28px 60px; background-position: center center; height: 60px; margin-bottom :15px; background-repeat: no-repeat; background-image: url(&#39;AVapp_files/1p.png&#39;);">
			</button>
			<button id="btn2pers" class="buttonstyledemand" style="background-size: 37px 60px; background-position: center center; height: 60px; margin-bottom:15px; background-repeat: no-repeat; background-image: url(&#39;AVapp_files/2p.png&#39;); ">
			</button>
			<button id="btn3pers" class="buttonstyledemand" style="background-size: 49px 60px; background-position: center center; height: 60px; margin-bottom:15px; background-repeat: no-repeat; background-image: url(&#39;AVapp_files/3p.png&#39;);">
			</button>
			<button id="btn4pers" class="buttonstyledemand" style="background-size: 72px 60px; background-position: center center; height: 60px; margin-bottom:15px; background-repeat: no-repeat; background-image: url(&#39;AVapp_files/4p.png&#39;);">
			</button>
			<button id="btn5pers" class="buttonstyledemand" style="background-size: 85px 60px; background-position: center center; height: 60px; margin-bottom:15px; background-repeat: no-repeat; background-image: url(&#39;AVapp_files/5p.png&#39;); ">
			</button>
 			<button id="btndetailed" class="buttonstyledemand" style="background-size: cover; background-position: center center; height: 60px; margin-bottom:15px; background-repeat: no-repeat; background-image: url(&#39;AVapp_files/detallado.png&#39;);">
            </button>
 			<br> 
 			<br>
 			 
 			<!--h2 class="auto-style55" style="padding-left: 20px;" ><strong>o introduce un valor más preciso:</strong></h2>
			
			<table style="width: 100%">
				<tr>
					<td class="auto-style46" style="width: 60%">	
			        <input id="demandtb" oninput="usersetdemand()" class="inputbox" type="text" >
					</td>
					<td class="auto-style42" style="width: 69px">kWh/año </td>
				</tr>
				<tr>
					<td class="auto-style46" style="width: 40%">
					<input id="billtb" oninput="usersetbill()" class="inputbox" type="text" >
            		</td>
					<td class="auto-style42" style="width: 69px">€/año *</td>
				</tr>
				<tr>
					<td class="auto-style2" colspan="2">
            		<br>
            		<button type="submit" id="btndemandsfh" style="border-radius: 25px 25px 25px 25px; height: 44px; width: 139px;" class="buttonstyle">
					<strong>Confirmar</strong></button>
 					</td>
				</tr>
			</table>
			<br><span class="auto-style1">* El valor inicial de 0,32€/kWh</span><br-->	
 	</div> 	
    

 	<!--div id="Demandcondo" class="style_hidden" class="style_hidden" style="left: 0px; top: 0px;  border-style: solid; margin: 0 auto; border-width: thin; border-radius: 15px; background-color: #DADBD7; width:100%; margin-top:25px; border-color: #DADBD7;"> 		
			<h2 class="auto-style23">1) Viviendas:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </h2>
			<h2 class="auto-style50"><span class="auto-style53">Hay&nbsp;	
			</span>	
			<input id="nrodptos" onchange="nrodptoschanged()" type="text" style="border: 2px solid #FAA82A; border-radius: 15px 15px 15px 15px; background-color: #FFFFFF; vertical-align: middle; text-align: center; font-size: medium; padding: 10px; font-size: 14px;width:40px"><span class="auto-style53">&nbsp; 
			viviendas con un consumo anual medio de&nbsp; &nbsp;</span></h2>

			<button id="btn1pc" onclick="set1pc()" class="buttonstyledemand" style="background-size: 28px 60px; background-position: right center; height: 60px; width: 18%; margin-bottom:15px; background-repeat: no-repeat; background-image: url('AVapp_files/1p.png'); ">
			2200 kWh</button>
			<button id="btn2pc" onclick="set2pc()" class="buttonstyledemand" style="background-size: 37px 60px; background-position: right center; height: 60px; width: 18%; margin-bottom:15px; background-repeat: no-repeat; background-image: url('AVapp_files/2p.png'); ">
			2450 kWh</button>
			<button id="btn3pc" onclick="set3pc()" class="buttonstyledemand" style="background-size: 49px 60px; background-position: right center; height: 60px; width: 18%; margin-bottom:15px; background-repeat: no-repeat; background-image: url('AVapp_files/3p.png'); ">
			2700 kWh</button>
			<button id="btn4pc" onclick="set4pc()" class="buttonstyledemand" style="background-size: 72px 60px; background-position: right center; height: 60px; width: 18%; margin-bottom:15px; background-repeat: no-repeat; background-image: url('AVapp_files/4p.png'); ">
			2950 kWh</button>
			<button id="btn5pc" onclick="set5pc()" class="buttonstyledemand" style="background-size: 85px 60px; background-position: right center; height: 60px; width: 18%; margin-bottom:15px; background-repeat: no-repeat; background-image: url('AVapp_files/5p.png'); ">
			3200 kWh</button>	
			
 			<br><br> <h2 class="auto-style23" >
			2) Áreas comunes:&nbsp; </h2>
			
			<h2 class="auto-style50" >
			<span class="auto-style52"><strong>Tenemos piscina
			</strong></span><strong>
			<input type="checkbox" id="poolcb" onclick="nrodptoschanged()" style="width: 21px; height: 21px" class="auto-style57"></strong></h2>
			<h2 class="auto-style51" >
			<strong>Si lo tiene disponible, introduce un valor más preciso para el consumo y/o 
			coste:</strong></h2>
			<table style="width: 100%">
				<tr>
					<td class="auto-style46" style="width: 60%">	
					<input id="condodemandtb" onchange="usersetcondodemand()" type="text" style="border: 2px solid #FAA82A; border-radius: 15px 15px 15px 15px; background-color: #FFFFFF; vertical-align: middle; text-align: center; font-size: medium; padding: 10px; font-size: 14px;">
					</td>
					<td class="auto-style42" style="width: 69px">kWh/año * </td>
				</tr>
				<tr>
					<td class="auto-style46" style="width: 40%">
					<input id="condobilltb" onchange="usersetcondobill()" type="text" style="border: 2px solid #FAA82A; border-radius: 15px 15px 15px 15px; background-color: #FFFFFF; vertical-align: middle; text-align: center; font-size: medium; padding: 10px; font-size: 14px;">
            		</td>
					<td class="auto-style42" style="width: 69px">€/año **</td>
				</tr>
				<tr>
					<td class="auto-style2" colspan="2">
            		<br>
		            <div id="hogaresdemand" style="" class="auto-style2"></div>
		            <br>
					<br>
		            <button type="submit" id="btndemandcondo" style="border-radius: 25px 25px 25px 25px; height: 44px; width: 139px;" class="buttonstyle">
					<strong>Confirmar</strong></button>
					
 					<br><br>
 					<span class="auto-style1">*  El valor inicial se estime en base a valores típicos</span>
 					<br>
 					<span class="auto-style1">** El valor inicial de 0,32€/kWh</span>
 					</td>
				</tr>
			</table>
			<br>	
 	</div> 	

 	
 	<div id="Demand" class="style_hidden" class="style_hidden" style="left: 0px; top: 0px;  border-style: solid; margin: 0 auto; border-width: thin; border-radius: 15px; background-color: #DADBD7; width:100%; margin-top:25px; border-color: #DADBD7;"> 		
			
 			<br> <h2 class="auto-style23" style="padding-left: 20px; " >Introduce el consumo y/o el coste anual:</h2>
			<table style="width: 100%; text-align: center;" >
				<tr>
					<td class="auto-style46" style="width: 50%">	
			        <input id="demandtb2" onchange="usersetdemand()" type="text" style="border: 2px solid #FAA82A; border-radius: 15px 15px 15px 15px; background-color: #FFFFFF; vertical-align: middle; text-align: center; font-size: medium; padding: 10px; font-size: 14px;">
					</td>
					<td class="auto-style42" style="width: 69px">kWh/año </td>
				</tr>
				<tr>
					<td class="auto-style46" style="width: 50%">
			        <input id="billtb2" onchange="usersetbill()" type="text" style="border: 2px solid #FAA82A; border-radius: 15px 15px 15px 15px; background-color: #FFFFFF; vertical-align: middle; text-align: center; font-size: medium; padding: 10px; font-size: 14px;">
            		</td>
					<td class="auto-style42" style="width: 69px">€/año *</td>
				</tr>
				<tr>
					<td class="auto-style2" colspan="2">
            		<br>
		            <button type="submit" id="btndemand" style="border-radius: 25px 25px 25px 25px; height: 44px; width: 200px;" class="buttonstyle">
					<strong>Confirmar</strong></button>
 					</td>
				</tr>
			</table>
			<br><span class="auto-style1">* El valor inicial asume 0,32€/kWh</span><br>	
 	</div> 	

    <br>

 
 	<div id="Offertype" class="style_hidden">
        <table style="margin-left:auto;margin-right:auto;">				
		<tr>
			<td style="height: 87px; text-align: center;">
			<button id="btnsimple" class="buttonstyle" style="width: 200px">Listo, mandarme ya la oferta</button>
			 
			</td>
			<td style="height: 87px; text-align: center;">
			<button id="btndetailed" class="buttonstyle" style="width: 200px" >+<span class="auto-style5">  *</span></button>
			
			</td>
		</tr>
		</table>
        <br><span class="auto-style1"><span id="btndetailed" class="auto-style5">* </span>Requiere una factura de luz<br></span> 
	</div-->
    
    <br>&nbsp;
	
	<div id="clientcontact" class="style_hidden" style="background-color: rgb(218, 219, 215); padding: 15px; border-radius: 15px; display: block;">		
		<h2 class="style_visible_nosize" style="text-align: left; padding-left: 20px;">Introduce tus datos y enseguida recibirás tu oferta</h2>
	        
	        <div id="data-input">
        		<div id="data-input-txt">

        			<p class="auto-style57" style="vertical-align: text-bottom">
				            En este estudio preliminar te indicamos para tu instalación fotovoltaica:
				            <br>
							<img alt="check" height="21" src="./Calculadora - Adeje Verde_files/check.png" width="23"> 
							<strong>tamaño</strong> acorde a las dimensiones del tejado<br>
							<img alt="check" height="21" src="./Calculadora - Adeje Verde_files/check.png" width="23"> 
							<strong>precio</strong> aproximado de la instalacion
							   <br>
							<img alt="check" height="21" src="./Calculadora - Adeje Verde_files/check.png" width="23"> <strong>potencial de generación</strong> de energía
							   <br>
							<img alt="check" height="21" src="./Calculadora - Adeje Verde_files/check.png" width="23"> <strong>ahorros anuales</strong> por autoconsumo
							   <br>
							<img alt="check" height="21" src="./Calculadora - Adeje Verde_files/check.png" width="23"> <strong>tiempo de amortización
							</strong>
							</p>

							<div class="auto-style57">

							<input id="firstname2tb" placeholder="Nombre" style="border: thin solid #FAA82A; border-radius: 15px;background-color: #FFFFFF; padding: 10px; font-size:14px; width: 292px;" type="text" value=""><br><br>

							<input id="lastname2tb" placeholder="Apellido" style="border: thin solid #FAA82A; border-radius: 15px; background-color: #FFFFFF; padding: 10px; font-size:14px; width: 291px;" type="text" value=""><br><br>

							<input id="email2tb" placeholder="Correo electrónico *" style="border: thin solid #FAA82A; border-radius: 15px; background-color: #FFFFFF; padding: 10px; font-size:14px; width: 291px;" type="text" value=""><br><br>

							<p class="auto-style42">
							<input id="publicity2cb" type="checkbox">&nbsp; 
							Quiero recibir nuevas ofertas de Adeje Verde en el futuro 
							(puedo anular mi suscripción cuando quiera)</p>
							

							<p class="auto-style42">
							<input id="accept2cb" type="checkbox">&nbsp;<span class="auto-style5">*</span>Acepto que Adeje Verde obtenga mis datos para procesar y enviar la oferta. 
							Acepto la
							<span lang="EN-US">Política de Privacidad - Adeje Verde</span> <br>
							</p>
							<p style="text-align: left;"><span class="auto-style5">*</span>obligatorio</p>

							</div>

        		</div>
        		<div id="data-input-image">

        			<img alt="resultado" src="./Calculadora - Adeje Verde_files/resultados.png" style="width:90%;border-radius: 15px"><br><br>

        		</div>
    		</div>

	        <button id="btnsend" class="buttonstyle" style="display: block; position: absolute; left: 50%; transform: translateX(-50%);">Enviar </button>
			<br>
			<br>&nbsp;
		     
     </div>
     
     <!--div id="exitok" class="style_hidden" style="border: thin none #FAA82A; border-radius: 15px; box-shadow: 10px 5px 15px 0px #C0C0C0;
   width : 511px; background-color: #6BBD45; margin-left: auto; margin-right: auto; top: 0px; vertical-align: middle; text-align: center;">
		<h2 class="style_visible">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2>
		<h2 class="auto-style30">Exito! ya hemos enviado tu oferta!</h2>
		 <h2 class="style_visible">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2>		   
     </div-->

     <!--div id="exitbad" class="style_hidden">
		<h2 class="style_visible">&nbsp;</h2>
		<h2 class="style_visible">La dirección de correo electrónico no parece ser correcta</h2>		   
     </div-->
     &nbsp;

    <div id="energybill" class="style_hidden" style="padding: 15px; background-color: rgb(218, 219, 215); border-radius: 15px; left: 0px; top: 19px; position: relative; display: none;"> 		
		<h2 class="auto-style23" style="padding-left: 20px;"> Ingresa los datos de tu factura</h2>

		<div style="background-color: #FFF; padding:15px; margin:0 auto; text-align:center;">

			<table id="datos-factura" style="border-radius: 15px; text-align:center; margin:0 auto;">
				<tbody>
					<tr>
						<td></td>
						<td class="auto-style6">
							Potencia contratada [kW]
						</td>
						<td class="auto-style6">
							Precio potencia [€/kW/dia]</td>
					</tr>
					<tr>
						<td class="auto-style15"><strong>Potencia punta</strong></td>
						<td class="auto-style16">
							<input id="potpunta" class="input-datos-factura" style="border: thin solid #FAA82A; border-radius: 15px; padding: 10px; font-size:14px; background-color: #FFFFFF; text-align: center;" type="text" value="" placeholder="p.ej. 5,5">
						</td>
						<td class="auto-style16">
							<input id="preciopotpunta" class="input-datos-factura" style="border: thin solid #FAA82A; border-radius: 15px; padding: 10px; font-size:14px; background-color: #FFFFFF; text-align: center;" type="text" value="" placeholder="p.ej. 0,08">
						</td>
					</tr>
					<tr>
						<td class="auto-style15"><strong>Potencia valle</strong></td>
						<td class="auto-style16">
						<input id="potvalle" class="input-datos-factura" style="border: thin solid #FAA82A; border-radius: 15px; padding: 10px; font-size:14px; background-color: #FFFFFF; text-align: center;" type="text" value="" placeholder="p.ej. 4,5">
						</td>
						<td class="auto-style28">
							<input id="preciopotvalle" class="input-datos-factura" style="border: thin solid #FAA82A; border-radius: 15px; padding: 10px; font-size:14px; background-color: #FFFFFF; text-align: center;" type="text" value="" placeholder="p.ej. 0,003">
						</td>
					</tr>
					<tr>
						<td colspan="2" class="auto-style18">Consumo factura [kWh]</td>
						<td class="auto-style27">
							<input id="kwhfactura" class="input-datos-factura" style="border: thin solid #FAA82A; border-radius: 15px; padding: 10px; font-size:14px; background-color: #FFFFFF; text-align: center;" type="text" value="" placeholder="p.ej. 300">
						</td>
					</tr>
					<tr>
						<td colspan="2" class="auto-style18">Periodo factura [dias]</td>
						<td class="auto-style27">
							<input id="periodofactura" class="input-datos-factura" style="border: thin solid #FAA82A; border-radius: 15px; padding: 10px; font-size:14px; background-color: #FFFFFF; text-align: center;" type="text" value="" placeholder="p.ej. 28">
						</td>
					</tr>
					<tr>
						<td colspan="2" class="auto-style18">Importe factura [€]</td>
						<td class="auto-style27">
							<input id="importefactura" class="input-datos-factura" style="border: thin solid #FAA82A; border-radius: 15px; padding: 10px; font-size:14px; background-color: #FFFFFF; text-align: center;" type="text" value="" placeholder="p.ej. 65,33">
						</td>
					</tr>
					<tr>
						<td colspan="2" class="auto-style18">Consumo anual [kWh]<span class="auto-style1">(opcional)</span></td>
						<td class="auto-style27">
							<input id="consumoanual" class="input-datos-factura" style="border: thin solid #FAA82A; border-radius: 15px; padding: 10px; font-size:14px;background-color: #FFFFFF; text-align: center;" type="text" value="" placeholder="p.ej. 3600">
						</td>
					</tr>
				</tbody>
			</table>
		</div>

		<div id="billevaluation" style="" class="auto-style29">&nbsp; </div>
		<button id="btnanalyzebill" class="buttonstyle" style="height: 60px">Analizar </button>
 		&nbsp;
 	</div> 	
    <br>
       <br>&nbsp;
   
     <div id="clientcontact2" class="style_hidden" style="background-color:#DADBD7; padding:15px; border-radius: 15px;">		
		<h2 class="style_visible_nosize" style="text-align: left; padding-left: 20px;">Introduce tus datos y enseguida recibirás tu oferta</h2>
	        


			<div id="data-input">
        		<div id="data-input-txt">

        			<p class="auto-style57" style="vertical-align: text-bottom">
				            En este estudio preliminar te indicamos para tu instalación fotovoltaica:
				            <br>
							<img alt="check" height="21" src="check.png" width="23"> 
							<strong>tamaño</strong> acorde a las dimensiones del tejado<br>
							<img alt="check" height="21" src="check.png" width="23"> 
							<strong>precio</strong> aproximado de la instalacion
							   <br>
							<img alt="check" height="21" src="check.png" width="23"> <strong>potencial de generación</strong> de energía
							   <br>
							<img alt="check" height="21" src="check.png" width="23"> <strong>ahorros anuales</strong> por autoconsumo
							   <br>
							<img alt="check" height="21" src="check.png" width="23"> <strong>tiempo de amortización
							</strong>
							</p>

							<div class="auto-style57">

							<input id="firstname2tb" placeholder="Nombre" style="border: thin solid #FAA82A; border-radius: 15px;background-color: #FFFFFF; padding: 10px; font-size:14px; width: 292px;" type="text" value=""><br><br>

							<input id="lastname2tb" placeholder="Apellido" style="border: thin solid #FAA82A; border-radius: 15px; background-color: #FFFFFF; padding: 10px; font-size:14px; width: 291px;" type="text" value=""><br><br>

							<input id="email2tb" placeholder="Correo electrónico *" style="border: thin solid #FAA82A; border-radius: 15px; background-color: #FFFFFF; padding: 10px; font-size:14px; width: 291px;" type="text" value=""><br><br>

							<p class="auto-style42">
							<input id="publicity2cb" type="checkbox">&nbsp; 
							Quiero recibir nuevas ofertas de Adeje Verde en el futuro 
							(puedo anular mi suscripción cuando quiera)</p>
							

							<p class="auto-style42">
							<input id="accept2cb" type="checkbox">&nbsp;<span class="auto-style5">*</span>Acepto que Adeje Verde obtenga mis datos para procesar y enviar la oferta. 
							Acepto la
							<span lang="EN-US">Política de Privacidad - Adeje Verde</span> <br>
							</p>
							<p style="text-align: left;"><span class="auto-style5">*</span>obligatorio</p>

							</div>

        		</div>
        		<div id="data-input-image">

        			<img alt="resultado" src="./Calculadora - Adeje Verde_files/resultados.png" style="width:90%;border-radius: 15px"><br><br>

        		</div>
    		</div>



	        <button id="btnsend2" class="buttonstyle" style="display: block; position: absolute; left: 50%; transform: translateX(-50%);">Enviar </button>
			<br>
			<br>&nbsp;
		     
     </div>

          
          <span class="auto-style47">AV GREEN EUROPE, S.L., 
            con C.I.F. B09707001 y domicilio en calle Sabino Berthelot 64, local D, 38206, San Cristóbal de La Laguna, inscrita en el Registro Mercantil de Santa Cruz de Tenerife el 14 de febrero de 2022, Tomo 3.774, Folio 183 y hoja TF 67456.<br>
	 <br><a aria-current="page" href="https://adejeverde.com/aviso-legal">Aviso 
	 Legal</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 <a href="https://adejeverde.com/politica-de-privacidad">Política de 
	 Privacidad</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
     		</span>

  
</div>

    <button id="fixedhelpbutton" onclick="help()" class="fixedhelpbutton" style=" background-size: 30px 25px; background-position: center 5px; margin-bottom:15px; background-repeat: no-repeat;background-image: url(&#39;AVapp_files/tel.png&#39;)">	<span><br><br>Llámanos al <br>+34 658 60 28 31<br>o visite nuestra pagina de contacto, haciendo <br>  </span></button>

	
	<script>
	    	//<p>Tu oferta está lista:   <!a href="/root/temp/oferta.pdf">descargar aqui</a></p>
        //<!p>Tu oferta está lista:   <a href="../root/temp/Oferta.pdf">descargar aqui</a><!/p>
	    // In the following example, markers appear when the user clicks on the map.
		// The markers are stored in an Array.
		// The user can Then click an option To hide, show Or delete the markers.
		let userinputdemand=false;
		let userinputbill=false;
		let cornernr=1;
		var map;
		let markers = [];
		let edgemarkers=[];
		let polypoints = [];
        let scaledpolypoints = [];
		let area=0;
		let index=0;
		let cw=0;
		//var PVpolygon = null;
		var PVpolygon = [];
		var midmarker = [];
		var orientationmarker = [];
        var fieldlabel = [];
		var PVPolyNr = 0;
		var ScaledPVpolygon = null;
		var helpon=false;
		var plantarr=[];

		var mapscale =1;
		//var center=new google.maps.LatLng;
		//var centerlatitude=0 ;
		//var centerlongitude=0;
		var avglat;
		var avglng;
		var MaxZoom=0;
		var zoomLevel=22;
		
		var condodemand=0.0;
		var householddemand=0.0;
	    var commondemand=0.0;
	    var Yearlydemand=0;
	    
	    let orientation=0; 
		let tilt=0;   
	    var filesentok=false;
	    
	    //create a global variable that will point to the tooltip in the DOM
		var tipObj = null;
		var tipObj2 = null;
		
		//offset along x and y in px
		var offset = {
		    x: 20,
		    y: 20
		};
		
		var simple =true;
		var OriWidth=0;
		var OriHeight=0;
		var OriHeight2=0;
		
        var rowCount=0;
	  
	    function initMap(lat,lng) {
	          
			  var myLatlng = new google.maps.LatLng(lat, lng);
			  
			  map = new google.maps.Map(document.getElementById('map'), {
			    //maxzoom: 26,
			    zoom: 26,
			    center: myLatlng,
			    //scrollwheel: true,
			    disableDefaultUI: true,
			    zoomControl: false,
			    mapTypeId: 'hybrid',//'satellite',
			    draggableCursor:'pointer',
			    options: {
					    gestureHandling: 'greedy',
						},
				styles: [    
				        {
				            featureType: "poi",
				            elementType: "labels",
				            stylers: [{ visibility: "off" }]
				        }
				    	],
				 		//someRandomData: ""			  
				    });
			    
			
			  map.setTilt(0);
			 
              var mapZoomService = new google.maps.MaxZoomService();
        
              mapZoomService.getMaxZoomAtLatLng(myLatlng, function(MaxZoomResult){
		            if(google.maps.MaxZoomStatus.OK){
		                console.log('map.getZoom(): '+map.getZoom()+', MaxZoomResult.zoom: ' + MaxZoomResult.zoom);
		                MaxZoom=MaxZoomResult.zoom;
		            }else{
		                console.log('Error: in google.maps.MaxZoomService().getMaxZoomAtLatLng()');
		                MaxZoom=20;
		            }
		        });
		        
			  //Get possible Zoom level nearest to 22
			  console.log("MaxZoom "+ MaxZoom);
			  //map.setZoom(zoomLevel);
			  zoomLevel=20;
              //MaxZoom=map.getZoom();
              
              mapscale=1;             

			 
			  //collapseall();
              //document.getElementById("mapcontrol").style.display="block";
			  //document.getElementById("zoomctrl").scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});
			  //document.getElementById("pvtable").style.display="none";
			  //document.getElementById("mapintro").scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});

 		      var center = myLatlng;
			  var centerlatitude = myLatlng.lat();
			  var centerlongitude = myLatlng.lng();
			  
			  // This event listener will call addMarker() when the map Is clicked.
			  map.addListener("click", (event) => {
			     //alert(this.getTitle());
			    addMarker(event.latLng);
			    //Close the current InfoWindow.
			     //infoWindow.close();	
			     injectTooltip(event);
			      		  			    
			    });
			       
			  map.addListener('dragend', function () {
			  		var idleListener = map.addListener('idle', function () {
				        google.maps.event.removeListener(idleListener);
					    center = map.getCenter();
					    centerlatitude = center.lat();
					    centerlongitude = center.lng();
				    });
				}); 
              			    
			  //document.getElementById("exitok").style.display="none";
			    
	    	  var logoControlDiv = document.createElement('DIV');
			  var logoControl = new MyLogoControl(logoControlDiv);
			  logoControlDiv.index = 0; 
			  map.controls[google.maps.ControlPosition.BOTTOM_RIGHT].push(logoControlDiv);
			  
			      //attach event listeners to map
				google.maps.event.addListener(map, 'mouseover', function(e){
			            if(tipObj){tipObj.style.display='block';}
			    });
			 	
			    google.maps.event.addListener(map, 'mouseout', function(e){
			    		if(tipObj){tipObj.style.display='none';}
			    });
			
			    google.maps.event.addListener(map, 'mousemove', function(e){
			    		moveTooltip(e);
			    });
			    

			}
			
			function usersetdemand(){
			/*https://comparadorluz.com/faq/consumo-medio-casa
			*/
			    if (userinputbill==false){
			    	billtb.value=demandtb.value*0.32;
			    	billtb2.value=demandtb2.value*0.32;
			    	userinputdemand=true;
			    }
			    resetdemandbtns();

			}
			
			function usersetbill(){
			/*https://comparadorluz.com/faq/consumo-medio-casa
			*/
			    if (userinputdemand==false){
			    	demandtb.value=billtb.value/0.32;
			    	demandtb2.value=billtb2.value/0.32;
			    	userinputbill=true;
			    }
			    resetdemandbtns();

				}
            
            function calccondodemand(){
                    var numberdptos= Number(document.getElementById("nrodptos").value);
 			        var piscina=0;
 			        if (document.getElementById("poolcb").checked==true){
 			            piscina=30000*numberdptos/152;
 			        }
 			        condodemand=numberdptos*Yearlydemand + Number(document.getElementById("condodemandtb").value)+piscina;
                    householddemand=numberdptos*Yearlydemand;
                    commondemand= Number(document.getElementById("condodemandtb").value)+piscina;
 			        document.getElementById("hogaresdemand").innerHTML= "Consumo total del edificio: " + Number(condodemand).toFixed(0) + " kWh/año";
		                   
            		}
            
            function nrodptoschanged(){
                    var piscina=0;
                    var numberdptos= Number(document.getElementById("nrodptos").value);
                    if (document.getElementById("poolcb").checked==true){
 			            piscina=30000*numberdptos/152;
 			        }
 			        var generaldemand=-0.2706 *numberdptos*numberdptos+291.6*numberdptos+piscina;
 			        console.log(numberdptos);
                    document.getElementById("condodemandtb").value=Number(generaldemand).toFixed(0);
                    document.getElementById("condobilltb").value=Number(generaldemand*0.32).toFixed(0);
                    condodemand=numberdptos*Yearlydemand + Number(document.getElementById("condodemandtb").value)+piscina;
                    householddemand=numberdptos*Yearlydemand;
                    commondemand= Number(document.getElementById("condodemandtb").value)+piscina;
					document.getElementById("hogaresdemand").innerHTML= "Consumo total del edificio: " + Number(condodemand).toFixed(0) + " kWh/año";
            		}
            		
           	function getcommondemand() {
					return(commondemand); 
					}

           	function gethouseholddemand() {
					return(householddemand); 
					}
					
			function getcommonbill() {
					return(Number(document.getElementById("condobilltb").value)); 
					}

			function usersetcondodemand(){
			/*https://comparadorluz.com/faq/consumo-medio-casa
			*/
			    if (userinputbill==false){
			        document.getElementById("condobilltb").value=Number(document.getElementById("condodemandtb").value)*0.32;
			    	calccondodemand()
			    	userinputdemand=true;
			    }
			    resetdemandbtns();

			}
			
			function usersetcondobill(){
			/*https://comparadorluz.com/faq/consumo-medio-casa
			*/
			    if (userinputdemand==false){
			    	document.getElementById("condodemandtb").value=document.getElementById("condobilltb").value/0.32;
					calccondodemand()	    	
			    	userinputbill=true;
			    }
			    resetdemandbtns();
			}
			
			
			function resetdemandbtns(){
		        /*document.getElementById("btn1pers").style.backgroundColor="#0F5677";
			    document.getElementById("btn2pers").style.backgroundColor="#0F5677";
			    document.getElementById("btn3pers").style.backgroundColor="#0F5677";
			    document.getElementById("btn4pers").style.backgroundColor="#0F5677";
			    document.getElementById("btn5pers").style.backgroundColor="#0F5677";
  			    document.getElementById("btndetailed").style.backgroundColor="#0F5677";
                
                 
  			    document.getElementById("btn1pc").style.backgroundColor="#0F5677";
			    document.getElementById("btn2pc").style.backgroundColor="#0F5677";
			    document.getElementById("btn3pc").style.backgroundColor="#0F5677";
			    document.getElementById("btn4pc").style.backgroundColor="#0F5677";
			    document.getElementById("btn5pc").style.backgroundColor="#0F5677";
                */
			}
			
			function set1p(){
			/*https://comparadorluz.com/faq/consumo-medio-casa
			*/
			    //Yearlydemand=2200;
			    //demandtb.value=Yearlydemand;
			    //billtb.value=Yearlydemand*0.32;
			    //resetdemandbtns();
			    document.getElementById("btn1pers").style.backgroundColor="#FAA82A";
			    
			    document.getElementById("btn2pers").style.backgroundColor="#0F5677";
			    document.getElementById("btn3pers").style.backgroundColor="#0F5677";
			    document.getElementById("btn4pers").style.backgroundColor="#0F5677";
			    document.getElementById("btn5pers").style.backgroundColor="#0F5677";
			    document.getElementById("btndetailed").style.backgroundColor="#0F5677";
                
                scrolltoclientcontact()			    
				}
				
			function set2p(){
			    //Yearlydemand=2450;
			    //demandtb.value=Yearlydemand;
			    //billtb.value=Yearlydemand*0.32;
			    //resetdemandbtns();			    
				document.getElementById("btn2pers").style.backgroundColor="#FAA82A";
				/*
				document.getElementById("btn1pers").style.backgroundColor="#0F5677";
			    document.getElementById("btn3pers").style.backgroundColor="#0F5677";
			    document.getElementById("btn4pers").style.backgroundColor="#0F5677";
			    document.getElementById("btn5pers").style.backgroundColor="#0F5677";
			    document.getElementById("btndetailed").style.backgroundColor="#0F5677";
			    */

				scrolltoclientcontact()
				}
			
			function set3p(){
			    //Yearlydemand=2700;
			    //demandtb.value=Yearlydemand;
			    //billtb.value=Yearlydemand*0.32;
			    //resetdemandbtns();			    
				document.getElementById("btn3pers").style.backgroundColor="#FAA82A";
				scrolltoclientcontact()
				}
			
			function set4p(){
			    //Yearlydemand=2950;
			    //demandtb.value=Yearlydemand;
			    //billtb.value=Yearlydemand*0.32;
			    //resetdemandbtns();			    
				document.getElementById("btn4pers").style.backgroundColor="#FAA82A";
				scrolltoclientcontact()
				}
			
			function set5p(){
			    //Yearlydemand=3200;
			    //demandtb.value=Yearlydemand;
			    //billtb.value=Yearlydemand*0.32;
			    //resetdemandbtns();			    
				document.getElementById("btn5pers").style.backgroundColor="#FAA82A";
				scrolltoclientcontact()
				}

			function set1pc(){
			/*https://comparadorluz.com/faq/consumo-medio-casa
			*/
			    Yearlydemand=2200;
			    var numberdptos= document.getElementById("nrodptos").value;
 			    condodemand=numberdptos*Yearlydemand + Number(document.getElementById("condodemandtb").value);
			    document.getElementById("hogaresdemand").innerHTML= "Consumo total del edificio: " + condodemand + " kWh/año";
   			    resetdemandbtns();
			    document.getElementById("btn1pc").style.backgroundColor="#FAA82A";
			    calccondodemand();
				}
			
			function set2pc(){
			    Yearlydemand=2450;
			    var numberdptos= document.getElementById("nrodptos").value;
		        condodemand=numberdptos*Yearlydemand + Number(document.getElementById("condodemandtb").value);
			    document.getElementById("hogaresdemand").innerHTML= "Consumo total del edificio: " + condodemand + " kWh/año";
   			    resetdemandbtns();
			    document.getElementById("btn2pc").style.backgroundColor="#FAA82A";
			    calccondodemand();
				}
			
			function set3pc(){
			    Yearlydemand=2700;
			    var numberdptos= document.getElementById("nrodptos").value;
 			    condodemand=numberdptos*Yearlydemand + Number(document.getElementById("condodemandtb").value);
			    document.getElementById("hogaresdemand").innerHTML= "Consumo total del edificio: " + condodemand + " kWh/año";
   			    resetdemandbtns();
			    document.getElementById("btn3pc").style.backgroundColor="#FAA82A";
				calccondodemand();
				}
			
			function set4pc(){
			    Yearlydemand=2950;
			    var numberdptos= document.getElementById("nrodptos").value;
		        condodemand=numberdptos*Yearlydemand + Number(document.getElementById("condodemandtb").value);
			    document.getElementById("hogaresdemand").innerHTML= "Consumo total del edificio: " + condodemand + " kWh/año";
   			    resetdemandbtns();
			    document.getElementById("btn4pc").style.backgroundColor="#FAA82A";
				calccondodemand();
				}
			
			function set5pc(){
			    Yearlydemand=3200;
			    var numberdptos= document.getElementById("nrodptos").value;
		        condodemand=numberdptos*Yearlydemand + Number(document.getElementById("condodemandtb").value);
			    document.getElementById("hogaresdemand").innerHTML= "Consumo total del edificio: " + condodemand + " kWh/año";
   			    resetdemandbtns();
			    document.getElementById("btn5pc").style.backgroundColor="#FAA82A";
				calccondodemand();
				}
		
			function MyLogoControl(controlDiv) {
			    controlDiv.style.padding = '5px';
			    var logo = document.createElement('IMG');
			    logo.src = 'AVapp_files/South_indicator.png';
			    logo.style.width='40px';
			    logo.style.cursor = 'pointer';
			    controlDiv.appendChild(logo);
			    
			    /*
			    google.maps.event.addDomListener(logo, 'click', function() {
			        window.location = 'http://www.example.com'; 
			    });
			    */
			}	
			
			    function zoomin(){
	               zoomLevel=zoomLevel+1;
				    map.setZoom(zoomLevel);
				    if (zoomLevel != map.getZoom()){		        
				         //Wasn't accepted, Artificially zoom in
						 mapscale=zoomLevel-MaxZoom+1;					   
				         console.log("zoomLevel "+ zoomLevel);
				         console.log("Scale factor "+ mapscale);
				         document.getElementById("map").style.transformOrigin='center center'; 
				  		 document.getElementById("map").style.transform='scale(' + mapscale + ')';
				  		 percentage = (1-(1/mapscale))*100/2;
				         document.getElementById("map").style.clipPath = 'inset(' + percentage +'% ' + percentage +'%)';
					}else{
						 MaxZoom=zoomLevel;
						 mapscale=1;
						 document.getElementById("map").style.transform = 'scale(1)'; 
						 document.getElementById("map").style.clipPath = 'inset(0% 0%)';
					}
				}
				
				function zoomout(){
					zoomLevel=zoomLevel-1; 
					map.setZoom(zoomLevel);		
			    	if (zoomLevel>MaxZoom){
				         //Artificially zoom out
				         mapscale=zoomLevel-MaxZoom+1;					   
				         console.log("zoomLevel "+ zoomLevel);
				         console.log("Scale factor "+ mapscale);
				         document.getElementById("map").style.transform = 'scale(' + mapscale + ')'; 
			  		     percentage = (1-(1/mapscale))*100/2;
			             document.getElementById("map").style.clipPath = 'inset(' + percentage +'% ' + percentage +'%)';
					}else{
					     console.log("Zoomlevel "+ zoomLevel);

					 	 mapscale=1;
					 	 document.getElementById("map").style.transform = 'scale(1)'; 
						 document.getElementById("map").style.clipPath = 'inset(0% 0%)';
					}
				}

			
			function addPVandClose(){	
                //provide JSON for analysis 
			    //console.log(getPolygonAsGeoJSON(polypoints, 20, 180));
			    
			    midmarker[PVPolyNr].setMap(null);
				
				hideMarkers();
			    //edgemarkers = [];
			    markers = [];
			    polypoints=[];
			    scaledpolypoints=[];
			    cornernr=1;
			    closePopup();
			    
			    PVPolyNr=PVPolyNr+1;
			    document.getElementById("pvtable").style.display="block";
			    document.getElementById("mapcontrol").scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});
			    
			    simple=true;
			    scrolltodemandsfh();

				}	
				
			function getPolygonAsGeoJSON(points, exptilt, exporient) {
				  var geojson = {
				    "type": "FeatureCollection",
				    "features": [
				      {
				        "type": "Feature",
				        "geometry": {
				          "type": "Polygon",
				          "coordinates": [[]]
				        },
				        "properties": {
				          "tilt": exptilt,
				          "orientation": exporient
				        }
				      }
				    ]
				  };
				
				  for (var i = 0; i < points.length; i++) {
				    var latLng = points[i];
				    var coord = [latLng.lng(), latLng.lat()];
				    geojson.features[0].geometry.coordinates[0].push(coord);
				  }
				
				  // Close the polygon
				  var firstLatLng = points[0];
				  var firstCoord = [firstLatLng.lng(), firstLatLng.lat()];
				  geojson.features[0].geometry.coordinates[0].push(firstCoord);
				
				  return geojson;
				}
			
			function gmapscreenshot(srvrpath) {
				var file;
				filesentok=false;				
                
                mapscale=1;
				map.setZoom(26);
				document.getElementById("map").style.transform = 'scale(1)'; 
 			    document.getElementById("map").style.clipPath = 'inset(0% 0%)';
			  	
                document.getElementById("btnsend").style.display="none";
				document.getElementById("btnsend2").style.display="none";
				
				if (simple) {
				scrolltoclientcontact()
				}
		        
		        console.log("uploading map screenshot to " + srvrpath);
		        console.log("Map scale: " + mapscale);
		        
		        html2canvas( document.getElementById( 'map'), {
		            "logging": false,
		            "useCORS": true,
		            //"width": 511/2,
  					//"height": 511/2
		        } ).then( function ( canvas ) {
		            path = srvrpath;
			        //path = "http://87.106.198.56:51042/temp/";			        
			        data = canvas.toDataURL("image/png"); 
			        file = dataURItoBlob(data); // Convert Base64 image to binary
			        
			        console.log("File size: " + file.size);
			        
			        var fd = new FormData();
                    fd.append("gmappic", file);

			        var xhr = new XMLHttpRequest();
					xhr.open("POST", path, true);//true=async
    
					xhr.onload = function () {
					    console.log("done " + xhr.status);    
					  };
					xhr.onerror = function () {
					      console.error("Error", xhr.statusText);
					  };
					xhr.send(fd);
		        } );
		        
		       //document.getElementById("map").style.transform = 'scale(' + mapscale + ')';
         
		        console.log("uploading table screenshot to " + srvrpath);
		        
		        html2canvas( document.getElementById('pvtable'), {
		            "logging": false,
		            "useCORS": true
		        } ).then( function ( canvas ) {
		            path = srvrpath;			        
			        data = canvas.toDataURL("image/png"); 
			        file = dataURItoBlob(data); // Convert Base64 image to binary
			        
			        console.log("File size: " + file.size);
			        
			        var fd = new FormData();
                    fd.append("pvtablepic", file);

			        var xhr = new XMLHttpRequest();
					xhr.open("POST", path, true);//true=async
    
					xhr.onload = function () {
					    console.log("done " + xhr.status);
					    
 		                document.getElementById("btnsend").style.display="block";
		                document.getElementById("btnsend").style.position = "absolute";
						document.getElementById("btnsend").style.left = "50%";
						document.getElementById("btnsend").style.transform = "translateX(-50%)";
						
						document.getElementById("btnsend2").style.display="block";
		                document.getElementById("btnsend2").style.position = "absolute";
						document.getElementById("btnsend2").style.left = "50%";
						document.getElementById("btnsend2").style.transform = "translateX(-50%)";
 
						//document.getElementById("btnsend2").style.display="block";
					  };
					xhr.onerror = function () {
					      console.error("Error", xhr.statusText);
					      filesentok=false;
					  };
					  
					xhr.send(fd);
					  
		        } );
		        
		       
		    }

		  
			function dataURItoBlob(dataURI) {
			    var byteString = atob(dataURI.split(',')[1]);
			    var ab = new ArrayBuffer(byteString.length);
			    var ia = new Uint8Array(ab);
			    for (var i = 0; i < byteString.length; i++) {
			        ia[i] = byteString.charCodeAt(i);
			    }
			    return new Blob([ab], { type: 'image/jpeg' });
			}
			
			// Adds a marker To the map And push To the Array.
			function addMarker(position) {
			  center = map.getCenter();
			  centerlatitude = center.lat();
			  centerlongitude = center.lng();
			  
			  tooltiptextundo.style.display="none";
 
 			  var newLatlng = new google.maps.LatLng(position.lat()*(1/mapscale) + centerlatitude*(1-(1/mapscale)), position.lng()*(1/mapscale) + centerlongitude*(1-(1/mapscale)));
			  console.log("added: " + centerlatitude);

			  //var createMarker = function() {
				   var marker = new google.maps.Marker({
					    id: cornernr,
					    position: newLatlng,
					    map: map,
						draggable:true,
						//icon: {url:'/AVapp/Cornermarker.png', origin: new google.maps.Point(0,0), anchor: new google.maps.Point(10/mapscale,20/mapscale),scaledSize: new google.maps.Size(20/mapscale, 20/mapscale) },
						icon: {url:'/AVapp_files/Cornermarker.png', origin: new google.maps.Point(0,0), anchor: new google.maps.Point(6,12),scaledSize: new google.maps.Size(12, 12) },
					    //title: `corner ${cornernr}`,
					    title: `${cornernr}`,
					    //animation: google.maps.Animation.DROP
				   });
	               
	           marker.addListener('dragend', handleDragendEvent);
	           marker.addListener("dblclick", function() {
			       marker.setMap(null);
				});
			   markers.push(marker);
				
			   polypoints[cornernr-1]=newLatlng;
    		   polypoints[cornernr]=polypoints[0];

			   if (cornernr>2) {
					UpdatePolygon("#0000FF");
			   }
			   
			   if (cornernr==1) {
			   		setTimeout(function(){
			   		    document.getElementById("fixedhelpbutton").style.display="block";
					}, 15000);
				}	
               cornernr=cornernr+1;
              
              
			}
			
			function removeLastMarker(){
				if (cornernr>1) {
					console.log(cornernr);
                    tooltiptextundo.style.display="none";
                    tooltiptextundo.innerHTML="";
					polypoints.pop();
					markers[cornernr-2].setMap(null);
					markers.pop();
	    		    cornernr=cornernr-1;
	 			    polypoints[cornernr-1]=polypoints[0];

	    		    UpdatePolygon("#0000FF");
	    		}else{
	    		    tooltiptextundo.style.display="block";
     			    var table = document.getElementById("pvtable");
		            rowCount = table.rows.length;
                    console.log("rowcount: " + rowCount);
                    if (rowCount>=2){
                       tooltiptextundo.innerHTML="No es posible deshacer más. Si deseas modificar el diseño puedes borrarlo en la tabla inferior y dibujarlo de nuevo";
	    		    }else{
	    		       tooltiptextundo.innerHTML="No hay nada que deshacer";
	    		    }
	    		    
	    		    //injectTooltip2(event)
    		    }
			}

			function UpdatePolygon(color){

				  if(!!PVpolygon[PVPolyNr] && !!PVpolygon[PVPolyNr].setMap){
				        PVpolygon[PVPolyNr].setMap(null);
				        midmarker[PVPolyNr].setMap(null);
				        fieldlabel[PVPolyNr].setMap(null);
				  }						  
	  
				  // Define the LatLng coordinates For the polygon's path.
				  
				  // Construct the polygon.
				  PVpolygon[PVPolyNr] = new google.maps.Polygon({
					    map:map,
					    paths: polypoints,
					    strokeColor: "#0000FF",
					    strokeOpacity: 0.9,
					    strokeWeight: 1,
					    fillColor: color, //"#0000FF"
					    fillOpacity: 0.5,
					    clickable: false
				  });
				  			  
				  PVpolygon[PVPolyNr].setMap(map);
				  
				  if (edgemarkers != []) {
					  for (let i = 0; i < edgemarkers.length; i++) {
					    edgemarkers[i].setMap(null);
					  }
				  }
			  	  edgemarkers = [];
			  	  avglat=0;
			  	  avglng=0;              
				  
				  for (let i = 0; i < polypoints.length-1; i++) {
				        let mylat1=polypoints[i].lat();
				        let mylon1=polypoints[i].lng();			          
				        let mylat2=polypoints[i+1].lat();
				        let mylon2=polypoints[i+1].lng();
						avglat=avglat+mylat1;
				        avglng=avglng+mylon1;	

   	                    let pos1= new google.maps.LatLng((mylat1+mylat2)/2,(mylon1+mylon2)/2);
                        orientation= CourseFromLonLatRadians(mylat1, mylon1, mylat2, mylon2);
                        console.log(cornernr);
                        console.log(cw);

                        if ((cornernr<4) & (cw==1)) {orientation=orientation-180;}
                        
                        if (cw==0) {
                           orientation=orientation-180;
                           if (orientation<0){
                              orientation=360 +orientation;
                           }
                        } 
                        
  					    const edgemarker = new google.maps.Marker({
						    position: pos1,
						    map,
							icon: {url:'/AVapp_files/orangecircs.png', origin: new google.maps.Point(0,0), anchor: new google.maps.Point(5,5),scaledSize: new google.maps.Size(10, 10) },						    
							//title: `corner ${cornernr}`
						    title: `${orientation.toFixed(0)}`
						    });
					    
				        edgemarkers.push(edgemarker);					    
				         				  		
  				  		google.maps.event.addListener(edgemarker,'mouseover', function() {
							enterMarkerEvent(i);	  		
						});
                        
				        edgemarker.addListener('click', function() {
							clickMarkerEvent(i);
  				  		});
                        
				  }  
				   
				  avglat=avglat/(polypoints.length-1);
				  avglng=avglng/(polypoints.length-1);
				  let mapcenter= new google.maps.LatLng(avglat,avglng);
                         
  				  midmarker[PVPolyNr] = new google.maps.Marker({
						    position: mapcenter,
						    map,
							icon: {url:'/AVapp_files/orangecircs.png', origin: new google.maps.Point(0,0), anchor: new google.maps.Point(5,5),scaledSize: new google.maps.Size(10,10), labelOrigin: new google.maps.Point(15, 0) },						    
							title: `plano`,
							//label: {color: '#FFF', fontSize: '22px', fontWeight: '600',text: (PVPolyNr+1).toString()}
						    });
                  
                  fieldlabel[PVPolyNr] = new google.maps.Marker({
						    position: mapcenter,
						    map,
							icon: {url:'/AVapp_files/orangecircs.png', origin: new google.maps.Point(0,0), anchor: new google.maps.Point(3,3),scaledSize: new google.maps.Size(0, 0), labelOrigin: new google.maps.Point(-10, 0) },						    
							//title: `plano`,
							label: {color: '#FFF', fontSize: '22px', fontWeight: '600',text: (PVPolyNr+1).toString()}
						    });
				  
				  //edgemarkers.push(edgemarker);
				  midmarker[PVPolyNr].addListener('click', function() {
						clickMarkerEvent(999);
  				  });
 
  				  midmarker[PVPolyNr].setMap(map);
  				  				  
				  for (let i = 0; i < edgemarkers.length; i++) {
					    edgemarkers[i].setMap(map);
				  }
				  
				  //map.fitBounds(PVpolygon.getBounds());
				  				  
				  calcarea();

            }

            
            //listeners
			function enterMarkerEvent(index) {
			    
			    //console.log("marker " + index + " enter");
			    			    
			    if (index==999){
			       orientation=999;
			    }
			    else{
				   	orientation=Number(edgemarkers[index].getTitle());
				   	var symbol = {  
					    path: "M 48.195637,49.309806 25.115695,1.7422799 1.7958444,49.513669 24.697022,45.384853 Z",
					    fillColor: '#FFAD0F',
					    fillOpacity: 1,
					    anchor: new google.maps.Point(25,38),
					    strokeWeight: 0,
					    scale: 0.6,
					    rotation: orientation
					}		
				    orientationmarker[PVPolyNr] = new google.maps.Marker({
							    position: edgemarkers[index].getPosition(),
							    map,
								icon: symbol, 						    
								title: edgemarkers[index].getTitle()
							    });							      
				    }
                    
                    tipObj.innerHTML = "Clic aquí si este es el <strong>borde más bajo de la superficie</strong>!";

                    tipObj.style.opacity = 0.9; 
			        fade();
                    
			  		google.maps.event.addListener(orientationmarker[PVPolyNr],'mouseout', function() {
							leaveMarkerEvent();	  		
						});	
					
			        //edgemarker.addListener('click', function() {
			        orientationmarker[PVPolyNr].addListener('click', function() {
			        //google.maps.event.addListener(orientationmarker[PVPolyNr],'click', function() {

							clickMarkerEvent(index);
  				  		});
  				  	
			}			
			
			function fade() {
			    if(tipObj){
				    tipObj.style.opacity -= 0.001;
				    if (tipObj.style.opacity < 0) {
				        tipObj.style.display = "none";
				    } else {
				        setTimeout(fade, 55);
				    }
				}   
			}

			
			//listeners
			function leaveMarkerEvent(index) {
			    
			    //console.log("marker " + index + " leave");
			    
			    if (index==999){
			       orientation=999;
			    }
			    else{
			        orientationmarker[PVPolyNr].setMap(null);
			        
			        if(tipObj)
			        {tipObj.innerHTML = "Encuentras el borde mas bajo del tejado?";
			        tipObj.style.opacity = 0.9;
			        fade();
			        }
			        
				    /*orientationmarker[PVPolyNr] = new google.maps.Marker({
							    position: edgemarkers[index].getPosition(),
							    map,
								icon: {url:'/AVapp_files/orangecircs.png', origin: new google.maps.Point(0,0), anchor: new google.maps.Point(3,3),scaledSize: new google.maps.Size(6, 6) },						    , 						    
								title: edgemarkers[index].getTitle()
							    });							      
				*/
				}
			}										

            //listeners
			function clickMarkerEvent(index) {
			    //UpdatePolygon("#0000FF");
			    
			    console.log("marker index: " + index);
			    
			    if (index==999){
			       orientation=999;
			    }
			    else{
				   	orientation=Number(edgemarkers[index].getTitle());
				   	if(!!orientationmarker[PVPolyNr] && !!orientationmarker[PVPolyNr].setMap){
						orientationmarker[PVPolyNr].setMap(null);
						}
				   	var symbol = {  
					    path: "M 48.195637,49.309806 25.115695,1.7422799 1.7958444,49.513669 24.697022,45.384853 Z",
					    fillColor: '#0000FF',
					    fillOpacity: .8,
					    anchor: new google.maps.Point(25, 38),
					    strokeWeight: 0,
					    scale: 0.6,
					    rotation: orientation
					}		
				    orientationmarker[PVPolyNr] = new google.maps.Marker({
							    position: edgemarkers[index].getPosition(),
							    map,
								icon: symbol, 						    
								title: edgemarkers[index].getTitle()
							    });							      
				}
			
 			    openPopup()
			}			
                        
            function  CourseFromLonLatRadians(Lati1, Long1, Lati2, Long2) {
					let tc1=0 ;
				    const DegreesToRadians = Math.PI / 180;

					Lati1 = Lati1* DegreesToRadians;
					Long1 = Long1* DegreesToRadians;
					Lati2 = Lati2* DegreesToRadians;	
					Long2 = Long2* DegreesToRadians;
 	 
					//formula from: https://edwilliams.org/avform.htm#Crs
				 
					if (Math.cos(Lati1) < 0.0000001) {
						if (Lati1 > 0) {
							tc1 = Math.PI ;    //starting from north pole, thus heading south
						} else {
							tc1= 0 ;   //starting from south pole, thus heading north
						}
					} else {
						//Lon1 And Lon2 reversed in subtraction due To formula convention of west = +ve
						tc1 = Math.atan2(Math.sin(Long2 - Long1) * Math.cos(Lati2), Math.cos(Lati1) * Math.sin(Lati2) - Math.sin(Lati1) * Math.cos(Lati2) * Math.cos(Long2 - Long1));
				   
						//translate To compass angle ie 0 = north, positive through E, S, W
						if (tc1 < 0) {
							tc1 = tc1 + 2 * Math.PI;
						}
					}
				    
				    tc1=tc1/DegreesToRadians-90;
					if (tc1<0) {
					   tc1=360+tc1;
					}
				    
				    return tc1;
			}			
			
			function handleDragendEvent(event) {
			    //lastclickfield.value =this.title.match(/\d+/)[0];
			    polypoints[(this.title.match(/\d+/)[0])-1]=event.latLng;
			    polypoints[polypoints.length-1]=polypoints[0];
			    
				if (cornernr>2) {
				  UpdatePolygon("#0000FF");
			      }
			}

			// Sets the map on all markers in the Array.
			function setMapOnAll(map) {
			  if (markers != []) {
				  for (let i = 0; i < markers.length; i++) {
				    markers[i].setMap(map);
				  }
			  }
 			  if (edgemarkers != []) {
				  for (let i = 0; i < edgemarkers.length; i++) {
				    edgemarkers[i].setMap(map);
				  }
			  }
  			  if (midmarker != []) {
				  for (let i = 0; i < PVPolyNr.length; i++) {
				    midmarker[i].setMap(map);
				  }
			  }

			}
			
			// Removes the markers from the map, but keeps them in the Array.
			function hideMarkers() {
			  setMapOnAll(null);
			}

			// Shows any markers currently in the Array.
			function showMarkers() {
			  setMapOnAll(map);
			}

			// Deletes all markers in the Array by removing references To them.
			function deleteMarkers() {		  
			  hideMarkers();
			  edgemarkers = [];
			  markers = [];
			  polypoints=[];
			  scaledpolypoints=[];
			  cornernr=1;			  
			  
			  var table = document.getElementById("pvtable");
		      rowCount = table.rows.length;
		      console.log("rowcount: " + rowCount);

		      for (let i = rowCount-1; i>=1 ; i--) {
				  table.deleteRow(i);
				  console.log("row deleted: " + (i));
	   		  }
		  	  
			  if(!!ScaledPVpolygon && !!ScaledPVpolygon.setMap){
				       ScaledPVpolygon.setMap(null);
			  }
			  
			  for (let i = 0 ; i<PVPolyNr-1 ; i++) {
				  if(!!PVpolygon[i] && !!PVpolygon[i].setMap){
					 PVpolygon[i].setMap(null);
					 midmarker[i].setMap(null);
					 fieldlabel[i].setMap(null);
					 orientationmarker[i].setMap(null);
				  } 
			  }
			  PVPolyNr=0;			  		 
			}
			
			function calcarea() {
								
			    area=0;
			    
				for (let i = 0; i < polypoints.length-1; i++) {
					let P1lat = polypoints[i].lat();
					let P1lng = polypoints[i].lng();
					let P2lat = polypoints[i + 1].lat();
					let P2lng = polypoints[i + 1].lng();
					area = area+(P2lng - P1lng)*(Math.PI/180) * (2 + Math.sin(P1lat*(Math.PI/180)) + Math.sin(P2lat*(Math.PI/180)));
					}
		
				area = area * 6378137 * 6378137 / 2;
		        
		        console.log(polypoints.length);
		        
		        var sum
		        if(polypoints.length<5) {
		            //TRIANGLE
					let ax = polypoints[0].lat();
					let ay = polypoints[0].lng();
					let bx = polypoints[1].lat();
					let by = polypoints[1].lng();
					let cx = polypoints[2].lat();
					let cy = polypoints[2].lng();
					
					sum=(bx - ax) * (cy - ay) - (cx - ax) * (by - ay);
				    //Clockwise Or not?
					if (sum<0){ 
					   cw=0;
					} else { 
					   cw=1;
					}
		        }else{
				    //Clockwise Or not?
					if (area<0){ 
					   cw=0;
					} else { 
					   cw=1;
				}
				
				
             	}
		        
				area=Math.abs(area);
				return (area)			
		    }
		        
			function titlepath(path,name) {
			  var prntWin = window.open("");
			  prntWin.document.write("<html><head><title>"+name+"</title></head><body>" + 
			  '<iframe width="100%" height="100%" name="plugin" src="'+path+'"></iframe></body></html>');
			  prntWin.document.close();
			}   
            
            function scrolltodemandsfh(){
					//collapseall();
					resetdemandbtns();
					//document.getElementById("exitok").style.display="none";
                    document.getElementById("Demandsfhest").style.display="block";
					document.getElementById("Demandsfhest").scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});					
					//document.getElementById("btncasa").style.backgroundColor="#FAA82A";
					//document.getElementById("btncondo").style.backgroundColor="#0F5677"; 
					//document.getElementById("btnedpub").style.backgroundColor="#0F5677"; 
					//document.getElementById("btncomm").style.backgroundColor="#0F5677"; 
           	}
           	
           	function scrolltodemandcondo(){
					collapseall();
					document.getElementById("exitok").style.display="none";
                    document.getElementById("Demandcondo").style.display="block";
					document.getElementById("Demandcondo").scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});
					document.getElementById("btncasa").style.backgroundColor="#0F5677";
					document.getElementById("btncondo").style.backgroundColor="#FAA82A"; 
					document.getElementById("btnedpub").style.backgroundColor="#0F5677"; 
					document.getElementById("btncomm").style.backgroundColor="#0F5677";					
           	}


            function scrolltodemandedpub(){
					collapseall();
                    document.getElementById("exitok").style.display="none";
                    document.getElementById("Demand").style.display="block";
					document.getElementById("Demand").scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});
    				document.getElementById("btncasa").style.backgroundColor="#0F5677";
					document.getElementById("btncondo").style.backgroundColor="#0F5677"; 
					document.getElementById("btnedpub").style.backgroundColor="#FAA82A"; 
					document.getElementById("btncomm").style.backgroundColor="#0F5677";					

					Yearlydemand=0;
			        demandtb2.value=Yearlydemand;
			        billtb2.value=Yearlydemand*0.32;
			        preciseuserinput=false;
		           	}
           	
           	 function scrolltodemandcomm(){
           	        collapseall();
                    document.getElementById("exitok").style.display="none";
                    document.getElementById("Demand").style.display="block";
					document.getElementById("Demand").scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});
    				document.getElementById("btncasa").style.backgroundColor="#0F5677";
					document.getElementById("btncondo").style.backgroundColor="#0F5677"; 
					document.getElementById("btnedpub").style.backgroundColor="#0F5677"; 
					document.getElementById("btncomm").style.backgroundColor="#FAA82A";					

					Yearlydemand=0;
			        demandtb2.value=Yearlydemand;
			        billtb2.value=Yearlydemand*0.32;
			        preciseuserinput=false;			        
           	}


            function scrolltopaddress(){
                    document.getElementById("paddress").style.display="block";
					document.getElementById("paddress").scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});
           	}

            /*
            function scrolltoresults(){
                    document.getElementById("simulationresults").style.display="block";
                	document.getElementById("scalecontainer").style.display="block";
					document.getElementById("simulationresults").scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});
					document.getElementById("simulationresultend").scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});
           	}
           	*/
           	
            function scrolltooffertype(){
                document.getElementById("Offertype").style.display="block";
				document.getElementById("Offertype").scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});
            }

            function scrolltoclientcontact(){
                //document.getElementById("Offertype").style.display="none";
   			    //document.getElementById("btnsimple").style.backgroundColor="#FAA82A";
			    //document.getElementById("btndetailed").style.backgroundColor="#0F5677";
				//document.getElementById("energybill").style.display="none";
                //document.getElementById("clientcontact2").style.display="none";
                document.getElementById("energybill").style.display="none"; 
                document.getElementById("clientcontact").style.display="block";
				document.getElementById("clientcontact").scrollIntoView({behavior: "smooth", block: "start", inline: "nearest"});
            }

			function collapseall(){
				document.getElementById("Demand").style.display="none";
				document.getElementById("Demandsfhest").style.display="none";
                document.getElementById("Demandcondo").style.display="none";
				document.getElementById("clientcontact").style.display="none"; 
                document.getElementById("Offertype").style.display="none";
                document.getElementById("clientcontact2").style.display="none"; 
                document.getElementById("energybill").style.display="none";
                document.getElementById("simulationresults").style.display="none";
                //document.getElementById("map").style.display="none";
                //document.getElementById("mapcontrol").style.display="none";
                document.getElementById("paddress").style.display="none";
                document.getElementById("main").style.display="none";
                document.getElementById("condodemandtb").value="";
                document.getElementById("condobilltb").value="";
                document.getElementById("demandtb").value="";
                document.getElementById("billtb").value="";
                document.getElementById("demandtb2").value="";
                document.getElementById("billtb2").value="";
                document.getElementById("nrodptos").value="";
                document.getElementById("poolcb").checked=false;
                   
			}
			
            function scrolltoexitok(){
                deleteMarkers();
                
				collapseall();   
                        
				document.getElementById("exitok").style.display="block";
				document.getElementById("exitok").scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});
				
                }

            function gotothankyoupage(){
                //deleteMarkers();
                
				//collapseall();   
                        
				window.location.replace("https://adejeverde.com/calculadora-ty");
                }

           
            function scrolltoexitbad(){
                document.getElementById("exitbad").style.display="block";
				document.getElementById("exitbad").scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});
            }
           
            function scrolltoenergybill(){
				//document.getElementById("Offertype").style.display="none"; 
				//document.getElementById("scalecontainer").scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});               
   			    //document.getElementById("btndetailed").style.backgroundColor="#FAA82A";
			    //document.getElementById("btnsimple").style.backgroundColor="#0F5677";
				simple=false;
				document.getElementById("clientcontact").style.display="none"; 
 				document.getElementById("energybill").style.display="block";
				document.getElementById("energybill").scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});
            }

            function scrolltoprosumertype(){                
                document.getElementById("Prosumertype").style.display="block";
				document.getElementById("Prosumertype").scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});
            }

            function scrolltoclientcontact2(){
				document.getElementById("energybill").scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});
                //document.getElementById("Prosumertype").style.display="none";                
                document.getElementById("clientcontact2").style.display="block";
				document.getElementById("clientcontact2").scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});               
            }
           
            function drawscaledpolygon(){
			   	var origarea=area;
			   	var sfactor=1;
			    
			    console.log("Old area: " + area);
			                  
 				if(!!ScaledPVpolygon && !!ScaledPVpolygon.setMap){
				        ScaledPVpolygon.setMap(null);
				  }				  
				  // Define the LatLng coordinates For the polygon's path.
				  
				//Copy original polygon
				for (let i = 0; i < polypoints.length; i++) {
				    scaledpolypoints[i]=polypoints[i];
				    }
                
                //loop and scale polygon until target size is reached				
			   	while (area>(origarea*sfactor)){				  
			   	    			
	    			for (let i = 0; i < scaledpolypoints.length; i++) {
				        
				        let scaledLatlng = new google.maps.LatLng((scaledpolypoints[i].lat()*0.99+avglat*0.01) , (scaledpolypoints[i].lng()*0.99+avglng*0.01));
				        scaledpolypoints[i]=scaledLatlng;
                   		}  
                   	
                   	//Calculate new area    
                   	area=0;
                   	
                   	console.log("length: " + scaledpolypoints.length);
			    
					for (let i = 0; i < scaledpolypoints.length-1; i++) {
						let P1lat = scaledpolypoints[i].lat();
						let P1lng = scaledpolypoints[i].lng();
						let P2lat = scaledpolypoints[i + 1].lat();
						let P2lng = scaledpolypoints[i + 1].lng();
						area = area+(P2lng - P1lng)*(Math.PI/180) * (2 + Math.sin(P1lat*(Math.PI/180)) + Math.sin(P2lat*(Math.PI/180)));
						}
				
					area = area * 6378137 * 6378137 / 2;				
					area=Math.abs(area);
                    console.log("New area: " + area);
               }
               
               let cutpolypoints=cutpolygon(scaledpolypoints,polypoints[0],polypoints[6])[1];
               
               	// Construct the polygon.
				ScaledPVpolygon = new google.maps.Polygon({
					map:map,
				    paths: cutpolypoints,
				    strokeColor: "#FFFF00",
				    strokeOpacity: 1,
				    strokeWeight: 2, 
				    fillColor: "#FFFF00",
				    fillOpacity: 0.35,
				  	});
				  
				ScaledPVpolygon.setMap(map);

           }
           
           function cutpolygon(polygon, A, B) {
			  const parts = [];
			  const n = polygon.length;
			
			  let intersections = [];
			  for (let i = 0; i < n; i++) {
			    const p1 = polygon[i];
			    const p2 = polygon[(i + 1) % n];
			
			    const inter = getLineSegmentIntersection(p1, p2, A, B);
			    if (inter) {
			      intersections.push(inter);
			    }
			  }
			
			  if (intersections.length < 2) {
			    return parts;
			  }
			
			  intersections.sort((a, b) => {
			    const d1 = getDistance(A, a);
			    const d2 = getDistance(A, b);
			    return d1 - d2;
			  });
			
			  let part1 = [];
			  let part2 = [];
			
			  for (let i = 0; i < n; i++) {
			    const p = polygon[i];
			
			    if (pointOnLeftSide(p, A, B)) {
			      part1.push(p);
			    } else {
			      part2.push(p);
			    }
			
			    for (let j = 0; j < intersections.length; j++) {
			      const inter = intersections[j];
			
			      if (pointsEqual(p, inter)) {
			        part1.push(inter);
			        part2.push(inter);
			      }
			    }
			  }
			
			  parts.push(part1);
			  parts.push(part2);
			
			  return parts;
			}
			
			/*
			function getLineSegmentIntersection(p1, p2, q1, q2) {
			  const d = (q2.y - q1.y) * (p2.x - p1.x) - (q2.x - q1.x) * (p2.y - p1.y);
			  if (d === 0) {
			    return null;
			  }
			
			  const u = ((q2.x - q1.x) * (p1.y - q1.y) - (q2.y - q1.y) * (p1.x - q1.x)) / d;
			  const v = ((p2.x - p1.x) * (p1.y - q1.y) - (p2.y - p1.y) * (p1.x - q1.x)) / d;
			
			  if (u < 0 || u > 1 || v < 0 || v > 1) {
			    return null;
			  }
			
			  return {
			    x: p1.x + u * (p2.x - p1.x),
			    y: p1.y + u * (p2.y - p1.y),
			  };
			}
			*/
			
			function getDistance(p1, p2) {
			  const dx = p2.x - p1.x;
			  const dy = p2.y - p1.y;
			  return Math.sqrt(dx * dx + dy * dy);
			  }

			function pointOnLeftSide(p, A, B) {
			  return (B.x - A.x) * (p.y - A.y) - (B.y - A.y) * (p.x - A.x) > 0;
			}
			
			function pointsEqual(p1, p2) {
			  return p1.x === p2.x && p1.y === p2.y;
			}
			
			function help(){
 				window.open("https://adejeverde.com/contacto", '_blank').focus();     
			}

// Function to open the popup
  function openPopup() {
    deleteTooltip();
    document.getElementById("fixedhelpbutton").style.display="none";
    document.getElementById("inclinationpopup").style.display="block";    
    document.getElementById("popup-overlay").style.opacity = "1";
    document.getElementById("popup-overlay").style.pointerEvents = "auto";
  }

  // Function to close the popup
  function closePopup() {
    document.getElementById("popup-overlay").style.opacity = "0";
    document.getElementById("popup-overlay").style.pointerEvents = "none";
    document.getElementById("simulationresults").style.display="none";
    document.getElementById("confirmandclose").style.display="none";
    document.getElementById("confirmandclose").style.display="none";

    
	//scrolltodemandsfh()	
  }

  function addpvtotable(nro, area, orientation, tilt, kWp, specyield,PVperf) {
	 var totalkWp=0;
	 var avgyield=0;
	 var tempkWp=0;
	 plantarr=[];
	 
	 var table = document.getElementById("pvtable");
	 var rowCount = table.rows.length;
     if (rowCount>=3){
     	table.deleteRow(rowCount-1);
     	rowCount =rowCount-1;
	 }
	 
	 //table.style.backgroundColor="#FFFFFF";
	 
	 var row = table.insertRow(rowCount);
	 var color=getColorGradient(PVperf,1);
	 
	 UpdatePolygon(color);
	
/* 
	 // Convert the panel size to the corresponding number of units on the map
	const panelWidth = 1.70 ;
	const panelHeight = 1.00;
	 
	const panelSize = [panelWidth, panelHeight];
	
	const result = findMaximumPVpanels(polypoints, panelSize, orientation, tilt);
	console.log('Maximum PV Panels:', result.maxPanels);
	console.log('Maximum Placement:', result.maxPlacement);
/*
	 /* Better looking but content not readable 
	 row.insertCell(0).innerHTML= `<input style="width: 90%; color: #0F5677;  font-weight: bold; background-color: $FFFFFF; text-align:center; border-top-left-radius: 15px;border-bottom-left-radius: 15px; border: none; padding: 10px;" value="${rowCount}" />`;
	 row.insertCell(1).innerHTML= `<input style="width: 90%; color: #0F5677;  font-weight: bold; background-color: $FFFFFF; text-align:center;  border: none; padding: 10px;" value="${Number(area).toFixed(1)} m²" />`;
	 row.insertCell(2).innerHTML= `<input style="width: 90%; color: #0F5677;  font-weight: bold; background-color: $FFFFFF; text-align:center;  border: none; padding: 10px;" value="${Number(orientation).toFixed(0)} °" />`;
	 row.insertCell(3).innerHTML= `<input style="width: 90%; color: #0F5677;  font-weight: bold; background-color: $FFFFFF; text-align:center;  border: none; padding: 10px;" value="${Number(tilt).toFixed(0)} °" />`;
	 row.insertCell(4).innerHTML= `<input style="width: 90%; color: #0F5677;  font-weight: bold; background-color: $FFFFFF; text-align:center;  border: none; padding: 10px;" value="${Number(kWp).toFixed(1)} kWp" />`;
	 row.insertCell(5).innerHTML= `<input style="width: 90%; color: #0F5677;  font-weight: bold; background-color: $FFFFFF; text-align:center;  border: none; padding: 10px;" value="${Number(specyield).toFixed(0)} kWh/kWp" />`;
	 row.insertCell(6).innerHTML= `<button id="btndelete" "onclick="deleteRow(this)" style="width: 90%; text-align:center; background-color: $FFFFFF; border-top-right-radius: 15px;border-bottom-right-radius: 15px; border: none;  padding: 10px;background-repeat: no-repeat; background-position: center center; background-size: 20px; height: 35px;background-image: url('AVapp_files/borrar.png');"></button>`;	 
	 */
	 
	 row.style.border= "none"; 
	 row.style.padding= "10px";
	 row.style.cellSpacing= "0px";

	 row.insertCell(0).innerHTML= `<td>${nro}</td>` ; 
	 row.cells.item(0).style.borderBottomLeftRadius="15px";
	 row.cells.item(0).style.borderTopLeftRadius="15px";
	 row.cells.item(0).style.backgroundColor = "white";

	 row.insertCell(1).innerHTML= `<td>${Number(area).toFixed(1)} m²</td>`;
	 row.cells.item(1).style.backgroundColor = "white";

	 row.insertCell(2).innerHTML= `<td>${Number(orientation).toFixed(0)} °</td>`;
	 row.cells.item(2).style.backgroundColor = "white";

	 row.insertCell(3).innerHTML= `<td>${Number(tilt).toFixed(0)} °</td>`;	 
	 row.cells.item(3).style.backgroundColor = "white";
	 
	 row.insertCell(4).innerHTML= `<td>${Number(kWp).toFixed(1)} kWp</td>`;
	 row.cells.item(4).style.backgroundColor = "white";

	 row.insertCell(5).innerHTML= `<td>${Number(specyield).toFixed(0)} kWh/kWp</td>`;
	 row.cells.item(5).style.backgroundColor = color;

	 row.insertCell(6).innerHTML= `<button id="btndelete" onclick="deleteRow(this)" class="trashbtn"></button>`;	 

 	var rowresult = table.insertRow(rowCount+1);
 	var regex = /[+-]?\d+(\.\d+)?/g;	   
 
	for(var i=1;i<table.children[0].childElementCount-1;i++) 
	{
	  var tableRow = table.children[0].children[i];
	  for(var j=0;j<tableRow.childElementCount-1;j++)
	  {
	    var tableColumn = tableRow.children[j];
	    var floats = tableColumn.innerText.match(regex).map(function(v) { return parseFloat(v); });

	    console.log('Cell ['+i+','+j+'] value: ' + floats);
	    
	    if (j==0){
	       plantarr.push(1*floats);
	    }
	    
	    if (j==4){
	       totalkWp=totalkWp+1*floats;
	       tempkWp=floats;
	    }
	    
	    if (j==5){
	       avgyield=avgyield+floats*tempkWp;
	    } 
	  }
	} 

	 console.log("totalkWp:"+ totalkWp);
	 console.log("yield:"+ avgyield);
	 console.log("plant array: " + plantarr);
	 
	 avgyield=avgyield/totalkWp; 
 	
 	 rowresult.insertCell(0).innerHTML= `<input type="text"  style="width: 90%; color: #0F5677;  font-weight: bold;  text-align:center;background-color:#DADBD7; border: none;  padding: 10px;" value="" />`;
 	 rowresult.insertCell(1).innerHTML= `<input type="text"  style="width: 90%; color: #0F5677;  font-weight: bold;  text-align:center;background-color:#DADBD7; border: none;  padding: 10px;" value="" />`;
 	 rowresult.insertCell(2).innerHTML= `<input type="text"  style="width: 90%; color: #0F5677;  font-weight: bold;  text-align:center;background-color:#DADBD7; border: none;  padding: 10px;" value="" />`;
 	 rowresult.insertCell(3).innerHTML= `<input type="text"  style="width: 90%; color: #0F5677;  font-weight: bold;  text-align:center;background-color:#DADBD7; border: none;  padding: 10px;" value="Total:" />`;
 	 rowresult.insertCell(4).innerHTML= `<input type="text"  style="width: 90%; color: #0F5677;  font-weight: bold;  text-align:center;background-color:#DADBD7; border: none;  padding: 10px;" value="${Number(totalkWp).toFixed(1)} kWp" />`;
 	 rowresult.insertCell(5).innerHTML= `<input type="text"  style="width: 90%; color: #0F5677;  font-weight: bold;  text-align:center;background-color:#DADBD7; border: none;  padding: 10px;" value="${Number(avgyield).toFixed(0)} kWh/kWp" />`;
   }
  
  function updatetablesummary() {
  	 var totalkWp=0;
	 var avgyield=0;
	 var tempkWp=0;
	 // empty plant array
	 plantarr=[];
	  
	 var table = document.getElementById("pvtable");
	 var rowCount = table.rows.length;
     table.deleteRow(rowCount-1);
     rowCount =rowCount-1;
     if (rowCount>=2){
		 	 console.log("rowCount: " + rowCount);
			  
		 	 var rowresult = table.insertRow(rowCount);
		 	 var regex = /[+-]?\d+(\.\d+)?/g;	   
		 
			for(var i=1;i<table.children[0].childElementCount-1;i++) 
			{
			  var tableRow = table.children[0].children[i];
			  for(var j=0;j<tableRow.childElementCount-1;j++)
			  {
			    var tableColumn = tableRow.children[j];
			    var floats = tableColumn.innerText.match(regex).map(function(v) { return parseFloat(v); });
		
			    console.log('Cell ['+i+','+j+'] value: ' + floats);
			    
			    if (j==0){
			       plantarr.push(1*floats);
			    }
			    
			    if (j==4){
			       totalkWp=totalkWp+1*floats;
			       tempkWp=floats;
			    }
			    
			    if (j==5){
			       avgyield=avgyield+floats*tempkWp;
			    } 
			  }
			} 
		
			 console.log("totalkWp:"+ totalkWp);
			 console.log("yield:"+ avgyield);
			 console.log("plant array: " + plantarr);
			 
			 avgyield=avgyield/totalkWp; 
		 	
		 	 rowresult.insertCell(0).innerHTML= `<input type="text" style="width: 90%; color: #0F5677;  font-weight: bold;  text-align:center;background-color:#DADBD7; border: none;  padding: 10px;" value="" />`;
		 	 rowresult.insertCell(1).innerHTML= `<input type="text" style="width: 90%; color: #0F5677;  font-weight: bold;  text-align:center;background-color:#DADBD7; border: none;  padding: 10px;" value="" />`;
		 	 rowresult.insertCell(2).innerHTML= `<input type="text" style="width: 90%; color: #0F5677;  font-weight: bold;  text-align:center;background-color:#DADBD7; border: none;  padding: 10px;" value="" />`;
		 	 rowresult.insertCell(3).innerHTML= `<input type="text" style="width: 90%; color: #0F5677;  font-weight: bold;  text-align:center;background-color:#DADBD7; border: none;  padding: 10px;" value="Total:" />`;
		 	 rowresult.insertCell(4).innerHTML= `<input type="text" style="width: 90%; color: #0F5677;  font-weight: bold;  text-align:center;background-color:#DADBD7; border: none;  padding: 10px;" value="${Number(totalkWp).toFixed(1)} kWp" />`;
		 	 rowresult.insertCell(5).innerHTML= `<input type="text" style="width: 90%; color: #0F5677;  font-weight: bold;  text-align:center;background-color:#DADBD7; border: none;  padding: 10px;" value="${Number(avgyield).toFixed(0)} kWh/kWp" />`;
     
     }else{
     	document.getElementById("pvtable").style.display="none";
     	document.getElementById("Demandsfhest").style.display="none";
		document.getElementById("clientcontact").style.display="none"; 
        document.getElementById("clientcontact2").style.display="none"; 
        document.getElementById("energybill").style.display="none";

	 }	 
	 
   }

    // Function to delete a row from the table
    function deleteRow(button) {
    
      	var row = button.parentNode.parentNode;
      	
      	var regex = /[+-]?\d+(\.\d+)?/g;
	    var tableColumn = row.children[0];
	    var nrocampo = Number(tableColumn.innerText.match(regex).map(function(v) { return parseFloat(v); }));
        
        //console.log("Deleting row: "+ row.rowIndex + " Campo: " + nrocampo);
       	//remove from plant array
      	delete plantarr[row.rowIndex];
	   
	    //delete row from table
	    row.parentNode.removeChild(row);
	    updatetablesummary()
  	
	    if(!!PVpolygon[(nrocampo-1)] && !!PVpolygon[(nrocampo-1)].setMap){
		 	
		 	PVpolygon[(nrocampo-1)].setMap(null);
			midmarker[(nrocampo-1)].setMap(null);
			fieldlabel[(nrocampo-1)].setMap(null);
			orientationmarker[(nrocampo-1)].setMap(null);
		}
		document.getElementById("clientcontact").style.display="none";
		document.getElementById("clientcontact").style.display="none";
    }
	
	function getpvorientation() {
		return(orientation) 
	}

	function getfiletransferstatus() {
		var ok=0;
		if (filesentok==true){
		    ok=1;
		}
		return(ok) 
	}


	function getpvarea() {
		return(area) 
	}
	
	function getpvselection() {
	    return(plantarr)
	}

   	function getcondodemand() {
	    return(condodemand)
	}
	
	function getColorGradient(percent, alpha) {
	  // Convert percent to a value between 0 and 1
	  var normalizedPercent = percent / 100;
	
	  // Calculate the RGB values for red, yellow, and green
	  var red = 255;
	  var green = 255;
	  var blue = 0;
	  if (normalizedPercent <= 0.5) {
	    green = Math.round(normalizedPercent * 2 * 255);
	  } else {
	    red = Math.round((1 - normalizedPercent) * 2 * 255);
	  }
	
	  green=green+80;
	  if (green >= 255){
	  green=255;
	  }
	  
	  red=red+80;
	  if (red >= 255){
	  red=255;
	  }  
	  
	  blue=blue+80;
	  if (blue >= 255){
	  blue=255;
	  }
	    
	  // Convert RGB values to hexadecimal string
	  var color = "#" + componentToHex(red) + componentToHex(green) + componentToHex(blue);
	
	  // Append alpha value to color string
	  if (alpha >= 0 && alpha <= 1) {
	    var alphaHex = Math.round(alpha * 255).toString(16);
	    if (alphaHex.length === 1) {
	      alphaHex = "0" + alphaHex;
	    }
	    color += alphaHex;
	  }
	  
	  return color;
	}
	
	function componentToHex(component) {
	  var hex = component.toString(16);
	  return hex.length === 1 ? "0" + hex : hex;
	}

// Function to calculate the area of a shape
function calculateArea(shape) {
  let area = 0;
  for (let i = 0; i < shape.length; i++) {
    const p1 = shape[i];
    const p2 = shape[(i + 1) % shape.length];
    area += p1[0] * p2[1] - p2[0] * p1[1];
  }
  return Math.abs(area / 2);
}

// Function to check if a point is inside a polygon
function isInsidePolygon(point, polygon) {
  const x = point[0];
  const y = point[1];
  let inside = false;

  for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
    const xi = polygon[i][0];
    const yi = polygon[i][1];
    const xj = polygon[j][0];
    const yj = polygon[j][1];

    const intersect =
      yi > y !== yj > y && x < ((xj - xi) * (y - yi)) / (yj - yi) + xi;
    if (intersect) inside = !inside;
  }

  return inside;
}


// Function to calculate the area of a polygon
function calculatePolygonArea(polygonCoordinates) {
  let area = 0;
  const numPoints = polygonCoordinates.length;

  for (let i = 0; i < numPoints; i++) {
    const { lat: lat1, lng: lng1 } = polygonCoordinates[i];
    const { lat: lat2, lng: lng2 } = polygonCoordinates[(i + 1) % numPoints];

    area += (lng1 * lat2 - lng2 * lat1);
  }

  return Math.abs(area / 2);
}

// Function to pack rectangles in an irregular Google Maps polygon
function packRectanglesInPolygon(polygonCoordinates, rectangleWidth, rectangleHeight) {
  // Calculating the area of the polygon
  const polygonArea = calculatePolygonArea(polygonCoordinates);

  // Calculating the number of rectangles that can fit in the polygon
  const numRectangles = Math.floor(polygonArea / (rectangleWidth * rectangleHeight));

  // Creating an array to hold the rectangle positions
  const rectanglePositions = [];

  // Iteratively positioning the rectangles within the polygon
  for (let i = 0; i < numRectangles; i++) {
    let positionFound = false;

    while (!positionFound) {
      // Generating a random point within the polygon
      const randomPoint = generateRandomPointInPolygon(polygonCoordinates);

      // Checking if the rectangle fits at the random point
      if (isRectangleFit(randomPoint, rectangleWidth, rectangleHeight, rectanglePositions)) {
        rectanglePositions.push(randomPoint);
        positionFound = true;
      }
    }
  }

  // Returning the packed rectangles
  return rectanglePositions;
}

// Function to generate a random point within the polygon
function generateRandomPointInPolygon(polygonCoordinates) {
  // Find the minimum and maximum latitude and longitude values
  let minLat = Infinity;
  let maxLat = -Infinity;
  let minLng = Infinity;
  let maxLng = -Infinity;

  polygonCoordinates.forEach(({ lat, lng }) => {
    minLat = Math.min(minLat, lat);
    maxLat = Math.max(maxLat, lat);
    minLng = Math.min(minLng, lng);
    maxLng = Math.max(maxLng, lng);
  });

  // Generate a random point within the bounding box of the polygon
  const randomLat = minLat + Math.random() * (maxLat - minLat);
  const randomLng = minLng + Math.random() * (maxLng - minLng);

  return { lat: randomLat, lng: randomLng };
}

// Function to check if a rectangle fits at the given position
function isRectangleFit(position, rectangleWidth, rectangleHeight, rectanglePositions) {
  const { lat: x, lng: y } = position;

  // Checking if the rectangle intersects with any existing rectangles
  for (let i = 0; i < rectanglePositions.length; i++) {
    const { lat: rectX, lng: rectY } = rectanglePositions[i];

    if (x + rectangleWidth > rectX && x < rectX + rectangleWidth &&
        y + rectangleHeight > rectY && y < rectY + rectangleHeight) {
      return false;
    }
  }

  return true;
}


// Function to find the maximum number of PV panels within a complex polygon
function findMaximumPVpanels(polygon, panelSize, orientation, tilt) {
  let rectWidth = panelSize[0]/111111;
  let rectHeight = panelSize[1]*Math.cos(tilt* Math.PI/180)/111111;
  
  console.log("Height: " + rectHeight + " Width: " + rectWidth);
  
  let maxPanels = 0;
  let maxPlacement = [];
   
  // Iterate over each point within the polygon
  for (let i = 0; i < polygon.length; i++) {
    
    const point = polygon[i];

    // Check if the point is inside the polygon
    //if (isInsidePolygon(point, polygon)) {
      const startX = point.lat()-rectWidth;
      const startY = point.lng()-rectHeight;
      let panels = 0;
	  
	  let x = startX;
      let y = startY;
      let orientrad = orientation * Math.PI/180;
      let cosorientation = Math.cos(orientrad);
      let sinorientation = Math.sin(orientrad);

      let x1 = x;
      let y1 = y;
      let x2 = x1 + (rectHeight * cosorientation)*Math.cos(startX * Math.PI/180);
      let y2 = y1 + (rectHeight * sinorientation); //
      let x3 = x2 - (rectWidth * sinorientation)*Math.cos(startX * Math.PI/180);
      let y3 = y2 + (rectWidth * cosorientation);
      let x4 = x1 - (rectWidth * sinorientation)*Math.cos(startX * Math.PI/180);
      let y4 = y1 + (rectWidth * cosorientation);

      // Iterate over each potential panel placement
      //for (let x = startX; x <= startX + panelWidth*10; x++) {
      //  for (let y = startY; y <= startY + panelHeight*10; y++) {
          const panel = [
            { lat: x1, lng: y1 },
            { lat: x2, lng: y2 },
            { lat: x3, lng: y3 },
            { lat: x4, lng: y4 }
          ];

          //pointIsInPoly(x2, y2, polypoints);

          //if (==true) {
 			
 			/*
 			if pointIsInPoly([x2, y2], polygon) {
 			   if pointIsInPoly([x3, y3], polygon) {
				  if pointIsInPoly([x4, y4], polygon) {
			*/
          // Check if the panel is completely inside the polygon
          //if (panel.every(p => pointIsInPoly([p.lng, p.lat], polygon))) {
            var isInside = false;
		    var minX = panel[0].lat, maxX = panel[0].lat;
		    var minY = panel[0].lng, maxY = panel[0].lng;
		    console.log('minX: ' + minX);
		    
		    for (var n = 1; n < panel.length; n++) {
		        var q = panel[n];
		        minX = Math.min(q.lat, minX);
		        maxX = Math.max(q.lat, maxX);
		        minY = Math.min(q.lng, minY);
		        maxY = Math.max(q.lng, maxY);
		        //console.log("minX: " + minX +" maxX: " + maxX);
		    }
		   
		   /*
		    if (px < minX || px > maxX || py < minY || py > maxY) {
		        return false;
		    }
		
		    var i = 0, j = polygon.length - 1;
		    for (i, j; i < polygon.length; j = i++) {
		        
		        if ( (polygon[i].lng > py) != (polygon[j].lng > py) &&
		                px < (polygon[j].lat - polygon[i].lat) * (py - polygon[i].lng) / (polygon[j].lng - polygon[i].lng) + polygon[i].lat ) {
		            isInside = !isInside;
		            console.log("panel inside");          
		            drawPanel(panel);
		            }
		        else {
		        console.log("panel outside");
		        }
		    }

          */
          
            panels++;
            
              	
            //}
            //  }
            //}
          //}

        //}
      //}

      /*
      // Update the maximum number of panels and placement
      if (panels > maxPanels) {
        maxPanels = panels;
        maxPlacement = [startX, startY];
      }
      */
    //}
  }

  return { maxPanels, maxPlacement };
}

function pointIsInPoly(px,py, polygon2) {
    
    console.log("Polygonlen: " + polygon2.length);
    var isInside = false;
    var minX = polygon2[0].lat, maxX = polygon2[0].lat;
    var minY = polygon2[0].lng, maxY = polygon2[0].lng;
    console.log('minX: ' + polygon2[0].lat);
    
    for (var n = 1; n < polygon2.length; n++) {
        var q = polygon2[n];
        minX = Math.min(q.lat, minX);
        maxX = Math.max(q.lat, maxX);
        minY = Math.min(q.lng, minY);
        maxY = Math.max(q.lng, maxY);
        //console.log("minX: " + minX +" maxX: " + maxX);
    }

    if (px < minX || px > maxX || py < minY || py > maxY) {
        return false;
    }

    var i = 0, j = polygon.length - 1;
    for (i, j; i < polygon.length; j = i++) {
        
        if ( (polygon[i].lng > py) != (polygon[j].lng > py) &&
                px < (polygon[j].lat - polygon[i].lat) * (py - polygon[i].lng) / (polygon[j].lng - polygon[i].lng) + polygon[i].lat ) {
            isInside = !isInside;
        }
    }

    return isInside;
}


// Function to draw a PV panel on the map
function drawPanel(panel) {
  const panelPolygon = new google.maps.Polygon({
    map: map,
    paths: panel,
    strokeColor: '#FFFFFF',
    strokeOpacity: 1,
    strokeWeight: 0.5,
    fillColor: '#0000FF',
    fillOpacity: 0.35,
    geodesic: true
  });
  panelPolygon.setMap(map);
}

	function showmap() {
	    
		document.getElementById("mapcontrol").style.display="block";
		document.getElementById("map").style.display="block";
		document.getElementById("mapcontrol").scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});
		document.getElementById("pvtable").style.display="none";
		//document.getElementById("btnunderstood").style.display="none";
		
  			  const divelement = document.getElementById("map");
			  const rect = divelement.getBoundingClientRect();
			  OriWidth=rect.width; //map.getDiv().offsetWidth;.getBoundingClientRect().width
			  OriHeight=rect.height; //map.getDiv().offsetHeight;
			  //console.log("Width: " + OriWidth + "px");
			  //console.log("Height: " + OriHeight + "px");

  			  const divelement2 = document.getElementById("mapcontrol");
			  const rect2 = divelement2.getBoundingClientRect();
			  OriHeight2=rect2.height; //map.getDiv().offsetHeight;
			  //console.log("Height2: " + OriHeight2 + "px");


		}
		  
	function isTouchDevice() {
	  return (('ontouchstart' in window) ||
	     (navigator.maxTouchPoints > 0) ||
	     (navigator.msMaxTouchPoints > 0));
	}

	/********************************************************************
	* injectTooltip(e,data)
	* inject the custom tooltip into the DOM
	********************************************************************/
	var coordPropName = null;

	function injectTooltip(event){

			if (cornernr<8){	    
		        if(tipObj){deleteTooltip(event);}
		        
		        //create the tooltip object
		        tipObj = document.createElement("div");
		        tipObj.style.width = '150px';
		        tipObj.style.height = 'auto'; //'60px';
		        tipObj.style.background = "white"; // "#FAA82A";
		        tipObj.style.borderRadius = "5px";
		        tipObj.style.padding = "6px";
		        tipObj.style.fontFamily = "Arial,Helvetica";
		        tipObj.style.textAlign = "center";
		        tipObj.style.fontSize ="13px";
		        tipObj.style.zIndex ="999999";
		        if (cornernr==1) {tipObj.innerHTML = "<strong>Marque cualquier esquina</strong> de la sección del tejado que prefiera";}
		        if (cornernr==2) {tipObj.innerHTML = "Bien! Ahora sigue marcando las esquinas en <strong> sentido horario </strong> o <strong>antihorario </strong>.";}
		        //if (cornernr==3) {tipObj.innerHTML = "Para definir un área se necesitan al menos tres puntos";}
		        if (cornernr==3) {tipObj.innerHTML = "Por si acaso: siempre puedes <strong>reajustar los marcadores ;)</strong>";}
		        if (cornernr==4) {tipObj.innerHTML = "Cuando hayas terminado, haz clic en el <strong>punto naranja </strong> situado en el <strong> punto más bajo del tejado</strong>.";}
		        if (cornernr==5) {tipObj.innerHTML = "Cuando hayas terminado, haz clic en el <strong>punto en el medio para tejado plano</strong>.";}
 		        if (cornernr==6) {tipObj.innerHTML = "Pequeño consejo: <strong>evite las zonas de sombra!</strong>";}
                if (cornernr==7) {tipObj.innerHTML = "Pequeño consejo: los tejados orientados al <strong>sur</strong> son los <strong>mas eficientes</strong>!";}
                
                if(window.matchMedia("(pointer: coarse)").matches) {
    				// touchscreen
    				tipObj.innerHTML=tipObj.innerHTML + "<br><br> x";
    				tipObj.addEventListener('click', function (event) {
        				 deleteTooltip(event);   
        			});
				}                
                
		        //fix for the version issue
		        eventPropNames = Object.keys(event);
		        if(!coordPropName){
		        	//discover the name of the prop with MouseEvent
		          for(var i in eventPropNames){
		          	var name = eventPropNames[i];
		            if(event[name] instanceof MouseEvent){
		            	coordPropName = name;
		              //console.log("--> mouse event in", coordPropName)
		              break;
		            }
		          }
		        }
		        
		        if(coordPropName){
		          //position it
		          //console.log("position tooltip");
		          tipObj.style.position = "fixed";
		          
		          if(window.matchMedia("(pointer: coarse)").matches) {
    				// touchscreen
    				tipObj.style.top = "50%"; 
		            tipObj.style.left = "50%"; 
		            tipObj.style.transform="translateX(-50%)";
    			  }
    			  else {
    			    tipObj.style.top = event[coordPropName].clientY  +  offset.y + "px";
		            tipObj.style.left = event[coordPropName].clientX  + offset.x + "px";
    			  }
		
		          //add it to the body
		          document.body.appendChild(tipObj);
		         
				  tipObj.style.opacity = 0.9;
				   if (cornernr>1){
				   //fade();//(function fade(){(tipObj.style.opacity-=0.001)<0?tipObj.style.display="none":setTimeout(fade,25)})();							      
				   }
				   
				   
				 }  
			  }
		    }	
					
			/********************************************************************
				* moveTooltip(e)
			  * update the position of the tooltip based on the event data
			********************************************************************/
			function moveTooltip(event){
					if (cornernr==1){injectTooltip(event)} 
					
					if(tipObj && event && coordPropName){				    
					    //console.log(event[coordPropName].clientY+ offset.y + Math.max(document.documentElement.scrollTop,document.body.scrollTop));					    
					    //position it
				        tipObj.style.top = event[coordPropName].clientY  + offset.y + "px";
				        tipObj.style.left = event[coordPropName].clientX + offset.x + "px";
				    }
			}
			
			/********************************************************************
				* deleteTooltip(e)
			  * delete the tooltip if it exists in the DOM
			********************************************************************/
			function deleteTooltip(event){
					if(tipObj){
			    		//delete the tooltip if it exists in the DOM
			    		document.body.removeChild(tipObj);

			        tipObj = null;
			    }
			}
			
			
			function injectTooltip2(event){
     
                if(tipObj2){deleteTooltip(event);}
		        
		        //create the tooltip object
		        tipObj2 = document.createElement("div");
		        tipObj2.style.width = '150px';
		        tipObj2.style.height = 'auto'; //'60px';
		        tipObj2.style.background = "white"; // "#FAA82A";
		        tipObj2.style.borderRadius = "5px";
		        tipObj2.style.padding = "6px";
		        tipObj2.style.fontFamily = "Arial,Helvetica";
		        tipObj2.style.textAlign = "center";
		        tipObj2.style.fontSize ="13px";
		        tipObj2.style.zIndex ="999999";
		        tipObj2.innerHTML = "No es posible deshacer más. Si deseas modificar el diseño debes borrarlo en la tabla inferior y dibujarlo de nuevo";

		        //fix for the version issue
		        eventPropNames = Object.keys(event);
		        if(!coordPropName){
		        	//discover the name of the prop with MouseEvent
		          for(var i in eventPropNames){
		          	var name = eventPropNames[i];
		            if(event[name] instanceof MouseEvent){
		            	coordPropName = name;
		              //console.log("--> mouse event in", coordPropName)
		              break;
		            }
		          }
		        }
		        
		        if(coordPropName){
		          //position it
		          //console.log("position tooltip");
		          tipObj2.style.position = "fixed";
		          tipObj2.style.top = event[coordPropName].clientY  +  offset.y + "px";
		          tipObj2.style.left = event[coordPropName].clientX  + offset.x + "px";
		
		          //add it to the body
		          document.body.appendChild(tipObj2);
		         
				  tipObj2.style.opacity = 0.9;
				   if (cornernr>1){
				   fade();							      
				   }
				 }  
			  }

			
			
			function pointInPoly(verts, pt) {
			  let c = false;
			  for (let i = 0, j = verts.length - 1; i < verts.length; j = i++) {
			    if (((verts[i].y > pt.y) != (verts[j].y > pt.y)) && (pt.x < (verts[j].x - verts[i].x) * (pt.y - verts[i].y) / (verts[j].y - verts[i].y) + verts[i].x)) c = !c;
			  }
			  return c;
			}
			
			// ENTER in Addressfield =click
			document.querySelector("#addresstb").addEventListener("keyup", event => {
			    if(event.key !== "Enter") return; 
			    document.querySelector("#btnsearch").click(); 
			    event.preventDefault(); 
			});
			
		</script>


    <script src="./Calculadora - Adeje Verde_files/js" defer=""></script>
    
    <script>
	    $( document ).ready(function() {
	        b4j_connect("/AVapp/ws");
	    });
	</script>
	
	<script>
	  $(window).load(function() {
	    $('#loading').hide();
	  });
	</script>


	 </div>


<iframe name="__uspapiLocator" tabindex="-1" role="presentation" aria-hidden="true" title="Blank" style="display: none; position: absolute; width: 1px; height: 1px; top: -9999px;" src="./Calculadora - Adeje Verde_files/saved_resource(1).html"></iframe><iframe tabindex="-1" role="presentation" aria-hidden="true" title="Blank" style="position: absolute; width: 1px; height: 1px; top: -9999px;" src="./Calculadora - Adeje Verde_files/bc-v4.min.html"></iframe><div style="width: 150px; height: auto; background: white; border-radius: 5px; padding: 6px; font-family: Arial, Helvetica; text-align: center; font-size: 13px; z-index: 999999; position: fixed; top: 403px; left: 1082px; opacity: 0.9; display: none;"><strong>Marque cualquier esquina</strong> de la sección del tejado que prefiera</div></body></html>