<!--
// ==============================================================================
// File Name           : search_criteria_area.htm
// Description         : search_criteria_area Page
// Author(s)           : Baskaran V
// Date created        : 2009.01.05
// Last reviewed by    : 
// Last date of review : 
// Copyright           : (c) 2008, Sharp Software Development India Pvt Ltd., All rights reserved.
//                       All rights are reserved. Reproduction or transmission in whole or in part, in
//                       any form or by an means, electronic, mechanical or otherwise, is prohibited
//                       without the prior written consent of the copyright owner.

// ==============================================================================

-->
<html xmlns:sds="">
<head>
<title>Search Criteria Area</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<link rel="stylesheet" href="search.css"/>
<link href="style.css" rel="stylesheet" type="text/css" />
<script defer type="text/javascript" src="pngfix.js"></script>
<script type="text/javascript" src="Themes.js"></script>

<style>
@media all
{
  sds\:spinbox {behavior:url(spinbox.htc)}
  sds\:searchtext {behavior:url(searchtext.htc)}
}
</style>
</head>

<body  topMargin="0" leftMargin="0" class="Centerbg" >
<script language="JavaScript" src="search_errors.js"></script>
<script language="VBScript" src="vb_utils.js"></script>
<script language="JavaScript" src="ui_utils.js"></script>
<script language="JavaScript" src="external_io.js"></script>
<script language="JavaScript" src="spinbox.js"></script>
<script language="JavaScript" src="search_index.js"></script>
<script language="JavaScript" src="math_utils.js"></script>
<script language="JavaScript" src="io_utils.js"></script>

<script language="JavaScript">
// page visibility state variables
var index_visible = true;
var help_visible = false;
var help_preserve_visible = false;
var search_expanded = false;
var favorites_visible = true;
var tab_selected = "file_tab";
var mod_option = "none";
var mod_prev_option = "days";
var size_option = "none";
var current_focus = "search_text";
var MAX_INDEXES_DISPLAYED = 4;

var DAYS_IN_WEEK = 7;
var DAYS_IN_MONTHS = 30;
var PREV_DAYS_MIN = 1;
var PREV_DAYS_MAX = 65335;
var PREV_WEEKS_MIN = 1;
var PREV_WEEKS_MAX = Math.floor(PREV_DAYS_MAX / DAYS_IN_WEEK);
var PREV_MONTHS_MIN = 1;
var PREV_MONTHS_MAX = Math.floor(PREV_DAYS_MAX / DAYS_IN_MONTHS);

var SEARCH_TEXT_UPDATE_ITERATION = 20;
var SEARCH_TEXT_UPDATE_INTERVAL = 250;

// button label for expanded/contract button
var BASIC = /*IDS_BASIC*/"Grundlggande";
var ADVANCED = /*IDS_ADVANCED*/"Avancerat";

function ResizeArea()
{
  if(self == parent)
    return;

  var objs = parent.document.all;
  for(var i = 0; MATH_Lt(i, objs.length); i++)
  {
    if(objs[i].src == "search_criteria_area1.htm")
	{
	  objs[i].height = document.all.search_entry_area.offsetHeight;
	  break;
	}
  }
}

function DisplayFavoritesArea(visible)
{
  if(visible == false)
  {
    document.all.search_text.SetActive(true);
    document.all.favorites_button_area.style.display = "none";
  }
  else
  {
    document.all.search_text.SetActive(false);
	document.all.favorites_button_area.style.display = "";
  }
  
  ResizeArea();
}

function DisplayIndexArea(visible)
{
  if(visible == false)
  {
	document.all.index_area.style.display = "none";    
  }
  else
  {
    document.all.index_area.style.display = "";
	var indexes = GetSelectedIndexNames();
	var num_indexes = indexes.length;
	var indexes_str = NbspCh();
	var count = 0;
	
	if(num_indexes == 0)
	   indexes_str += /*IDS_NO_INDEX_SELECTED*/"Inget index har valts fr skning";
	else
	{
	  for(var index in indexes)
	  {
		indexes_str += indexes[index];
		count++;
		
		if(MATH_And(MATH_Lt(count, MAX_INDEXES_DISPLAYED), MATH_Lt(count, num_indexes)))
		  indexes_str += ", ";
		else
		{
		  if(MATH_Gt(num_indexes, count))
		    indexes_str += " ...";
		  break;
		}
	  }
	}
	
	var title_str = "";
	count = 0;
	
	for(var index in indexes)
	{
	  title_str += indexes[index];
	  count++;
	  
	  if(MATH_Lt(count, num_indexes))
	    title_str += "\n";
	}
	
	if(MATH_Gt(num_indexes, MAX_INDEXES_DISPLAYED))
	  document.all.index_table.title = title_str;
	else
	  document.all.index_table.title = "";
	document.all.index_table_entry.innerHTML = indexes_str;
  }
  
  ResizeArea();
}

