﻿function SearchBt_OnClick() {
    if (document.getElementById("SearchedValue").value == '') {
        window.open( "http://search.google.dot.gov/FMCSA/FMCSASearchProcess.asp?ie=&site=DOT_Pages&output=xml_no_dtd&client=DOT_Pages&lr=&proxystylesheet=DOT_Pages&oe=&fmcsa_only=1&q=Search+All+FMCSA+Sites&Image1=Go&x=42&y=13");
    }
    else {
        window.open("http://search.google.dot.gov/FMCSA/FMCSASearchProcess.asp?ie=&site=DOT_Pages&output=xml_no_dtd&client=DOT_Pages&lr=&proxystylesheet=DOT_Pages&oe=&fmcsa_only=1&q=" + document.getElementById("SearchedValue").value + "&Image1=Go&x=42&y=13");
    }
}
function keypressSearch(e) {
    var Ucode = e.keyCode ? e.keyCode : e.charCode
    if (Ucode == 13) {
        //debugger;
        SearchBt_OnClick()
        //write the code for submit 
    }
} 
