//<![CDATA[
google.load('search', '1');

function OnLoad() {
	// Create a search control
	var searchControl = new GSearchControl;
	
	options = new google.search.SearcherOptions();
    options.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN);	
	
    standard_cv_query = "inurl:(CV|curriculum)(pdf|doc|rtf|txt|htm|html|php|shtml|asp|jsp|pls|txt|aspx|spx) -intitle:(maken|opstellen|voorbeeld|upload|vacatures|vacature)";
    
    /*################
    # WEBSEARCH CV'S #
    ################*/
    var web_searcher = new GwebSearch();
	web_searcher.setQueryAddition(standard_cv_query);
	web_searcher.setRestriction(google.search.Search.RESTRICT_EXTENDED_ARGS,{ lr: 'lang_nl' });
	web_searcher.setResultSetSize(google.search.Search.LARGE_RESULTSET);

	web_searcher.setUserDefinedLabel('Websearch');

	/*###################################
    # WEBSEARCH Professionele netwerken #
    ###################################*/
    var pn_searcher = new GwebSearch();
	pn_searcher.setQueryAddition(" (site:linkedin.com OR site:xing.com/profile/ OR site:ecademy.net OR site:google.com/s2/profiles/ OR site:ikki.nl OR site:vacatures.marktplaats.nl/profielen-man/vrouw-zoekt-werk/ ) -intitle:(directory|company|vacature)");
	pn_searcher.setResultSetSize(google.search.Search.LARGE_RESULTSET);

	pn_searcher.setUserDefinedLabel('Professionele netwerken');

	/*##########################
    # WEBSEARCH Profielensites #
    ##########################*/
    var ps_searcher = new GwebSearch();
	ps_searcher.setQueryAddition("(site:hyves.nl OR site:facebook.com OR site:nl.netlog.com OR site:myspace.com)");
	ps_searcher.setResultSetSize(google.search.Search.LARGE_RESULTSET);

	ps_searcher.setUserDefinedLabel('Profielensites');

	/*#################
    # WEBSEARCH Blogs #
    #################*/
    var blog_searcher = new google.search.BlogSearch();
	blog_searcher.setQueryAddition(standard_cv_query);
	blog_searcher.setResultSetSize(google.search.Search.LARGE_RESULTSET);
	
	//blog_searcher.setRestriction("lr:lang_nl");
	
	blog_searcher.setUserDefinedLabel('Blogs');
	
	searchControl.addSearcher(web_searcher, options);
	searchControl.addSearcher(pn_searcher, options);
	searchControl.addSearcher(ps_searcher, options);
	searchControl.addSearcher(blog_searcher, options);
	
	// tell the searcher to draw itself and tell it where to attach
	var drawOptions = new google.search.DrawOptions();
	drawOptions.setDrawMode(GSearchControl.DRAW_MODE_TABBED);

	searchControl.draw(document.getElementById("searchcontrol"),drawOptions);
	
	// execute an inital search
	//searchControl.execute("VW GTI");
}
//GSearch.setOnLoadCallback(OnLoad);
google.setOnLoadCallback(OnLoad);
//]]>