function chkenter()
{
	if(event.keyCode==13)
	{
	window.alert('Click Go button');
	event.keyCode='';
	return false;
    }
return true;
}
title = new Object();// actual location or the item to be searched 
desc = new Object();// description of the location
exp = new Object();// explanation of the location
links= new Object();// actual link
matched= new Object();// percentage match found
keywords= new Object();// keywords as parsed from the input
found= new Object();
var temp=0;


title[0]=17 // # of titles present in the database

keywords[0]=0 //no of keywords after parsing

found[0]=0  //no of  matches found.


title[1]="IDRBT Certifying Authority CA INFINET SFMS RTGS CCA Controller of Certifying Authorities license licence certification services repository download resources"
desc[1]="Home"
exp[1]="IDRBT Certifying Authority will fulfill the need for trusted third party services in Electronic Commerce by issuing Digital Certificates that attests to some fact about the subject of the certificate, which provides independent confirmation of an attribute claimed by a person offering a Digital Signature."
links[1]="index.html"
matched[1]=0

title[2]="Corporate profile IDRBT CA Banking Technology RBI consultancy think tank"
desc[2]="Profile"
exp[2]="IDRBT was established by RBI in 1996 as an autonomous center for Development and Research in Banking Technology."
links[2]="aboutus.html"
matched[2]=0

title[3]="IDRBT CA offers various class certificates as products class 1 2 3 class1 class2 class3 signing encryption webserver web server object client"
desc[3]="Certificates"
exp[3]="IDRBT CA issue, administer and revoke the digital certificates which are trust worthy and legally valid under Information Technology Act 2000."
links[3]="product.html";
matched[3]=0

title[4]="idrbt ca contact details dhavale biju varghese rajesh mohanty"
desc[4]="Contact us"
exp[4]="Contact details of IDRBT Certifying Authority."
links[4]="contact.html"
matched[4]=0

title[5]="sitemap"
desc[5]="Sitemap"
exp[5]="Sitemap"
links[5]="sitemap.html"
matched[5]=0

title[6]="Certification Practice Statement IDRBT CA CPS certificate practise policy policies"
desc[6]="Policies"
exp[6]="IDRBT CA Certification Practice Statement (CPS) presents the practices in use by IDRBT CA and its Registration Authorities (RAs) taking part in the stipulation of IDRBT CA's Certification Services, in issuing and managing certificates and in sustaining a certificate-based Public Key Infrastructure (PKI)."
links[6]="cps.html"
matched[6]=0

title[7]="IDRBT CA Registration Authority RA authorities verification"
desc[7]="Registration Authority"
exp[7]="A Registration Authority (RA) is an office appointed by the IDRBT CA that collects and processes Digital Certificate requests and Certificate revocation/suspension requests."
links[7]="RA.html"
matched[7]=0

title[8]="Information Technology Act 2000 mit government CCA online"
desc[8]="IT Act 2000"
exp[8]="The passing of the Information Technology Act by the Indian Parliament and the consequent amendments to the Indian Evidence Act, etc. has now paved way for the legal recognition of transactions carried out by means of electronic commerce."
links[8]="itact.html"
matched[8]=0

title[9]="Digital certificate application form idrbt ca certification services certificate revocation list CRL certification practice statement CPS suspension subscriber agreement directory ldap user manual RTGS PDO NDS DN field procedure bank customer offline administrative charges monetary policy"
desc[9]="Repository"
exp[9]="IDRBT CA Certification services downloads and other related documents."
links[9]="repository.htm"
matched[9]=0

title[10]="Introduction Cryptography Digital Signatures trust Trusted Public Key Infrastructure PKI Understanding understand certificate Certificates Secure Sockets socket Layer SSL light weight access protocol LDAP Directory Services PKCS #11 Standard Protocols Interoperability Time Stamp specifications Status white paper technical document documents e-commerce web security e-mail email certifying authority ca internet article information"
desc[10]="Resources"
exp[10]="Guides, white papers, technical documents, and articles. Most of the following information is available in public domain."
links[10]="information.html"
matched[10]=0

title[11]="Glossary"
desc[11]="Glossary"
exp[11]="Glossary of items"
links[11]="glossary.html"
matched[11]=0

title[12]="private key expire expiry renewal revoke suspend activation suspension revocation keypair pair password public register online issuance time smart card smartcard token verification Controller of Certification Authorities CCA MIT Class 1, Class 2, Class 3 class1 class2 class3 Certificates IDRBT CA Digital Certificate 128 bit encryption secure secured site web"
desc[12]="FAQs"
exp[12]="Frequently asked questions about IDRBT CA certification services."
links[12]="faq.html"
matched[12]=0

title[13]="Legal Disclaimer"
desc[13]="Legal Disclaimer"
exp[13]="Legal Disclaimer of IDRBT CA"
links[13]="legal.html"
matched[13]=0

title[14]="Privacy Statement"
desc[14]="Privacy Policy"
exp[14]="Privacy policy of IDRBT CA website."
links[14]="privacy.html"
matched[14]=0

title[15]="Feedback"
desc[15]="Feedback"
exp[15]="Provide your valuable feedback"
links[15]="feedback.html"
matched[15]=0

