﻿
function SearchBoats(){
    var params = '?';
    if (document.getElementById('BoatSearch_Make').value.length > 1) { params += 'Model="' + document.getElementById('BoatSearch_Make').value + '"&Brand="' + document.getElementById('BoatSearch_Make').value + '"'} 
    if (document.getElementById('BoatSearch_Make').value.length > 1 && document.getElementById('BoatSearch_Brand').value.length > 1){
    params += '&'
    }
     if (document.getElementById('BoatSearch_Brand').value.length > 1) { params += 'Brand="' + document.getElementById('BoatSearch_Brand').value + '"'} 
    if (document.getElementById('BoatSearch_Type').value.length > 1) { params += '&Type="' + document.getElementById('BoatSearch_Type').value + "\""} 
        window.location='http://www.southamptonboatshow.com/2011/visiting/boats_at_the_show.aspx' + params;
}

function SearchExhibs(){
    var params = '?';
    if (document.getElementById('ExhibitorSearch_Name').value.length > 1) { params += 'Name="' + document.getElementById('ExhibitorSearch_Name').value + "\""} 
    params += '&Category="' + document.getElementById('Template_SearchBlock_ExhibitorSearch_Category').value + "\""
    
    window.location='http://www.southamptonboatshow.com/2011/visiting/exhibitor_list.aspx' + params;
}

function triggerKeypressBoats(e){
    if (e.keyCode == 13) {
        
        SearchBoats();
        return false;
    }
}

function triggerKeypressExhibs(e){
    if (e.keyCode == 13) {
    
        SearchExhibs();
        return false;
    }
}
