<html xmlns:sds=""><!-- #BeginTemplate "/Templates/search_page.dwt" -->
<head>
<!-- #BeginEditable "doctitle" --> 
<title>Preferences</title>
<style>
@media all
{
  sds\:spinbox {behavior:url(spinbox.htc)}
  sds\:checklist {behavior:url(checklist.htc)}
}
</style>
<!-- #EndEditable --> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<link rel="stylesheet" href="search.css"/>
<script language="JavaScript" src="search_errors.js"></script>
<script language="VBScript" src="vb_utils.js"></script>
<script language="JavaScript" src="external_io.js"></script>
<script language="JavaScript" src="ui_utils.js"></script>
<script language="JavaScript" src="math_utils.js"></script>
</head>

<body bgcolor="#FFFFFF" style="background-image:  url(Images/Branding.gif); background-repeat:no-repeat; background-position:center center">
<!-- #BeginEditable "Page%20Script%20Top" --> 
<script language="JavaScript" src="search_index.js"></script>
<script language="JavaScript" src="spinbox.js"></script>
<script language="JavaScript" src="preferences.js"></script>

<script language="JavaScript">
function OnAllIndexesButtonClick()
{
  SelectAllCheckListItems(document.all.index_list);
}

function OnAllFieldsButtonClick()
{
  SelectAllCheckListItems(document.all.field_list);
  
  // gray out fields not selectable for this view option
  // (currently only abstract field is not selectable
  // in summary option)
  SetFieldEnableStates(document.all.field_list,
    GetRadioButton(document.all.results_view_option));
}

function OnResultsViewRadioClick()
{
  var option = GetRadioButton(document.all.results_view_option);
  SetFieldEnableStates(document.all.field_list, option);
}

function OnFieldListClick()
{
  var doc_name = ToLocField("Document Name");
  var el = event.srcElement;
  
  if(el.id == doc_name)
  {
    alert(/*IDS_E_DOC_TURNED_OFF1*/"Das Dokumentname-Feld kann nicht ausgeschaltet werden.\n" +
	      /*IDS_E_DOC_TURNED_OFF2*/"Kehrt zur Grundeinstellung zurck.");
  
    var values = new Array();
    values[doc_name] = "true";
    SetCheckListSelections(document.all.field_list, values);
  }
}

function OnLoadPage()
{
  SetCheckListItems(document.all.index_list, GetIndexNames());
  SelectCheckListItems(document.all.index_list, GetSelectedIndexNames()); 
  SetCheckList(document.all.field_list, ToLocFields(GetAppValues("Preferences/Fields")));
  
  var values = GetAppValues("Preferences");
  SetRadioButton(document.all.stemming_option, values["StemmingOption"]);
  SetCheckBox(document.all.favorites_display, values["FavoritesDisplay"]);
  SetCheckBox(document.all.index_display, values["IndexDisplay"]);
  SetSpinBox(document.all.num_of_matches, values["NumOfMatches"]);
  SetRadioButton(document.all.results_view_option, values["ResultsViewOption"]);
  
  // if no index exists, gray out All Button
  // in Indexes to be Searched area
  if(GetNumOfIndexes() == 0)
    document.all.all_indexes_button.disabled = true;

  SetFieldEnableStates(document.all.field_list, values["ResultsViewOption"]);
  
  // set up spinning behavior of spinbox
  SetContinuousSpin(document.all.num_of_matches);
}

function OnSavePage()
{
  var values = new Array();
  values["StemmingOption"] = GetRadioButton(document.all.stemming_option);
  values["FavoritesDisplay"] = GetCheckBox(document.all.favorites_display);
  values["IndexDisplay"] = GetCheckBox(document.all.index_display);
  values["NumOfMatches"] = GetSpinBox(document.all.num_of_matches);
  values["ResultsViewOption"] = GetRadioButton(document.all.results_view_option);
  SetAppValues("Preferences", values);

  SetIndexSelections(GetCheckList(document.all.index_list));
  SetAppValues("Preferences/Fields", ToPrefFields(GetCheckList(document.all.field_list)));
}

function SetFieldEnableStates(check_list, view_option)
{
  var abs_field = ToLocField("Abstract");
  
  if(view_option == "summary")
  {
    var values = new Array();
	values[abs_field] = "false";	
    SetCheckListEnableStates(check_list, values);
	SetCheckListSelections(check_list, values);
  }
  else if(view_option == "detail")
  {
    var values = new Array();
	values[abs_field] = "true";	
    SetCheckListEnableStates(check_list, values);	
	//SetCheckListSelections(check_list, values);
  }
  else
    alert("SetFieldEnableStates : invalid view option specified.");
}
</script>

<script language="JavaScript" for="all_indexes_button" event="onclick()">
OnAllIndexesButtonClick();
</script>

<script language="JavaScript" for="all_fields_button" event="onclick()">
OnAllFieldsButtonClick();
</script>

<script language="JavaScript" for="results_view_option" event="onclick()">
OnResultsViewRadioClick();
</script>

<script language="JavaScript" for="field_list" event="onclick()">
OnFieldListClick();
</script>

<script language="JavaScript" for="window" event="onload()">
OnLoadPage();
</script>

<script language="JavaScript" for="save_button" event="onclick()">
OnSavePage();
window.location = "default.htm";
</script>

<script language="JavaScript" for="cancel_button" event="onclick()">
window.location = "default.htm";
</script>
<!-- #EndEditable --> 

<!-- #BeginEditable "Top%20Area" --><!-- #EndEditable -->