function DisplayHelpArea(visible)
{
  if(visible == true)
  {
    document.all.help_button.src = "Images/help_on.png";
    document.all.help_button.title = "";
    document.all.help_table_area.style.display = "";
  }
  else
  {
    document.all.help_button.src = "Images/help_off.png";
    document.all.help_button.title = /*IDS_DISPLAY_QHELP*/"Visa Snabbhjlp";
    document.all.help_table_area.style.display = "none";
  }
  
  ResizeArea();
}

function DisplayExpandedArea(visible)
{
  if(visible == false)
  {
    document.all.expand_contract.value = BASIC;
	//document.all.expand_contract.src = "Images/Basic.png";
	document.all.expand_contract.title = /*IDS_M_SPECIFY_BASIC*/"Ange vanliga skvillkor";
    document.all.tab_stack.style.display="";
  }
  else
  {
    document.all.expand_contract.value = ADVANCED;
	//document.all.expand_contract.src = "Images/Advanced.png";
	document.all.expand_contract.title = /*IDS_M_SPECIFY_ADVANCED*/"Ange extra skvillkor";
    document.all.tab_stack.style.display="none";
	current_focus = "search_text";

	UpdateFocus();
  }
  
  ResizeArea();
}

function SetBasicAdvancedButtonSize()
{
  var button = document.all.expand_contract;
  button.value = BASIC;
  var bas_width = button.offsetWidth;
  button.value = ADVANCED;
  var adv_width = button.offsetWidth;
  
  if(MATH_Lt(bas_width, adv_width))
    button.width = adv_width;
  else
    button.width = bas_width;
}

function DisplayTabArea(tab)
{
  if(tab == "file_tab")
  {
    document.all.file_tab_img.src = "Images/file_tab_on.bmp";
    document.all.prop_tab_img.src = "Images/prop_tab_off.bmp";
    document.all.file_tab.style.display="";
    document.all.prop_tab.style.display="none";
  }
  else if(tab == "prop_tab")
  {
    document.all.file_tab_img.src = "Images/file_tab_off.bmp";
    document.all.prop_tab_img.src = "Images/prop_tab_on.bmp";
    document.all.file_tab.style.display="none";
    document.all.prop_tab.style.display="";
  }
  else
    //alert("Invalid tab id selected.");
	
  ResizeArea();
}

function OverTab(tab)
{
  if(MATH_And(tab_selected == "prop_tab", tab == "file_tab"))
    document.all.file_tab_img.src = "Images/file_tab_over.bmp";
  else if(MATH_And(tab_selected == "file_tab", tab == "prop_tab"))
    document.all.prop_tab_img.src = "Images/prop_tab_over.bmp";
}

function OutOfTab()
{
  DisplayTabArea(tab_selected);
}

function DisplayModArea(visible)
{
  if(visible == "none")
  {
    SetListBox(document.all.mod_option_list, visible);
    document.all.mod_date_range.style.display="none";
    document.all.mod_prev_range.style.display="none";
  }
  else if(visible == "between")
  {
    SetListBox(document.all.mod_option_list, visible);
    document.all.mod_date_range.style.display="";
    document.all.mod_prev_range.style.display="none";
  }
  else if(visible == "previous")
  {
    SetListBox(document.all.mod_option_list, visible);
    document.all.mod_date_range.style.display="none";
    document.all.mod_prev_range.style.display="";
	
	var prev_option = GetListBox(document.all.previous_option_list);
	UpdateModPrevArea(prev_option, false);
  }
  else
    alart("Invalid modification option value specified.");
}

function DisplaySizeArea(visible)
{
  if(visible == "none")
    document.all.size_option_area.style.display="none";
  else if(MATH_Or(visible == "at_least", visible == "at_most"))
    document.all.size_option_area.style.display="";
  else
    alert("Invalid size option value specified.");
}

