function MM_preloadImages(){var D=document;if(D.images){if(!D.MM_p){D.MM_p=new Array()}var C,B=D.MM_p.length,A=MM_preloadImages.arguments;for(C=0;C<A.length;C++){if(A[C].indexOf("#")!=0){D.MM_p[B]=new Image;D.MM_p[B++].src=A[C]}}}}function MM_swapImgRestore(){var C,A,B=document.MM_sr;for(C=0;B&&C<B.length&&(A=B[C])&&A.oSrc;C++){A.src=A.oSrc}}function MM_findObj(E,D){var C,B,A;if(!D){D=document}if((C=E.indexOf("?"))>0&&parent.frames.length){D=parent.frames[E.substring(C+1)].document;E=E.substring(0,C)}if(!(A=D[E])&&D.all){A=D.all[E]}for(B=0;!A&&B<D.forms.length;B++){A=D.forms[B][E]}for(B=0;!A&&D.layers&&B<D.layers.length;B++){A=MM_findObj(E,D.layers[B].document)}if(!A&&D.getElementById){A=D.getElementById(E)}return A}function MM_swapImage(){var D,C=0,A,B=MM_swapImage.arguments;document.MM_sr=new Array;for(D=0;D<(B.length-2);D+=3){if((A=MM_findObj(B[D]))!=null){document.MM_sr[C++]=A;if(!A.oSrc){A.oSrc=A.src}A.src=B[D+2]}}}function checkOptions(B,A){if(B.options[B.selectedIndex].value=="other"){A.disabled=false}else{A.value="";A.disabled=true}}function checkForm(A){if(A.Name.value==""){alert("Please enter your name.");A.Name.focus();return false}if(A.Email.value==""){alert("Please enter your email address.");A.Email.focus();return false}if(A.Email.value!==""){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(A.Email.value)){alert("Please enter a valid email address.");A.Email.focus();return false}}if(A.rentalType.value==""){alert("Please select a rental type.");A.rentalType.focus();return false}if(A.vehicleGroup.value==""){alert("Please select a vehicle type.");A.vehicleGroup.focus();return false}if(A.startLocation.value==""){alert("Please enter your start location.");A.startLocation.focus();return false}if(A.startLocation.value=="other"&&A.otherLocation.value==""){alert("Please enter your other location.");A.otherLocation.focus();return false}if(A.returnLocation.value==""&&A.oneWayRental.value=="yes"){alert("Please enter your return location.");A.returnLocation.focus();return false}if(A.startDate.value=="Click to view calendar"){alert("Please use the calendar to enter your start date.");A.startDate.focus();return false}if(A.returnDate.value=="Click to view calendar"){alert("Please use the calendar to enter your return date.");A.returnDate.focus();return false}if(A.contactType.value=="fax"&&A.Fax.value==""){alert("Tou have choosen to be contacted by Fax\nby you have not entered your number.");A.Fax.focus();return false}if(A.contactType.value=="email"&&A.Email.value==""){alert("Tou have choosen to be contacted by Email\nby you have not entered your address.");A.Email.focus();return false}if(A.contactType.value=="phone"&&A.Telephone.value==""){alert("You have choosen to be contacted by Telephone\nby you have not entered your number.");A.Telephone.focus();return false}if(A.code.value==""){alert("Please enter the validation code.");A.code.focus();return false}return true}function warnFields(){switch(document.Form.contactType.value){case"email":if(document.Form.Email.value==""){alert("Please enter your email address.");document.Form.Email.focus();return false}break;case"phone":if(document.Form.Telephone.value==""){alert("Please enter your Phone number.");document.Form.Telephone.focus();return false}break;case"fax":if(document.Form.Fax.value==""){alert("Please enter your Fax number.");document.Form.Fax.focus();return false}break}}function unHideFields(){document.Form.vehicleGroup.disabled=false}function unHideReturnLocation(){if(document.Form.oneWayRental.value=="no"){document.Form.returnLocation.value="";document.Form.returnLocation.disabled=true}else{alert("Please enter your return location.");document.Form.returnLocation.disabled=false;document.Form.returnLocation.focus();return false}}arrSS=new Array(3);arrSS[0]=new Array("Please select a vehicle group");arrSS[1]=new Array("C1","C2","C3","C4","C5","C6","C7","C8","C9");arrSS[2]=new Array("V1","V2","V3","V4","V5","V6","V7");arrSS[3]=new Array("PC","M3","M4");function ChangeSecondSelect(A){A.vehicleGroup.options.length=0;if(A.rentalType.selectedIndex>=0){optionsSecond=arrSS[A.rentalType.selectedIndex];for(i=0;i<optionsSecond.length;i++){anOption=optionsSecond[i];A.vehicleGroup.options[i]=new Option(anOption,anOption)}}};