title[16]="report reports ra expiry login digital certificate certificates"
desc[16]="Reports"
exp[16]="IDRBT CA Certification Services Report"
links[16]="CaReport/login.html"
matched[16]=0

title[17]="mca21 MCA21 MCA Ministry Company Affairs digital certificates superior authority forwarding"
desc[17]="MCA21"
exp[17]="Digital Certificates for MCA21"
links[17]="mca21.html"
matched[17]=0



function valid()
{
if(document.frm.keywords.value=='')
{
window.alert('Enter text to search');
document.frm.keywords.focus();
return false;
}
else
 search();
 return true;
 }

function search(){
// get the input from the input by the user and strip it into keywords //
var skeyword=document.frm.keywords.value.toLowerCase();
var check=1;
var pos=0;
var i=0;
var j=0;
var  itemp=0;
var config='';

while (true)
{
if (skeyword.indexOf("+") == -1 )
{
keywords[check]=skeyword;

break;
}
pos=skeyword.indexOf("+");
window.alert(pos);
if (skeyword !="+")
{
keywords[check]=skeyword.substring(0,pos);
check++;
}
else
{
check--;
break;
}
skeyword=skeyword.substring(pos+1, skeyword.length);
  if (skeyword.length ==0)
{
check--;
break;
}

}
// the keywords have been put in keywords object.
 keywords[0]=check;
//alert(check);
// matching and storing the matches in matched
for ( i=1; i<=keywords[0];i++)

{
for (j=1;j<=title[0];j++)

{
if (title[j].toLowerCase().indexOf(keywords[i]) > -1 )
{
matched[j]++;
}
}
}
// putting all the indexes of the matched records  in found

for (i=1;i<=title[0];i++)

{
if (matched[i] > 0 )
{
found[0]++;
// increment the found
found[found[0]]=i;
}
}
//alert("found 0 " +  found[0]);
// sort the list as per max percentage of matches


for (i=1;i<=found[0]-1;i++)
{
for(j=i+1;j<=found[0];j++)
{
if ( matched[found[i]]< matched[found[j]] )
{
temp= found[j];

found[j]=found[i];

found[i]=temp;

}
}
}

//config='width=600, height=300, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,target=frame3'
config='target=_parent'
output = window.open (" ","outputwindow",config);
output.document.write('<head>');
output.document.write('<title>Search Results for "');
for (i=1;  i<=keywords[0]; i++)
{
output.document.write( keywords[i]); }
output.document.write('"</title>');
output.document.write("<script LANGUAGE='javascript1.2' src=search.js type='text/javascript'></script><base target='frame3'>");
output.document.write('</head>');
output.document.write('<BODY text=#000000  link=blue vlink =blue ><font face=verdana>');

output.document.write('<center> <h2> Search Results </h2></center>');
//output.document.write('<hr>');
output.document.write(' The Keyword(s) you searched :: '.big() );
for (i=1;  i<=keywords[0]; i++)
{
output.document.write( keywords[i].bold() +"   "); }
output.document.write('<br>');

if (found[0]==0)
{
output.document.write('<hr>');
output.document.write("<b>No matches resulted in this search </b> <br>");
output.document.write("You may close the results and reduce the length/number  of the keywords  <br>");
}
else
{

//output.document.write(" <hr> ");
output.document.write(found[0] +"  entries  ".italics() + "found for your search<br>");
output.document.write(" <hr> ");
output.document.write("<table border=0 width=75%>");
for (i=1; i<=found[0];i++)

{
output.document.write("<tr><td valign=top >");
output.document.write("<font face=verdana size=2>" +i +".</font>"); 
output.document.write("<td valign=top align=justify><font face=verdana size=2>");
 itemp=found[i];
//output.document.write(desc[itemp].link(links[itemp]) +"<br>" +exp[itemp] +"<br><br>" +links[itemp]+"<br>");
output.document.write("<a href="+links[itemp]+" target=frame3 title='Link will open in the parent window'>"+desc[itemp]+"</a><br>" +exp[itemp] +"<br><br>" +links[itemp]+"<br>");

temp= (matched[itemp]/keywords[0])*100
output.document.write("<i> Matched  with keywords  :: "+temp+" %  </i>" );
matched[itemp]=0
//output.document.write("<hr>");
}
found[0]=0;
output.document.write("<br></font></table>");
}

output.document.write ("<br><br><hr><form name='frm'>");
output.document.write ("<font face=Verdana color=#4E79DE size=1>Search again</font> <font color=#000000>");
output.document.write ("<input type=text name=keywords size=12 onkeypress='chkenter()' style='color: #4E79DE; font-family: Verdana; border: 1 solid #4E79DE; height: 17' value='");
for (i=1;  i<=keywords[0]; i++)
{
output.document.write( keywords[i]); }
output.document.write ("'>");
output.document.write ("  <input type=button name=go onclick='valid()' value='Go>>' style='font-family: Verdana; font-size: 7pt; background-color: #FFFFFF; color: #4E79DE; border-style: solid; border-width: 1'></font>");
output.document.write ("  <input type='button' value='Close' onClick = 'self.close()' style='font-family: Verdana; font-size: 7pt; background-color: #FFFFFF; color: #4E79DE; border-style: solid; border-width: 1'>") ;
output.document.write ("</form>");
output.document.close();
}








function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