function LoadAllCriteria()
{
	var values = GetValues("Criteria");
	SetSearchTextBox(document.all.search_text, values["SearchText"]);
	SetTextBox(document.all.file_name, values["FileName"]);
	SetTextBox(document.all.file_path, values["FilePath"]);
	SetListBox(document.all.file_type, values["FileType"]);
	SetListBox(document.all.mod_option_list, values["ModOption"]);
	SetDateBox(document.all.mod_start_date, values["ModStart"]);
	SetDateBox(document.all.mod_end_date, values["ModEnd"]);
	SetSpinBox(document.all.previous_num_of, values["ModPrevious"]);
	SetListBox(document.all.previous_option_list, values["ModPreviousOption"]);
	SetListBox(document.all.size_option_list, values["FileSizeOption"]);
	SetSpinBox(document.all.file_size, values["FileSize"]);
	SetTextBox(document.all.prop_title, values["Title"]);
	SetTextBox(document.all.prop_author, values["Author"]);
	SetTextBox(document.all.prop_subject, values["Subject"]);
	SetTextBox(document.all.prop_keyword, values["Keyword"]);
}

function SaveAllCriteria()
{
  // save all search criteria
  var values = new Array();
  values["SearchText"] = GetSearchTextBox(document.all.search_text);
  values["FileName"] = GetTextBox(document.all.file_name);
  values["FilePath"] = GetTextBox(document.all.file_path);
  values["FileType"] = GetListBox(document.all.file_type);
  values["ModOption"] = GetListBox(document.all.mod_option_list);
  values["ModStart"] = GetDateBox(document.all.mod_start_date);
  values["ModEnd"] = GetDateBox(document.all.mod_end_date);
  values["ModPrevious"] = GetSpinBox(document.all.previous_num_of);
  values["ModPreviousOption"] = GetListBox(document.all.previous_option_list);
  values["FileSizeOption"] = GetListBox(document.all.size_option_list);
  values["FileSize"] = GetSpinBox(document.all.file_size);
  values["Title"] = GetTextBox(document.all.prop_title);
  values["Author"] = GetTextBox(document.all.prop_author);
  values["Subject"] = GetTextBox(document.all.prop_subject);
  values["Keyword"] = GetTextBox(document.all.prop_keyword);
  SetValues("Criteria", values);
}

function ClearAllCriteria()
{
  SetSearchTextBox(document.all.search_text, "");
  SetTextBox(document.all.file_name, "");
  SetTextBox(document.all.file_path, "");
  SetListBox(document.all.file_type, "none");
  SetListBox(document.all.mod_option_list, "none");
  SetDateBox(document.all.mod_start_date, "");
  SetDateBox(document.all.mod_end_date, "");
  SetSpinBox(document.all.previous_num_of, "1");
  SetListBox(document.all.previous_option_list, "none");
  SetListBox(document.all.size_option_list, "none");
  SetSpinBox(document.all.file_size, "0");
  SetTextBox(document.all.prop_title, "");
  SetTextBox(document.all.prop_author, "");
  SetTextBox(document.all.prop_subject, "");
  SetTextBox(document.all.prop_keyword, "");
}

function ClearAdvancedCriteria()
{
  SetTextBox(document.all.file_name, "");
  SetTextBox(document.all.file_path, "");
  SetListBox(document.all.file_type, "none");
  SetListBox(document.all.mod_option_list, "none");
  SetDateBox(document.all.mod_start_date, "");
  SetDateBox(document.all.mod_end_date, "");
  SetSpinBox(document.all.previous_num_of, "1");
  SetListBox(document.all.previous_option_list, "none");
  SetListBox(document.all.size_option_list, "none");
  SetSpinBox(document.all.file_size, "0");
  SetTextBox(document.all.prop_title, "");
  SetTextBox(document.all.prop_author, "");
  SetTextBox(document.all.prop_subject, "");
  SetTextBox(document.all.prop_keyword, "");
}

function LoadAllUIStates()
{
  // set up visible areas
  var states = GetValues("UIStates");

  
  // only if search is executed from Find button,
  // preserve help table's open state
  if(GetBoolFromText(states["HelpPreserveVisible"]))
    help_visible = GetBoolFromText(states["HelpVisible"]);
  search_expanded = GetBoolFromText(states["ExpandedVisible"]);
  tab_selected = states["TabSelected"];
  mod_option = states["ModSelected"];
  size_option = states["SizeSelected"];
  current_focus = states["CurrentFocus"];
  
  var favorites_state = GetAppValue("Preferences", "FavoritesDisplay");
  favorites_visible = GetBoolFromText(favorites_state);
  var index_state = GetAppValue("Preferences", "IndexDisplay");
  index_visible = GetBoolFromText(index_state);
}

function SaveAllUIStates()
{
  var states = new Array();
  states["HelpVisible"] = GetTextFromBool(help_visible);
  states["HelpPreserveVisible"] = GetTextFromBool(help_preserve_visible);
  states["ExpandedVisible"] = GetTextFromBool(search_expanded);
  states["TabSelected"] = tab_selected;
  states["ModSelected"] = mod_option;
  states["SizeSelected"] = size_option;
  states["CurrentFocus"] = current_focus;
  SetValues("UIStates", states);
  
  var index_state = GetTextFromBool(index_visible);
  SetAppValue("Preferences", "IndexDisplay", index_state);
}

