<!--
// ==============================================================================
// File Name           : search_session_init.htm 
// Description         : Search Session Initialization 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 Session Initialization Page</title>
	<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>
	<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> 

</head>

<body leftmargin="0" topmargin="0" class="Centerbg" onLoad="javascript:InitializeSearch()">
<script language="JavaScript" src="default_data.js"></script>
<script language="JavaScript" src="search_index.js"></script>

<script language="JavaScript">
function VerifyIndexes()
{
  var indexes = GetIndexNames();
  for(var i = 0; MATH_Lt(i, indexes.length); i++)
  {
    if(!VerifyIndex(indexes[i]))
    {
      alert("Index Database '" + indexes[i] +
	    "' is either removed from original directory or corrupted.\n" +
	    "Therefore, all data for this Index Database will be cleared.");
	  DeleteIndex(indexes[i]);
    } 
  }
}

function InitializeSearch()
{
    if(!GetSessionState())
    {
      SetSessionDefaults();
      SetSessionState(true);
      
      VerifyIndexes();

    }

    // destination page must be appended to the location of
    // this page when this page is loaded
    var destination_page = unescape(location.search.substring(1));

    // load the page specified
    //alert(destination_page)
    //location = destination_page
    document.location = destination_page.replace("&", "?");

}
</script>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr></tr>
  <tr>
    <td height="1" align="left" valign="top"  class="bgcolor_2"></td>
  </tr>
  <tr>
    <td height="53" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="Default_top" height="53">
  <tr> 
    <td width="6%" align="center">
    <!--<img src="Images/search.gif" border="0" />-->
	<a id="home_link" onClick="GoToPage('default')" class="Normaltext">
	 <img src="Images/search.gif" border="0" title="Back to Search Home" width="32" height="32" style="position:relative; top:2;"/>
	 
	 </a></td>
    <td class="Titlewizard" align="center"><div id="page_title_area" align="center"><b>Search Session Initialization </b></div></td>
    <td width="180"><div id="page_link_area" align="right"></div></td>
  </tr>
</table>
</td>
  </tr>
  <tr>
    <td height="56" align="left" valign="top">&nbsp; </td>
  </tr>
</table>
</body>
</html>
