﻿//Reset Basic Search Fields
function ClearBasicFields()
{
    document.getElementById("ctl00_CPHBody_txtBasicSearch").value = "";
    document.getElementById("ctl00_CPHBody_txtBasicSearch").focus();
    return false;
}

//Reset Advanced Search Fields
function ClearAdvFields()
{
    document.getElementById("ctl00_CPHBody_txtBoatType").value = "Select Boat Type";   
     var lbBoatTypes = document.getElementById("ctl00_CPHBody_lbBoatTypes");
    for (var i=lbBoatTypes.options.length-1; i>=0; i--){
        lbBoatTypes.options.length = 0; 
    } 
    document.getElementById("ctl00_CPHBody_ddlCondition").selectedIndex = 0;
    document.getElementById("ctl00_CPHBody_txtManufacturingModel").value = "";
    document.getElementById("ctl00_CPHBody_ddlHullMaterial").selectedIndex = 0;
    document.getElementById("ctl00_CPHBody_lbBoatTypes").selectedIndex = 0;
    document.getElementById("ctl00_CPHBody_txtLocation").value = "";
    document.getElementById("ctl00_CPHBody_ddlFuelType").selectedIndex = 0;
    document.getElementById("ctl00_CPHBody_ddlEngineNos").selectedIndex = 0;
    document.getElementById("ctl00_CPHBody_txtMinLOA").value = "";
    document.getElementById("ctl00_CPHBody_txtMaxLOA").value = "";
    document.getElementById("ctl00_CPHBody_txtMinYear").value = "";
    document.getElementById("ctl00_CPHBody_txtMaxYear").value = "";
    document.getElementById("ctl00_CPHBody_txtMinPrice").value = "";
    document.getElementById("ctl00_CPHBody_txtMaxPrice").value = "";    
    document.getElementById("ctl00_CPHBody_ddlCondition").focus();
    //Validators
    //document.getElementById("ctl00_CPHBody_RegularExpressionValidator1").value="";
    return false;}
