function se() {
	//setup search
	var domainRestriction 	= 'www.natuerlich-attraktiv.ch';
	//show if domain is set and not index page
	if(domainRestriction){
		var drawMode 			= GSearchControl.DRAW_MODE_TABBED;	//DRAW_MODE_LINEAR or DRAW_MODE_TABBED
		var resultSetSize 		= GSearch.LARGE_RESULTSET;			//GSearch.LARGE_RESULTSET or SMALL_RESULTSET
		var linkTarget			= GSearch.LINK_TARGET_SELF;
		var imageSize			= GimageSearch.IMAGESIZE_MEDIUM;
	
	    var siteSearch = new GwebSearch(); 
	    	siteSearch.setSiteRestriction(domainRestriction);
	    	siteSearch.setUserDefinedLabel('Webseite');
		
	
	    var imageSearch = new GimageSearch(); 
	    	imageSearch.setSiteRestriction(domainRestriction);
	    	imageSearch.setRestriction(GimageSearch.RESTRICT_IMAGESIZE,imageSize);
			imageSearch.setUserDefinedLabel('Bilder');
			
	    var fileSearch = new GwebSearch(); 
	    	fileSearch.setSiteRestriction(domainRestriction);
	    	fileSearch.setQueryAddition("filetype:pdf");
	    	fileSearch.setUserDefinedLabel('Dokumente');
	    	
			
		//define div for element location
		var searchInputDiv = $("search");
		var dynamicsDiv = $("dynamics");
		
		// create a search control and custom search form
		this.output = new GSearchControl();
		//add searches and tab display order
	    this.output.addSearcher(siteSearch);	
		//this.output.addSearcher(siteSearch, siteOptions);		
		
	    this.output.addSearcher(fileSearch);	
	    this.output.addSearcher(imageSearch);	
	
		var sections = eval('({})');
		
		for (var i in sections)
		{
			var WebSection = new GwebSearch(); 
			WebSection.setSiteRestriction(domainRestriction+sections[i].path);
			WebSection.setUserDefinedLabel(sections[i].label);
			this.output.addSearcher(WebSection);   	
		}	
		
		
		this.searchForm = new GSearchForm(true, searchInputDiv);
	
		// bind clear and submit functions
		this.searchForm.setOnSubmitCallback(this, se.prototype.onSubmit);
		this.searchForm.setOnClearCallback(this, se.prototype.onClear);
	
		var searcher;
		var options;
	
	
		var drawOptions = new GdrawOptions();
			//drawOptions.setDrawMode(drawMode); //die variable wird hier nicht erkannt...
			drawOptions.setDrawMode(drawMode);
			drawOptions.setSearchFormRoot(dynamicsDiv);
			
		this.output.setResultSetSize(resultSetSize);	
		this.output.setNoResultsString(GSearchControl.NO_RESULTS_DEFAULT_STRING);
		this.output.setLinkTarget(linkTarget);
		this.output.draw(dynamicsDiv, drawOptions);
		
		//if search was requested with url parameter
		var term='';
		
		if(term != ""){
			form = this.searchForm;
			form.input.value = term;
			form.execute();
		}
	}
}

// when the form fires a submit, grab its
// value and call the left and right control
se.prototype.onSubmit = function(form){
	if($('content')){
		$('content').hide();
		$('mediacenter').hide();
	}
	
	
	if ($('google-branding') == null) 
		new Insertion.Bottom('dynamics', '<div id="google-branding"></div>');
		
	GSearch.getBranding(($('google-branding')));	
	var q = form.input.value;
	if (q && q!= "") {
		this.output.execute(q);
		var keywordtracker = '?q=' + q;
		trackDownload(keywordtracker);
	}
	
	return false;


	
}

// when the form fires a clear, call the left and right control
se.prototype.onClear = function(form) {
	$('content').show();
	$('mediacenter').show();
	this.output.clearAllResults();
	form.input.value = "";
	return false;
}


function OnLoad() {
	new se();
}

GSearch.setOnLoadCallback(OnLoad);