function VentanaX() {
         if (window.innerWidth) {
            return window.innerWidth;
         } else if (document.body && document.body.offsetWidth) {
            return document.body.offsetWidth;
         } else {
            return screen.width;
         }
}
function showgrafic(pageurl,winwidth,winheight) {
         graficshow=window.open (
             "showgrafic.php?pic="+pageurl,
             "Apartment",
             "toolbar=no,"
            +"scrollbars=no,"
            +"location=no,"
            +"resizable=no,"
            +"width="+winwidth
            +",height="+winheight
         );
}
function hideMenus() {
         document.getElementById("homeID").style.left = "-500px";
         document.getElementById("objectID").style.left = "-500px";
         document.getElementById("enquiryID").style.left = "-500px";
         document.getElementById("propertyID").style.left = "-500px";
         document.getElementById("lanzaroteID").style.left = "-500px";
         document.getElementById("contactID").style.left = "-500px";
}
function showHomeMenu() {
         document.getElementById("HomeID").style.left = ((VentanaX() / 2) - 413) + "px";
}
function showObjectMenu() {
         document.getElementById("objectID").style.left = ((VentanaX() / 2) - 366) + "px";
}
function showEnquiryMenu() {
         document.getElementById("enquiryID").style.left = ((VentanaX() / 2) - 205) + "px";
}
function showPropertyMenu() {
         document.getElementById("propertyID").style.left = ((VentanaX() / 2) - 83) + "px";
}
function showLanzaroteMenu() {
         document.getElementById("lanzaroteID").style.left = ((VentanaX() / 2) - 19) + "px";
}
function showContactMenu() {
         document.getElementById("contactID").style.left = ((VentanaX() / 2) + 121) + "px";
}
function openCalender(art) {
         var typus = art;
         window.open("calender.php?art=" + typus,"wcal","toolbar=no,scrollbars=no,location=no,resizable=yes,width=150,height=140");
}
function insertAkunftIntoForm(reisetag,anreisemonat,anreisejahr) {
         document.mainForm.anreiseTag.selectedIndex=reisetag;
         document.mainForm.anreiseMon.selectedIndex=anreisemonat;
         document.mainForm.anreiseJahr.selectedIndex=anreisejahr;
}
function insertAbreiseIntoForm(reisetag,anreisemonat,anreisejahr) {
         document.mainForm.abreiseTag.selectedIndex=reisetag;
         document.mainForm.abreiseMon.selectedIndex=anreisemonat;
         document.mainForm.abreiseJahr.selectedIndex=anreisejahr;
}
function showAnArrow() {
         showNoArrow();
         document.getElementById("anArrow").innerHTML="<img src='grafic/arrow.gif' width='20' height='23' border='0' alt=''>";
}
function showAbArrow() {
         showNoArrow();
         document.getElementById("abArrow").innerHTML="<img src='grafic/arrow.gif' width='20' height='23' border='0' alt=''>";
}
function showNoArrow() {
         document.getElementById("anArrow").innerHTML="&nbsp;";
         document.getElementById("abArrow").innerHTML="&nbsp;";
}
function charco_del_palo_naturist_beach() {
         document.location.href="villas.php?ort=Nudist%20Beach";
}
function ppc() {
         if ((document.euro.euros.value < 100)||(isNaN(document.euro.euros.value))) {
            alert("please note: the minimum amount for a reservation is 150 EUR");
            document.euro.euros.value = 100;
            document.euro.euros.focus();
         } else {
            document.paypal.amount.value=document.euro.euros.value;
            document.paypal.item_name.value="€" + document.euro.euros.value + " per person per week";
            document.paypal.submit();
         }
}