function Search(txtSearch) {
    if (txtSearch.value != "") {
        var strAction = "/searchresult.aspx?searchtext=" + txtSearch.value;
        window.location = strAction;
        return false; // Stopper form action
    }

}

function SearchKeyPressed(event, txtSearch) {
    if (event.keyCode == 13) // [Enter] has been pressed inside txtSearch
    {
        Search(txtSearch);
        return false;
    }
}

function ShowVideo(div, url, image) {
    
    var element = document.getElementById(div);
    var showWidth = element.style.width.replace("px", "");
    var showHeight = element.style.height.replace("px", "");
    
    var imageFlashVar = "";
    if (image)
        imageFlashVar = "&image=" + image;
    try {
        var flashvars = {};
        flashvars.height = showHeight;
        flashvars.width = showWidth;
        flashvars.file = url;
        flashvars.type = "video";
        var params = {};
        params.allowscriptaccess = "true";
        params.allowfullscreen = "true";
        var attributes = {};
        swfobject.embedSWF('/flash/player.swf', element.id, showWidth, showHeight, "9.0.0", "expressInstall.swf", flashvars, params, attributes);

    } catch (exception) {}
}