<table width="100%" border="0" cellspacing="1" cellpadding="1" bgcolor="#CCCCCC"  vspace="0" hspace="0" height="24">
  <tr> 
    <td width="6%">
	  <a id="home_link" href="default.htm">
	    <img src="Images/search_home.bmp" border="0"		  title="Zurck zu Suche" width="20" height="20"		  style="position:relative; top:2;" loc="title:id=IDS_BACK_TO_SEARCH_HOME"/> 
      </a>
	</td>
    <td> 
      <div id="page_title_area" align="center">
	  <!-- #BeginEditable "Title" -->
	  <b> <loc id="IDS_EDIT_PREFERENCES">Einstellungen</loc> </b><!-- #EndEditable -->
	  </div>
    </td>
    <td width="180"> 
      <div id="page_link_area" align="right">
	  <!-- #BeginEditable "Links" --><!-- #EndEditable -->
	  </div>
    </td>
  </tr>
</table>
<!-- #BeginEditable "Work%20Area" --> 
<blockquote> 
  <blockquote>
    <b><loc id="IDS_EDIT_SEARCH_OPTIONS">Suchoptionen</loc></b><br/><br/>
    <fieldset><legend><loc id="IDS_GROUP_FIND_MATCHES">Treffer suchen basierend auf</loc></legend> 
      <table width="100%" border="0" cellspacing="5" cellpadding="5">
        <tr> 
          <td width="50%"> 
            <div align="left"> 
              <input type="radio" name="stemming_option" value="off"/>
              <loc id="IDS_EXACT_WORD">Genaues Wort</loc></div>
          </td>
          <td width="50%"> 
            <input type="radio" name="stemming_option" value="on"/>
            <loc id="IDS_VARIATION_OF_WORD_ENDINGS">Variation von Wortendungen</loc></td>
        </tr>
      </table>
    </fieldset> <br/>
    <fieldset><legend><loc id="IDS_GROUP_SEARCHED_INDEXES">Zu suchende Indizes</loc></legend> 
      
    <table width="100%" border="0" cellspacing="5" cellpadding="5">
      <tr> 
        <td width="50%"><sds:checklist id="index_list" height="80" width="200" /></td>
        <td width="50%"> 
          <div align="center"> 
            <input type="button" name="all_indexes_button" value="Alle" loc="value:id=IDS_BUTTON_ALL"/>
          </div>
        </td>
      </tr>
    </table>
    </fieldset>
    <br/>
    <input type="checkbox" name="favorites_display" value="checkbox"/>
	<loc id="IDS_CHECK_DISPLAY_LIST">Liste der favorisierten Suchbegriffe im Suchbereich anzeigen.</loc>
	<br/>
    <input type="checkbox" name="index_display" value="checkbox"/>
	<loc id="IDS_CHECK_DISPLAY_INDEXES">Indizes anzeigen, die im Suchbereich gesucht werden sollen.</loc>
	<br/><br/>
    <loc id="IDS_EDIT_RETRIEVE_FIRST">Abruf der ersten</loc>  <sds:spinbox id="num_of_matches" minvalue="1" maxvalue="1000" size="6" />  <loc id="IDS_EDIT_MACHIES">  Treffer.</loc> </blockquote>
</blockquote>
<br/>
<blockquote>
  <blockquote>
    <b><loc id="IDS_EDIT_RESULT_OPTIONS">Ergebnisanzeige-Optionen</loc></b><br/><br/>
    <fieldset><legend><loc id="IDS_GROUP_FIRST_DISPLAY">Anzeige zuerst in der</loc></legend> 
      <table width="100%" border="0" cellspacing="5" cellpadding="5">
        <tr> 
          <td width="50%"> 
            <div align="left"> 
              <input type="radio" name="results_view_option" value="summary"/>
              <loc id="IDS_RADIO_SUMMARY_VIEW">Kurzbersicht</loc></div>
          </td>
          <td width="50%"> 
            <input type="radio" name="results_view_option" value="detail"/>
            <loc id="IDS_RADIO_DETAIL_VIEW">Detailansicht</loc> </td>
        </tr>
      </table>
      </fieldset> <br/>
      <fieldset><legend><loc id="IDS_GROUP_FIELDS">Anzuzeigende Felder</loc></legend> 
      <table width="100%" border="0" cellspacing="5" cellpadding="5">
        <tr> 
          <td width="50%">
		    <sds:checklist id="field_list" height="100" width="200" />
          </td>
          <td width="50%"> 
            <div align="center"> 
              <input type="button" name="all_fields_button" value="Alle" loc="value:id=IDS_BUTTON_ALL"/>
            </div>
          </td>
        </tr>
      </table>
    </fieldset></blockquote>
</blockquote>
<hr/>
<table width="100%" border="0" cellspacing="5" cellpadding="5">
  <tr> 
    <td width="47%"> 
      <div align="right"> 
        <input type="button" name="save_button" value="  Speichern  " loc="value:id=IDS_BUTTON_SAVE"/>
      </div>
    </td>
	<td width="6%">
	</td>
    <td width="47%"> 
      <div align="left"> 
        <input type="button" name="cancel_button" value="Abbrechen" loc="value:id=IDS_BUTTON_CANCEL"/>
      </div>
    </td>
  </tr>
</table>
<!-- #EndEditable -->

<!-- #BeginEditable "Page%20Script%20Bottom" --> 
<!-- #EndEditable --> 
</body>
<!-- #EndTemplate --></html>