function FindDocuments()
{	
  // if no index database exists or selected,
  // display warning and cancel searching
  //alert("Searching..");
  if(GetNumOfSelectedIndexes() == 0)
  {
    DisplayNoIndex();
	return;
  }
    
  SaveAllCriteria();
  SaveAllUIStates();
  
  // set the flag to indicate this is a new search
  // as opposed to refreshing current search
  SetValue("Results", "NewSearch", "true");

  //fix for bug #2078-amar
  var view_format_pref = GetAppValue("Preferences", "ResultsViewOption");
  if(view_format_pref == "detail") {
	SetValue("Results", "ViewFormat", "detail");
  }
  else {
	SetValue("Results", "ViewFormat", "summary");
  }
  
  // go to results page to execute search and display results
  // Note: temporary case of self==parent
  // (if this is top-level window...)
  if(self == parent)
    location.href = "search_results.htm";
  else
    parent.location.href = "search_results.htm";
}

function DisplayNoIndex()
{
   alert(/*IDS_E_NOINDEX1*/"Ingen indexdatabas existerar eller har valts fr skning.\n" +
    /*IDS_E_NOINDEX2*/"Du mste skapa ett innan du kan ska igenom dokument.");
}

function ClearExternalArea()
{
  if(self == parent)
    return;

  // only if search results page is currently
  // displayed, clear results area
  if(parent.document.title == "Search Results")
    parent.ClearResults();
}

function ClearSearch()
{
  ClearAllCriteria();
  SaveAllCriteria();
  
  mod_option = "none";
  size_option = "none";
  current_focus = "search_text";
  
  DisplayModArea(mod_option);
  DisplaySizeArea(size_option);
  
  ClearExternalArea();
  UpdateFocus();
}

// setup external element which list part of search text is
// contained.  Since it must relies on parent window, if it
// fails the first time (in case that object does not exist yet),
// try again SEARCH_TEXT_UPDATE_INTERVAL later.
function SetSearchTextDisplay(count)
{
  if(count == 0)
	return;
	
  try
  {
    count--;
    var context_element = parent.document.all.page_title_area;
    document.all.search_text.SetDisplayContext(context_element);
  }
  catch(e)
  {
    setTimeout("SetSearchTextDisplay(" + count + ")", SEARCH_TEXT_UPDATE_INTERVAL);
  }
}

function OnLoadPage()
{
  // set up spinning behavior
  SetContinuousSpin(document.all.previous_num_of);
  SetContinuousSpin(document.all.file_size);

  // container element in which list of favorites is dynamically
  // displayed must be specified
  SetSearchTextDisplay(SEARCH_TEXT_UPDATE_ITERATION);
  //var context_element = parent.document.all.page_title_area;
  //document.all.search_text.SetDisplayContext(context_element);

  // load all possible file types for selection
  var types = GetFileTypes();
  for(type in types)
  {
    var value = GetValue("Criteria/Types", types[type]);
    var item_text = types[type] + " (" + value + ")";   
    AddListItem(document.all.file_type, item_text, types[type]);
  }
  
  SetBasicAdvancedButtonSize();

  //Bug # 2627 - Repeated click on search results in error message. Refer to tracker for further details.
  //Date : 9th October 2003 - By Poojari
  try
  {
	LoadAllCriteria();
  }
  catch(e)
  {
	SetSearchTextBox(document.all.search_text, "");
	SetTextBox(document.all.file_name, "");
	SetTextBox(document.all.file_path, "");
  }
  //End Modification

  //LoadAllUIStates();  
  UpdateDisplayAreas();
  UpdateFocus();
  
  ResizeArea();  
}

function OnUnloadPage()
{
  SaveAllCriteria();
  SaveAllUIStates();
}

function UpdateDisplayAreas()
{
  mod_option = GetListBox(document.all.mod_option_list);
  DisplayModArea(mod_option);
  size_option = GetListBox(document.all.size_option_list);
  DisplaySizeArea(size_option);

  DisplayFavoritesArea(favorites_visible);
  DisplayIndexArea(index_visible);
  DisplayHelpArea(help_visible);
  DisplayExpandedArea(search_expanded);
  DisplayTabArea(tab_selected);
  DisplayModArea(mod_option);
  DisplaySizeArea(size_option);
}
function OnEnterKeyPressed()
{
  // When Enter key is pressed, Find button get focus,
  // and consequently, FindDocuments() is called
  if(event.keyCode == 13)
  {
    document.all.find_button.focus();
	current_focus = event.srcElement.name;	
  }
}

