// JScript File

function OnLoad() 
{
    // Create a search control
    var searchControl = new GSearchControl();
    searchControl.setLinkTarget(GSearch.LINK_TARGET_SELF);
    searchControl.setResultSetSize(GSearch.SMALL_RESULTSET);

    modeClosed = new GsearcherOptions();
    modeClosed.setExpandMode(GSearchControl.EXPAND_MODE_CLOSED);
    modeOpen = new GsearcherOptions();
    modeOpen.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);

    //var drawOptions = new GdrawOptions();
    //drawOptions.setDrawMode(GSearchControl.DRAW_MODE_TABBED);
    //Web Search
    var webSearch = new GwebSearch();
    searchControl.addSearcher(webSearch, modeOpen);

    webSearch.setUserDefinedLabel("Go World Travel");
    webSearch.setSiteRestriction("www.goworldtravel.com");

    //Video Search
    //var videoSearch = new GvideoSearch();
    //searchControl.addSearcher(videoSearch, modeClosed);

    // Tell the searcher to draw itself and tell it where to attach without tab
    searchControl.draw(document.getElementById("searchcontrol"));

    // Tell the searcher to draw itself and tell it where to attach with tab
    //searchControl.draw(document.getElementById("searchcontrol"),drawOptions);
    var pnlSearch = document.getElementById("searchcontrol");
    
    //hide powered by table
    var tableTags = pnlSearch.getElementsByTagName("table");
    var tagCount = tableTags.length;
    for(var i=0; i<tagCount; i++)
    {
        if(tableTags[i].className == "gsc-branding")
        {
            tableTags[i].style.display="none";
        }
    }
    
    //display powered by in textbox
    var formTag = pnlSearch.getElementsByTagName("FORM")[0];
    formTag.id = "frmSearchWeb";
}// JScript File

