//<![CDATA[
google.load("search", "1");
var app;
var win = false;
function OnLoad() {
	app = new App();
}

function App() {




// Create a search control
var searchControl = new GSearchControl();
searchControl.setSearchCompleteCallback(this, App.prototype.OnSearchComplete);
var options = new GdrawOptions();
options.setSearchFormRoot(document.getElementById("searchForm"));
var eoptions = new google.search.SearcherOptions();
eoptions.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN);
// Add in a full set of searchers
//var localSearch = new google.search.LocalSearch();
//searchControl.addSearcher(localSearch);
//searchControl.addSearcher(new GwebSearch());
var engSearch = new GwebSearch();
engSearch.setUserDefinedLabel("Eng-eff.com");
engSearch.setSiteRestriction("eng-eff.com");
//options.setExpandMode(engSearch.EXPAND_MODE_OPEN);
var civSearch = new GwebSearch();
civSearch.setUserDefinedLabel("Civil3Dpedia.com");
civSearch.setSiteRestriction("civil3dpedia.com");
searchControl.addSearcher(engSearch, eoptions);
searchControl.addSearcher(civSearch, eoptions);
//searchControl.addSearcher(new google.search.VideoSearch());
//searchControl.addSearcher(new google.search.BlogSearch());

// Set the Local Search center point
//localSearch.setCenterPoint("Itasca, IL");

// Tell the searcher to draw itself and tell it where to attach

searchControl.draw(document.getElementById("searchResults"), options);

//document.getElementById('searchResults2').innerHTML += "<br /> Search Finished <br />";
// Execute an inital search
//searchControl.execute("");
}

App.prototype.OnSearchComplete = function(sc, searcher) {
	if (document.getElementById('popSearch').style.display == "none")
	{
		popUp('popSearch');
		win = true;
	}
	else
	{
		win = false;
	}
}
/*function method_closure(object, method, opt_argArray) {
      return function() {
        return method.apply(object, opt_argArray);
      }
    }*/
google.setOnLoadCallback(OnLoad);
/*App.prototype.OnSearchComplete = function(sc, searcher) {
popUp('popCustom');
}*/

//]]>