// method only for search text component is needed here
// because search text behaves slightly differently
// from others
function OnSearchTextEnterKeyPressed()
{
  // Assuming Enter key is pressed,
  // Keep focus in search text box 
  document.all.search_text.focus();
  current_focus = event.srcElement.id;
  
  // initiate search
  FindDocuments();
}

function UpdateFocus()
{
  var obj_to_focus = document.all.item(current_focus);
  
  // sanity check of currently focused object
  if(obj_to_focus == null)
    return;

  // only if currently focused object is visible,
  // regain focus
  if(obj_to_focus.style.display == "")
    obj_to_focus.focus();
}

function UpdateModPrevArea(previous_option, is_changed)
{
  var prev_box = document.all.previous_num_of;
  var value = GetSpinBox(prev_box);
  var min_value;
  var max_value;

  switch(previous_option)
  {
    case "days":
	  min_value = PREV_DAYS_MIN;
	  max_value = PREV_DAYS_MAX;
	  break;
	case "weeks":
	  min_value = PREV_WEEKS_MIN;
	  max_value = PREV_WEEKS_MAX;
	  break;
	case "months":
	  min_value = PREV_MONTHS_MIN;
	  max_value = PREV_MONTHS_MAX;
	  break;
	default:
	  alert("UpdateModPrevArea: invalid previous option selected.");
	  break;
  }
  
  // only when previous option selection is changed
  // update content of spinbox to min_value (= 1)
  if(is_changed)
    SetSpinBox(prev_box, min_value);
	
  prev_box.minvalue = min_value;
  prev_box.maxvalue = max_value;
}

function CheckPrevNumInRange(previous_value)
{
  var prev_box = document.all.previous_num_of;
  var value = GetSpinBox(prev_box);
  if(MATH_Or(MATH_Lt(value, prev_box.minvalue), MATH_Gt(value, prev_box.maxvalue)))
    SetSpinBox(document.all.previous_num_of, previous_value);
}

function CloseFavoritesList()
{
  if(!document.all.search_text.contains(event.srcElement))
    document.all.search_text.CloseFavoritesListDisplay();
}

function ClearAllSelections()
{
  // only when this window is located in Search Results Page,
  // clear all thumbnail or icon selections
  if(self != parent)
  {
    var file_name = GetFileNameFromURL(parent.location.toString());
	if(file_name == "search_results.htm")
	  parent.DeselectAllViews();
  }
}
</script>

<!-- top level event capture scripts for all elements in this template page -->

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

<script language="JavaScript" for="window" event="onunload()">
OnUnloadPage();
</script>

<script language="JavaScript" for="window" event="onresize()">
ResizeArea();
</script>

<script language="JavaScript" for="document" event="onclick()">
CloseFavoritesList();
ClearAllSelections();
</script>

<script language="JavaScript" for="help_button" event="onclick()">
help_visible = !help_visible;
DisplayHelpArea(help_visible);
</script>

<script language="JavaScript" for="help_button" event="onkeypress()">
help_visible = !help_visible;
DisplayHelpArea(help_visible);
</script>

<script language="JavaScript" for="search_text" event="onsearchkeydown()">
OnSearchTextEnterKeyPressed();
</script>


<script language="JavaScript" for="file_name" event="onkeydown()">
OnEnterKeyPressed();
</script>

<script language="JavaScript" for="file_path" event="onkeydown()">
OnEnterKeyPressed();
</script>

<script language="JavaScript" for="prop_title" event="onkeydown()">
OnEnterKeyPressed();
</script>

<script language="JavaScript" for="prop_author" event="onkeydown()">
OnEnterKeyPressed();
</script>

<script language="JavaScript" for="prop_subject" event="onkeydown()">
OnEnterKeyPressed();
</script>

<script language="JavaScript" for="prop_keyword" event="onkeydown()">
OnEnterKeyPressed();
</script>

<script language="JavaScript" for="find_button" event="onclick()">
help_preserve_visible = true;
FindDocuments();
</script>

<script language="JavaScript" for="new_search" event="onclick()">
// clear all search criteria fields
ClearSearch();
</script>

<script language="JavaScript" for="expand_contract" event="onclick()">
search_expanded = !search_expanded;
// clear all data in tab stacks when it is closed
if(!search_expanded)
  ClearAdvancedCriteria();
UpdateDisplayAreas();
</script>

