
function checkData (){
	


if (document.f.Fullname.value.length ==0){
document.f.Fullname.focus()
alert("Please enter your name.")
return false}

if (document.f.Address.value.length ==0){
document.f.Address.focus()
alert("Please enter your Address.")
return false}

if (document.f.City.value.length ==0){
document.f.City.focus()
alert("Please enter your City.")
return false}


/*
//if (document.f.State.value.length ==0){
//document.f.State.focus()
//alert("Please enter your State.")
//return false}

//if (document.f.Zip.value.length ==0){
//document.f.Zip.focus()
//alert("Please enter your Zip Code.")
//return false}


if (document.f.Phone.value.length ==0){
document.f.Phone.focus()
alert("Please enter your Phone Number.")
return false}
*/
// Check for valid email
if (document.f.usrEmail.value.length ==0){
document.f.usrEmail.focus()
alert("Please enter an e-mail address.")
return false}
if (document.f.usrEmail.value.length >0){
i=document.f.usrEmail.value.indexOf("@")
j=document.f.usrEmail.value.indexOf(".",i)
k=document.f.usrEmail.value.indexOf(",")
kk=document.f.usrEmail.value.indexOf(" ")
jj=document.f.usrEmail.value.lastIndexOf(".")+1
len=document.f.usrEmail.value.length

if ((i>0) && (j>(1+1)) && (k==-1) && (kk==-1) &&
(len-jj >=2) && (len-jj<=3)) {
}
else {
document.f.usrEmail.focus()
document.f.usrEmail.select()
alert("Please enter an exact email address.\n" +
document.f.usrEmail.value + " is invalid.")
return false}
}
/*
if (document.f.ocref.value.length ==0){
document.f.ocref.focus()
alert("Please enter an OCREF# for the villa you are inquiring about or reserving.")
return false}
*/
document.f.submit();
}
/*
function checkData2 (){

if (document.f.Fullname.value.length ==0){
alert("Please enter your name.")
document.f.Fullname.focus()
return false}

if (document.f.Address.value.length ==0){
alert("Please enter your Address.")
document.f.Address.focus()
return false}

if ((document.f.State.value.length==0) && ((document.f.Country.value == 'United States') || (document.f.Country.value == 'United States of America') || (document.f.Country.value == 'U.S.A.') || (document.f.Country.value == 'U.S.') || (document.f.Country.value == 'USA') || (document.f.Country.value == 'US') || (document.f.Country.value == 'united states') || (document.f.Country.value == 'United states') || (document.f.Country.value == 'united States') || (document.f.Country.value == 'US') || (document.f.Country.value == 'us') || (document.f.Country.value == 'usa') || (document.f.Country.value == 'u.s.') || (document.f.Country.value == 'u.s.a.') || (document.f.Country.value == 'u.s.') || (document.f.Country.value == 'u.s.a.') || (document.f.Country.value == 'u.s.a') || (document.f.Country.value == 'U.S.A') || (document.f.Country.value == 'u.s.a') || (document.f.Country.value == 'U.S.A') || (document.f.Country.value == 'U.S') || (document.f.Country.value == 'u.s'))){
document.f.State.focus()
alert("Please enter your State.")
return false}

if ((document.f.Zip.value.length==0) && ((document.f.Country.value == 'United States') || (document.f.Country.value == 'United States of America') || (document.f.Country.value == 'U.S.A.') || (document.f.Country.value == 'U.S.') || (document.f.Country.value == 'USA') || (document.f.Country.value == 'US') || (document.f.Country.value == 'united states') || (document.f.Country.value == 'United states') || (document.f.Country.value == 'united States') || (document.f.Country.value == 'US') || (document.f.Country.value == 'us') || (document.f.Country.value == 'usa') || (document.f.Country.value == 'u.s.') || (document.f.Country.value == 'u.s.a.') || (document.f.Country.value == 'u.s.') || (document.f.Country.value == 'u.s.a.') || (document.f.Country.value == 'u.s.a') || (document.f.Country.value == 'U.S.A') || (document.f.Country.value == 'u.s.a') || (document.f.Country.value == 'U.S.A') || (document.f.Country.value == 'U.S') || (document.f.Country.value == 'u.s'))){
document.f.Zip.focus()
alert("Please enter your Zip Code.")
return false}

if (document.f.Phone.value.length ==0){
document.f.Phone.focus()
alert("Please enter your Phone Number.")
return false}

// Check for valid email
if (document.f.usrEmail.value.length ==0){
document.f.usrEmail.focus()
alert("Please enter an e-mail address.")
return false}
if (document.f.usrEmail.value.length >0){
i=document.f.usrEmail.value.indexOf("@")
j=document.f.usrEmail.value.indexOf(".",i)
k=document.f.usrEmail.value.indexOf(",")
kk=document.f.usrEmail.value.indexOf(" ")
jj=document.f.usrEmail.value.lastIndexOf(".")+1
len=document.f.usrEmail.value.length

if ((i>0) && (j>(1+1)) && (k==-1) && (kk==-1) &&
(len-jj >=2) && (len-jj<=3)) {
}
else {
document.f.usrEmail.focus()
document.f.usrEmail.select()
alert("Please enter an exact email address.\n" +
document.f.usrEmail.value + " is invalid.")
return false}
}

if (document.f.ocref.value.length ==0){
document.f.ocref.focus()
alert("Please enter an OCREF# for the villa you are inquiring about or reserving.")
return false}

if (document.f.ccStayingAt.value.length == 0){
document.f.ccStayingAt.focus()
alert("There was a problem submitting your reservation:\nPlease enter the name of the villa you wish to stay at.\n\nIf you do not wish to confirm a reservation at this time,\n please press the button labeled Request Information")
return false}

//if (document.f.deposit_amount[0].checked){
//document.f.deposit_amount[1].focus()
//alert("There was a problem submitting your reservation:\nTo confirm a reservation, please check $500 in the amount field.\n\nIf you do not wish to confirm a reservation at this time,\n please press the button labeled Request Information")
//return false}

if (document.f.cctype.options[0].selected){
document.f.cctype.focus()
alert("There was a problem submitting your reservation:\nYou must supply a credit card type\n\nIf you do not wish to confirm a reservation at this time,\n please press the button labeled Request Information")
return false}

if (document.f.ccNum.value.length == 0){
document.f.ccNum.focus()
alert("There was a problem submitting your reservation:\nTo approve a $500 deposit, you must supply a credit card number\n\nIf you do not wish to confirm a reservation at this time,\n please press the button labeled Request Information")
return false}

if (document.f.ccExpDate.value.length == 0){
document.f.ccExpDate.focus()
alert("There was a problem submitting your reservation:\nTo confirm a reservation, please supply an expiration date.\n\nIf you do not wish to confirm a reservation at this time,\n please press the button labeled Request Information")
return false}

if (document.f.ccNameOnCard.value.length == 0){
document.f.ccNameOnCard.focus()
alert("There was a problem submitting your reservation:\nTo confirm a reservation, please supply the name on the card.\n\nIf you do not wish to confirm a reservation at this time,\n please press the button labeled Request Information")
return false}

if (!(((document.f.FromDateMonth.value.length ==0) && (document.f.FromDateDay.value.length ==0) && (document.f.FromDateYear.value.length ==0) && (document.f.ToDateMonth.value.length ==0) && (document.f.ToDateDay.value.length ==0) && (document.f.ToDateYear.value.length ==0)) || ((document.f.FromDateMonth.value.length >0) && (document.f.FromDateDay.value.length >0) && (document.f.FromDateYear.value.length >0) && (document.f.ToDateMonth.value.length >0) && (document.f.ToDateDay.value.length >0) && (document.f.ToDateYear.value.length >0))))
{
document.f.FromDateMonth.focus();
alert("You entered an invalid date range.\nPlease either select a value for all date fields, or leave them all set to 'any'");
return false}
else
{
//check that low date is not higher than high date
jsFromDate = new Date(document.f.FromDateYear.value, (document.f.FromDateMonth.value - 1), document.f.FromDateDay.value);
jsToDate = new Date(document.f.ToDateYear.value, (document.f.ToDateMonth.value - 1), document.f.ToDateDay.value);
if (jsFromDate > jsToDate){
document.f.FromDateMonth.focus()
alert("You entered an invalid date range.\n'From Date' is later than 'To Date'");
return false
}
}


}

function resetdates(){
document.f.FromDateMonth.value="0";
document.f.FromDateDay.value="0";
document.f.FromDateYear.value="0";
document.f.ToDateMonth.value="0";
document.f.ToDateDay.value="0";
document.f.ToDateYear.value="0";
}
*/



