function valid()
{
     if(document.form1.pass.value=="amisim") 
      {
       document.all.pic5.src="pic5.jpg";
      
       }
      else
       {
        alert("wrong password");
        }
}


//searcher functions




j=0;
function  searcher(str)
 {
   var i=0,count=0;
  var temp,tname;
  
  var  friends=new Array("Puneeth","B","Joshi","George","Laxmikant","Kamath","Amit","Kumar","Sandesh","R.Nayak","Jayanth","S.R","Deepak","V.Bhat","Noorul","Hassan","Arvind","Upadhyaya","Sujith","Moily","Suresh","Chalamalsetty","Suresh","vallabeneni","Narendra","Babu","Binu","Krishnan","Melwin","Dsouza","Sumeet","Parikh","Kishan","V.K","Nandan","Shanbagh","Dheeraj","Castelino","Joseph","DSouza","Kiran","Poonja","Subba","Reddy","Keerthikar","Pandey","Chandu","Kuamar","Pravar","Sirivastava","Apratim","Sharma","Manu","Rao","Jeetendra","Sathpathy","Ananta","Prabhu","Bheemsen","Sedamkar","Ajith","Alva","Kiran","B","Kishan","B","Chandresh","Rao","Mohd","Inthiqab","Santosh","B.M","Sohan Shetty","Sushant Shetty","Sumant","Shetty","Prakash","Kumar","Avinash","Adappa","Hemant","Shet","Shailesh","Rao","Sandeep","Shetty","Prabodh","Pai","Devaraj","Kumar","Nagaraj","Kamath","Arun"," Baptist","Arun","Nair","Somnath","Jogi","Veda","Prakash","Om","Prasad","Rajesh","Muthu","Santosh","Joseph","Ashok","P","Manoj","M","Ulhas","K","Prashanth","K","Praveen","Kumar","Ashraf","Mohd","Mansoor","Mohd","Rana","George","Dona","George");
 var  place=new Array(1,3,3,3,3,3,3,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,4,4,4,4,4,2,2,2,2,2,5,5);

 var loc=new Array(" ","MANGALORE","SURATHKAL","MANIPAL","SCHOOL","Panambur");
if((str=="")||(str==" ")||(str=="  ")||(str=="   ")||(str=="    "))
{
document.bgColor="black";
alert("Please enter a name");
document.bgColor="ivory";
return true;
}
document.write("<table border=0 cellspacing=10 cellpadding=5>");
   for(i=0;i<friends.length;i++)
   {  
     
    if((friends[i].toLowerCase())==(str.toLowerCase()))
      {
        count++;
        
        document.fgColor="ivory";
        if(i%2==0)
        {
         
        document.write("<tr><td bgcolor=6699cc width=200 height=10 align=center>"+count+"   "+friends[i]+"   "+friends[i+1]+"</td>");   
        document.write("<td bgcolor=6699cc>"+loc[place[i/2]]+"</td></tr>");
  
         }
         else
           {
               
              document.write("<tr><td bgcolor=6699cc width=200 height=10 align=center>"+count+"   "+friends[i-1]+"   "+friends[i]+"</td>");   
              document.write("<td bgcolor=6699cc>"+loc[place[(i-1)/2]]+"</td></tr>");
            }
       }

    
   }
document.fgColor="ivory";
document.bgColor="ivory";
document.write("<tr><td bgcolor=6699cc width=500 height=10>"+"Search results :"+"  Found "+count);
document.write("</td></tr></table><br><table align=center><tr><td width=45 height=3 bgcolor=orange align=center><input type=button  value=back onclick=javascript:history.back()></td></tr></table>");
if(count!=0)
{
document.write("<br><font color=663300 size=3>You can now go back and choose a place from the drop down menu and find the person you are looking for.. </font>");
 }
else
{
document.write("<img src=help.gif>");
document.write("<br>"+"<font color=663300 size=2><U>TIPS</U>"); 
document.write("<br>"+"<font color=663300 size=2>Refine your search by changing the name of the person by a letter or two."); 
document.write("<br>Eg:  Maybe from Kishan to Kisan.</font>");
document.write("<br>"+"<font color=663300 size=2>Trying thier Surnames."); 
}
}

function sea(str)
{
document.write(str);
}
flag=1;

//help functions
 
function show_help()
{
if(flag==1)
{
var str="                            This is going to be a very simple searching  process\n                            Type in the person's name you're looking for and PRESS Find.\n                            Search Results will be displayed in another page.\n                            The FIRST, or LAST part of the name would give u results\n                            Eg: Mr. Bill Gates. Enter either Bill or Gates\n                            Eg: Simith N. Enter either Simith or N not both!\n                            Eg:Mohd. Aziz  use either Mohd (No full stop) or Aziz\n                            Search results would also show which page the particular person could be found!\n                      ";
document.all.help.innerText=str;
flag=0;
}
else
{
document.all.help.innerText=" ";
flag=1;
}
}

//for clear of password
function clear()
{
document.form1.pass.value=" ";
}