<script language="JavaScript" for="file_tab_img" event="onclick()">
tab_selected = "file_tab";
DisplayTabArea(tab_selected);
</script>

<script language="JavaScript" for="file_tab_img" event="onkeypress()">
tab_selected = "file_tab";
DisplayTabArea(tab_selected);
</script>

<script language="JavaScript" for="file_tab_img" event="onmouseover()">
OverTab("file_tab");
</script>

<script language="JavaScript" for="file_tab_img" event="onmouseout()">
OutOfTab();
</script>

<script language="JavaScript" for="prop_tab_img" event="onclick()">
tab_selected = "prop_tab";
DisplayTabArea(tab_selected);
</script>

<script language="JavaScript" for="prop_tab_img" event="onkeypress()">
tab_selected = "prop_tab";
DisplayTabArea(tab_selected);
</script>

<script language="JavaScript" for="prop_tab_img" event="onmouseover()">
OverTab("prop_tab");
</script>

<script language="JavaScript" for="prop_tab_img" event="onmouseout()">
OutOfTab();
</script>

<script language="JavaScript" for="previous_option_list" event="onchange()">
mod_prev_option = GetListBox(document.all.previous_option_list);
UpdateModPrevArea(mod_prev_option, true);
</script>

<script language="JavaScript" for="previous_num_of" event="onkeypress()">
value = GetSpinBox(document.all.previous_num_of);
setTimeout("CheckPrevNumInRange('" + value + "')", 10);
</script>

<script language="JavaScript" for="mod_option_list" event="onchange()">
mod_option = GetListBox(document.all.mod_option_list);
DisplayModArea(mod_option);
</script>

<script language="JavaScript" for="size_option_list" event="onchange()">
size_option = GetListBox(document.all.size_option_list);
DisplaySizeArea(size_option);
</script>

<script language="JavaScript" for="browse_button" event="onclick()">
// display dialog in which path to the index file is specified
var path = ShowDialog("folder_selection_dialog.htm",
                      GetTextBox(document.all.file_path),
					  "help:no; status:no;");

// update path selection only when valid path is selected
if(path != "")
  SetTextBox(document.all.file_path, path);
</script>

<script language="JavaScript" for="favorites_button" event="onclick()">
var max_length = document.all.search_text.maxlength;
var current_text = GetSearchTextBox(document.all.search_text);
var args = max_length + "," + current_text;
ShowDialog("favorites_dialog.htm", args, "help:no; status:no;");
</script>
<table width="100%" height="65" cellpadding="0" cellspacing="0" >
<tr>
<td class="Default_top" valign="middle">
<div id="search_entry_area" style="overflow:hidden;" >
<table width="100%" border="0" cellpadding="0" cellspacing="0" height="53">
  
  <tr>
    <td width="7%" height="25" align="right" valign="middle">
		<img src="Images/help_off.bmp" tabindex="0" name="help_button" width="32" height="32" title="Display Quick Help"/>	</td>
	<td width="11%" align="right" valign="middle">	
		<b title="Sk efter filer som innehller fljande text" loc="title:id=IDS_M_SPECIFY_TEXT"><loc id="IDS_SEARCH_FOR">Sk efter:</loc></b> </td>
	<td width="82%" align="left" valign="middle" >	
<!--
<input type="text" name="search_text" size="35"/>
-->
<sds:searchtext id="search_text" size="35" maxlength="127" title="Skriv in ett ord, flera ord eller ord som separeras med 'and', 'or' ... Se ? fr detaljer." loc="title:id=IDS_M_ENTER_ONE_WORD"/>&#160;
&nbsp; <input type="button" class="button_style" name="find_button" value="Sk" title="Sk igenom dokument" loc="value:id=IDS_FIND;title:id=IDS_FIND_NOTE"/>
&nbsp; <input type="button" class="button_style" name="new_search" value="Radera" title="Radera aktuell skning" loc="value:id=IDS_CLEAR;title:id=IDS_CLEAR_NOTE"/>
&nbsp; <input type="button" class="button_style1" name="expand_contract" title=""/>



</td>
  </tr>
  <tr>
    <td height="1" colspan="3" align="right" valign="middle" class="bgcolor_3"></td>
    </tr>
</table>


