<!-- Begin      PRICE VALIDATION
// JavaScript Document
<!-- Begin
function doPriceCheckWeekly() {

var FromPrice = 0;
var ToPrice = 0;

if (theform.frompriceW.value != "" && theform.topriceW.value != "") {

    FromPrice = parseInt(theform.frompriceW.value);
    ToPrice = parseInt(theform.topriceW.value);

    if (ToPrice < FromPrice) {
        alert("Maximum Rate must be same as or more than the Minimum Rate");
        theform.frompriceW.focus();
        return false;
    }
}
return true;
}



function doPriceCheckDaily() {

var FromPrice = 0;
var ToPrice = 0;

if (theform.frompriceD.value != "" && theform.topriceD.value != "") {

    FromPrice = parseInt(theform.frompriceD.value);
    ToPrice = parseInt(theform.topriceD.value);

    if (ToPrice < FromPrice) {
        alert("Maximum Rate must be same as or more than the Minimum Rate");
        theform.frompriceD.focus();
        return false;
    }
}
return true;
}



function CheckForm() {

if (theform.id.value == "") {

/*
  if (theform.frompriceW.value == "" && theform.topriceW.value == "" && theform.frompriceD.value == "" && theform.topriceD.value == "") {
    alert("Please enter EITHER a Weekly rate OR a Daily rate");
    theform.frompriceW.focus();
    return false;
    }
*/

  if (theform.frompriceW.value != "" && theform.frompriceD.value != "") {
    alert("Please enter EITHER a Weekly rate OR a Daily rate");
    theform.frompriceW.focus();
    return false;
    }

  if (theform.frompriceW.value != "" && theform.topriceD.value != "") {
    alert("Please enter EITHER a Weekly rate OR a Daily rate");
    theform.frompriceW.focus();
    return false;
    }
  if (theform.topriceW.value != "" && theform.frompriceD.value != "") {
    alert("Please enter EITHER a Weekly rate OR a Daily rate");
    theform.topriceW.focus();
    return false;
    }
  if (theform.topriceW.value != "" && theform.topriceD.value != "") {
    alert("Please enter EITHER a Weekly rate OR a Daily rate");
    theform.topriceW.focus();
    return false;
    }

if (doPriceCheckWeekly() == false){
    return false;
  }	 

  if (doPriceCheckDaily() == false){
    return false;
  }	 

}

return true;
} 


//  End -->
