﻿//Script for the VCOM Custom Search Module
//ensures that there is text in the search textbox before submitting the Search button
function EnsureSearchText(txtID) {   
    if (document.getElementById(txtID).value == '') {  
        return false;  
    } else {   
        return true;  
    }
}

//Javascript function for the keypress event of the textbox - if user
//clicks ENTER while in the textbox the search button will be clicked
function CaptureEnter(btn) {
    if (event.keyCode == 13) 
    {
        event.cancelBubble = true;
        event.returnValue = false;
        if (document.getElementById) {
            document.getElementById(btn).click();
        }
    }
}