<div id="index_area"  style="vertical-align:top; height:30px" >
 
 
  <table id="index_table" border="0" width="100%" cellspacing="0" cellpadding="0" height="37"  class="bggreendiag"  >
	<tr>
	  <td width="30%" height="35" align="center" valign="middle" class="whitefont">
	  <table cellpadding="0" cellspacing="0" width="90%" height="25" align="right"  border="0"  vspace="5" class="tablebroder" >
	  <tr>
	  		<td bgcolor="#ffffff" align="center" class="whitefont" ><loc id="IDS_INDEXES_SEARCHED">Index som sks igenom</loc></td>
	  </tr>
	  </table>	  </td>
	  <td width="1%"> <img src="Images/leftarrow.png" ></td>
	  <td id="index_table_entry" width="69%" class="whitefont"></td>
	</tr>
	<tr>
	  <td height="1" colspan="3" class="bgcolor_3"></td>
	 </tr>

  </table>
 
</div>
<!-- Frame wold-->
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
  <tr>
    <td align="left" ><iframe name="help_table_area" src="search_criteria_help_area.htm" frameborder="no" scrolling="no" width="100%"></iframe>
	</td>
  </tr>
</table>


<div id="tab_stack" style="display:none;" title="">
  <table cellspacing="0" cellpadding="0" width="100%" align="left" border="0" class="bgcolor_1">
    <tr bgcolor="#FFFFFF"> 
      <td width="18%" height="9"><img name="file_tab_img" tabindex="0" src="Images/file_tab_on.bmp" width="140" height="16" loc="width:id=ID_TAB1_WIDTH"/></td>
      <td width="10%" height="9"><img name="prop_tab_img" tabindex="0" src="Images/prop_tab_off.bmp" width="140" height="16" loc="width:id=ID_TAB2_WIDTH"/></td>
      <td width="72%" height="9"></td>
    </tr>
    <tr> 
      <td colspan="3" align="left"> 
        <div id="file_tab"> 
          <table border="0" width="100%" cellpadding="0" cellspacing="0"  class="bgcolor_1"  height="25">
            <tr> 
              <td valign="top" width="14%"> 
                <div align="left"></div>
              </td>
              <td height="2" valign="baseline" width="2%">&#160; </td>
              <td height="2" valign="baseline" width="84%">&#160; </td>
            </tr>
            <tr> 
              <td width="14%" valign="middle" height="30" > 
                <div align="right"><loc id="IDS_NAME">Namn:</loc></div>
              </td>
              <td width="2%" valign="middle"> </td>
              <td width="84%" valign="middle" > 
                <input type="text" name="file_name" size="50" maxlength ="256" title="Ange filnamnsattribut (jokertecken stds)" loc="title:id=IDS_SPECIFY_FILENAME_ATTRIBUTES;size:id=ID_SIZE_ATTRIBUTES"/>
              </td>
            </tr>
            <tr> 
              <td  width="14%" valign="middle" height="30"> 
                <div align="right"><loc id="IDS_PATH">Skvg:</loc></div>
              </td>
              <td  width="2%" valign="middle">&#160; </td>
              <td width="84%" valign="middle" > 
                <input type="text" name="file_path" size="50" maxlength ="260" title="Ange fil skvg" loc="title:id=IDS_SPECIFY_FILE_PATHS;size:id=ID_SIZE_PATHS"/>
                <input type="button" name="browse_button" class="button_style" value="Blddra..." title="Blddra till skvgen" loc="value:id=IDS_BROWSE;title:id=IDS_BROWSE_TO_PATH"/>
              </td>
            </tr>
            <tr> 
              <td width="14%" valign="middle" height="30"> 
                <div align="right"><loc id="IDS_TYPE">Typ:</loc></div>
              </td>
              <td  width="2%" valign="middle"> 
                <div align="left"></div>
              </td>
              <td width="84%" valign="middle"> 
                <select name="file_type" size="1">
                  <option value="none"></option>
                </select>
              </td>
            </tr>
            <tr> 
              <td width="14%" height="30" > 
               <div align="right"><loc id="IDS_MODIFIED">ndrad:</loc></div>
              </td>
              <td width="2%" >&#160;</td>
              <td width="84%" > 
                <table width="100%" cellpadding="0" cellspacing="0" class="bgcolor_1" >
                  <tr> 
                    <td width="14%"> 
                      <select name="mod_option_list" size="1">
                        <option value="none"></option>
                        <option value="between">between</option>
                        <option value="previous">during the previous</option>
                      </select>
                    </td>
                    <td width="86%">
                      <div id="mod_date_range">
					    &#160;
					    <object id="mod_start_date" class="date_entry" classid="clsid:D58612F4-2E23-4810-852F-745FBAA95D7A">
                          <param name="DTFLAG" value="1"/>
                        </object>
						&#160;and&#160;
						<object id="mod_end_date" class="date_entry" classid="clsid:D58612F4-2E23-4810-852F-745FBAA95D7A">
                          <param name="DTFLAG" value="1"/>
                        </object>
                      </div>
                      <div id="mod_prev_range">
					    &#160;
                        <sds:spinbox id="previous_num_of" size="4" />                       
						<select name="previous_option_list">
                          <option value="days"><loc id="IDS_DAYS">dagarna</loc></option>
                          <option value="weeks"><loc id="IDS_WEEKS">veckor</loc></option>
                          <option value="months"><loc id="IDS_MONTHS">mnad/mnader</loc></option>
                        </select>
                      </div>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
            <tr> 
              <td width="14%" height="30" > 
                  <div align="right"><loc id="IDS_SIZE">Storlek:</loc></div>
              </td>
              <td width="2%" ></td>
              <td width="84%" > 
                <table width="100%" cellpadding="0" cellspacing="0">
                  <tr> 
                    <td width="12%"> 
                      <select name="size_option_list" size="1">
                        <option value="none"></option>
                        <option value="at_least"><loc id="IDS_AT_LEAST">minst</loc></option>
                        <option value="at_most"><loc id="IDS_AT_MOST">hgst</loc></option>
                      </select>
                    </td>
                    <td width="88%">
                    <div id="size_option_area">
                      &#160;
					    <sds:spinbox id="file_size" size="6" />
                       <loc id="IDS_SIZE_KB">KB</loc>
                    </div></td>
                  </tr>
                </table>
              </td>
            </tr>
			<tr> 
              <td width="14%" valign="middle" height="10"></td>
              <td  width="2%" valign="middle"></td>
              <td width="84%" valign="middle"></td>
            </tr>
          </table>          
        </div>
        <div id="prop_tab"> 
          <table width="100%" border="0" cellpadding="0" cellspacing="0"  class="bgcolor_1" height="25">
            <tr> 
              <td width="14%">&#160;</td>
              <td width="2%">&#160;</td>
              <td width="84%">&#160;</td>
            </tr>
            <tr valign="middle"> 
              <td width="14%" height="30"> 
               <div align="right"><loc id="IDS_TITLE">Titel:</loc></div>
              </td>
              <td width="2%">&#160;</td>
              <td width="84%"> 
                 <input type="text" name="prop_title" size="50" maxlength ="1024" title="Ange dokumenttitel" loc="title:id=IDS_SPECIFY_DOCUMENT_TITLE"/>

              </td>
            </tr>
            <tr valign="middle"> 
              <td width="14%" height="30"> 
                 <div align="right"><loc id="IDS_AUTHOR">Frfattare:</loc></div>
              </td>
              <td width="2%">&#160;</td>
              <td width="84%"> 
               <input type="text" name="prop_author" size="50" maxlength ="1024" title="Ange dokumentfrfattare" loc="title:id=IDS_SPECIFY_DOCUMENT_AUTHOR"/>
              </td>
            </tr>
            <tr valign="middle"> 
              <td width="14%" height="30"> 
               <div align="right"><loc id="IDS_SUBJECT">mne:</loc></div>
              </td>
              <td width="2%">&#160;</td>
              <td width="84%"> 
               <input type="text" name="prop_subject" size="50" maxlength ="1024" title="Ange dokumentmne" loc="title:id=IDS_SPECIFY_DOCUMENT_SUBJECT"/>
              </td>
            </tr>
            <tr  valign="middle" > 
              <td width="14%" height="32" height="30"> 
                 <div align="right"><loc id="IDS_KEYWORD">Nyckelord:</loc></div>
              </td>
              <td width="2%" height="32">&#160;</td>
              <td width="84%" height="32"> 
               <input type="text" name="prop_keyword" size="50" maxlength ="1024" title="Ange nyckelord i dokumentet/dokumenten" loc="title:id=IDS_SPECIFY_KEYWORDS_IN_THE_DOCUMENT"/>
              </td>
            </tr>
            
			<tr> 
              <td width="14%" height="40"></td>
              <td width="2%"></td>
              <td width="84%"></td>
            </tr>
          </table>
        </div>
   					<div id="favorites_button_area" style="display:none;">
				    <br style="font:4;"/>&nbsp;&nbsp;&nbsp;
				    <input type="button" name="favorites_button" class="button_style" value="Favoriter..." title="Visa favoritlista" 
					loc="value:id=IDS_FAVORITES;title:id=IDS_IDS_FAVORITES_NOTE"/>
				    &#160;&#160;&#160;<loc id="IDS_FAVORITES_NOTE2">Se, lgga till och ta bort favoritskuttryck</loc>  
					</div><br><br>
    </tr>
  </table>
</div>
</div>
</td>
</tr>
</table>
</body>
</html>
