// open a new window centered or translated by a specified amount function openform(formxx) { var win2w = 550; var win2h = 450; var rightward = 0; var upward = 0; var iMyWidth; var iMyHeight; //gets top and left positions based on user's resolution so hint window is centered. //half the screen width minus half the new window width (plus 5 pixel borders) plus rightward translation. iMyWidth = (window.screen.width/2) - (win2w/2 + 10) + rightward; //half the screen height minus half the new window height (plus title and status bars) minus upward translation. iMyHeight = (window.screen.height/2) - (win2h/2 + 25) - upward; var win2 = window.open(formxx,"ReservationForm", "status=no,width=550,height=450,left=" + iMyWidth + ", top=" + iMyHeight + ", screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes"); } function openformOLD(formxx) { var formwin = window.open(formxx,"ReservationForm","status=no,scrollbars=yes,width=550,height=450") } function checkform(theform) { var test = theform.doublewc.value if ((theform.email.value !="") || (theform.contact.value !="")) { if ((theform.arrive.value !="") && (theform.nights.value !="")) { if (test !="") { alert("OK") } else { alert(" Apartments/Ferienwohnungen?") } } else { alert("Arrival Date/Ankunft?, Nights/Naechte?") } } else { alert("Fax/Tel ?") } } function storename() { opener.document.forms[0].field1.value = document.forms[0].nameres.value; } function storeemail() { opener.document.forms[0].field2.value = document.forms[0].email.value; } function storecontact() { opener.document.forms[0].field3.value = document.forms[0].contact.value; } function storeaddress1() { opener.document.forms[0].field4.value = document.forms[0].address1.value; } function storeaddress2() { opener.document.forms[0].field5.value = document.forms[0].address2.value; } function storearrive() { opener.document.forms[0].field6.value = document.forms[0].arrive.value; } function storenights() { opener.document.forms[0].field7.value = document.forms[0].nights.value; } function storepersons() { opener.document.forms[0].field8.value = document.forms[0].persons.value; } function storedoublewc() { opener.document.forms[0].field9.value = document.forms[0].doublewc.value; } function storesinglewc() { opener.document.forms[0].field10.value = document.forms[0].singlewc.value; } function initall() { for (var i = 1; i <= 10; i++) { document.forms[0].elements[i].value = opener.document.forms[0].elements[i].value; } this.focus(); } function clearall() { opener.document.forms[0].reset() for (var i = 1; i <= 10; i++) { opener.document.forms[0].elements[i].value="" } } function closeStart() { self.close() }