//   www.ecosight.org
//  common javascript coding for the website
// copy right is belonging to ecosight and respective owners


// <-----------INITIALIZE BEGINS----------

var ecosightuser=GetCookie("ecosightuser");
var loginname=GetCookie("loginname");
var password=GetCookie("password");
var flag=GetCookie("flag"); 
var loginurl=GetCookie("loginurl"); 
var searchword=GetCookie("searchword"); 
var diagram=GetCookie("diagram"); 

function initialize()
{
if(!GetCookie("loginname")) 
{
loginname=SetCookie("loginname","MEMBER",exp);
loginname=GetCookie("loginname");
}

if(!GetCookie("password")) 
{
password=SetCookie("password","PASSWORD",exp);
password=GetCookie("password");
}

if(!GetCookie("ecosightuser")) 
{ecosightuser=SetCookie("ecosightuser","NEW USER",exp);
ecosightuser=GetCookie("ecosightuser");
}

if(!GetCookie("searchword")) 
{ecosightuser=SetCookie("searchword","ecosight",exp);
ecosightuser=GetCookie("searchword");
}

if(!GetCookie("diagram")) 
{ecosightuser=SetCookie("diagram","cosmicpentacle",exp);
ecosightuser=GetCookie("diagram");
}
if(!GetCookie("loginurl")) 
loginurl=SetCookie("loginurl","index.htm",exp);

flag=SetCookie("flag",0,exp);
SetCookie('ebegdemovar',0,exp);
}
// -----------INITIALIZE ENDS---------->


function nam_pw(user,login,pass,fl)
{
SetCookie("ecosightuser",user,exp);
SetCookie("loginname",login,exp);
SetCookie("password",pass,exp);
SetCookie("flag",fl,exp);
}


// <-----------OPENCOOKIE BEGINS----------
function welcome()
{
if(opencount==1)
window.open('welcome.htm', '', 'status,width=250,height=250');
}
// -----------OPENCOOKIE ENDS---------->

function diagramshow()
{

dw=window.open('diagramshow.htm#Maximize', 'diagramwindow', 'status=0, toolbar=0,location=0,menubar=0,resizable=1,width=60,height=115');
}



var opencount=amt();

// <-----------VIEWTIMER BEGINS----------
function viewtimes()
{
document.write(opencount);
}
// -----------VIEWTIMER ENDS---------->

//<------------Navigation rollover--------
function NavIn(menItem) {
	menItem.style.borderColor='#000000'; 
	menItem.style.backgroundColor='#D08c40';
}

function NavOut(menItem) {
	menItem.style.borderColor='#000000'; 
	menItem.style.backgroundColor='#E8C8A0';
}


//------------Navigation rollover-------->




// <-----------COOKIE BEGINS---------->
function GetCookie (name) {  
var arg = name + "=";  
var alen = arg.length;  
var clen = document.cookie.length;  
var i = 0;  
while (i < clen) {
var j = i + alen;    
if (document.cookie.substring(i, j) == arg)      
return getCookieVal (j);    
i = document.cookie.indexOf(" ", i) + 1;    
if (i == 0) break;   
}  
return null;
}


function SetCookie (name, value) 
{  
var argv = SetCookie.arguments;  
var argc = SetCookie.arguments.length;  
var expires = (argc > 2) ? argv[2] : null;  
var path = (argc > 3) ? argv[3] : null;  
var domain = (argc > 4) ? argv[4] : null;  
var secure = (argc > 5) ? argv[5] : false;  
document.cookie = name + "=" + escape (value) + 
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
((path == null) ? "" : ("; path=" + path)) +  
((domain == null) ? "" : ("; domain=" + domain)) +    
((secure == true) ? "; secure" : "");
}


function DeleteCookie (name) 
{  
var exp = new Date();  
exp.setTime (exp.getTime() - 1);   
var cval = GetCookie (name);  
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

var expDays = 1;
var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));


function amt(){
var count = GetCookie('count')
if(count == null) {
SetCookie('count','2')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
   }
}


function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

// -----------COOKIE ENDS---------->



// <-----------PRINT PAGE PROGRAMME BEGINS----------
function printpage()
{
window.print();
}
// -----------PRINT PAGE PROGRAMME ENDS---------->















// <-----------SCREEN RESOLUTION ALEART PROGRAMME BEGINS----------
function scr_resol_aleart()
{
sw=screen.width;
sh=screen.height;
if(sw!=800 || sh!=600)
alert('The screen area of the computer you use is:\n\n' + sw + ' pixels by ' + sh + ' pixels.\n\n Change to 800 pixels  by 600 pixels  \n\n for the better perfomance of\n\n http://www.ecosight.org');
}
// -----------SCREEN RESOLUTION ALEART PROGRAMME ENDS---------->














// <-----------MEMBERS LOGIN PROGRAMME BEGINS----------
memlogin_no=10;
memlogin_a=0;
memlogin_b=0;
memlogin_c=0;
var memlogin_pass=new Array()
var memlogin_user=new Array()

memlogin_ue="hspsjmvssreaooieiraamnnonmsejjatnrsbieae~hia~etkne~o~j~rou~v~s~~~~rm~~~h~~~~~a~~~~~~~~~r~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
memlogin_pd="atammptksmchlaerraaatutreealjmumhumlnaapabitpusmkulenhascoalilaonoenmlziararne~ienyal~dt~~ra~~~~~e~~~u~~~~~n~~~e~~~~~~~~"
for(memlogin_a=0;memlogin_a<memlogin_no;memlogin_a++)
{
memlogin_user[memlogin_a]="";
memlogin_pass[memlogin_a]="";
}
for(memlogin_b=0;memlogin_b<12;memlogin_b++)
	{
	for(memlogin_a=0;memlogin_a<memlogin_no;memlogin_a++)
	{
		if(memlogin_ue.charAt(memlogin_c)!='~')
  		 memlogin_user[memlogin_a]=memlogin_user[memlogin_a]+memlogin_ue.charAt(memlogin_c);
		if(memlogin_pd.charAt(memlogin_c)!='~')
  		 memlogin_pass[memlogin_a]=memlogin_pass[memlogin_a]+memlogin_pd.charAt(memlogin_c);
	memlogin_c++;
  	}
  	} 
var memlogin_logi="";
var memlogin_extension=".htm";
var memlogin_filename='';
var memlogin_cur=1;
	
function validate(memlogin_text1,memlogin_text2)
{

memlogin_filename=memlogin_logi+memlogin_text2+memlogin_extension;

for(memlogin_a=0;memlogin_a<memlogin_no;memlogin_a++) 
	{
	if(memlogin_user[memlogin_a]==memlogin_text1)
		{
		memlogin_cur=0;
		break;
		} 	
	else 
		memlogin_cur=1;

	}

if(memlogin_cur==1)	 
	alert('You are NOT A VALID USER or the User Name typed is incorrect');
else
	if(memlogin_pass[memlogin_a]==memlogin_text2) 	
		{
		alert("ALWAYS LOG OFF BEFORE QUITING ECOSIGHT");
		if(GetCookie("loginurl"))
			location.href=GetCookie("loginurl");
		else
			location.href=memlogin_filename;
		} 
	else
		alert('Your Password is INVALID! Type it again');	
}

// -----------MEMBERS LOGIN PROGRAMME ENDS---------->









var results_location = "results.htm";
function loc_results() 
{
	if (sname.searchwrd.value.length > 0) 
	{
	searchwrd=sname.searchwrd.value.toLowerCase();
	if(searchwrd=="sitesearch")
	searchwrd="ecosight";
	SetCookie("searchword",searchwrd,exp);
	searchwrd=GetCookie("searchword");
	window.location = results_location;
	
	}
}




// <-----------SEARCH ENGINE PROGRAMME BEGINS----------

var searchtitle;
var searchurl;
var searchdisc;

function search()
{
var dummyword='', pagename="",pageurl="",pagedisc="",pagekeys="", protect='n';
var dummycount=0, numberofpages=1, numberofkeywords=0,a=0,b=0,c=0;
var keywords= new Array(50);
searchword=GetCookie("searchword");
document.write("");

for(count=0;count<(searchword.length);count++)
{
if(searchword.charAt(count)==' ')count++;
dummyword=dummyword+searchword.charAt(count);
}
searchword=dummyword;
for(repeatsearch=0;repeatsearch<2;repeatsearch++)
{

switch(repeatsearch)
	{
	case 0 : searchlistvar=searchlist;break;
	case 1 : searchlistvar=searchlistsub;document.write("<blockquote><blockquote><br><br><b><u>LIST AVAILABLE IN SUB SITES</u></b>");break;
	}
for(dummycount=0, sectioncount=0;dummycount<searchlistvar.length;dummycount++)
	{
	pagename="",pageurl="",pagedisc="",pagekeys="";
	b=0; /// field variable
	for(a=0;a<searchlistvar[dummycount].length;a++)
		{
		if(searchlistvar[dummycount].charAt(a)=='^')
		{a++,b++;}
		switch(b)
			{
			case 0 : pagename=pagename+searchlistvar[dummycount].charAt(a); break;
			case 1 : pageurl =pageurl +searchlistvar[dummycount].charAt(a); break;
			case 2 : pagedisc=pagedisc+searchlistvar[dummycount].charAt(a); break;
			case 3 : pagekeys=pagekeys+searchlistvar[dummycount].charAt(a); break;
			}
		}
		if(repeatsearch==1)pageurl="subsites/"+pageurl;
		a=0;b=-1; /// values of a & b have reset and free
		for(a=0;a<50;a++) keywords[a]="";
		for(a=0;a<pagekeys.length;a++)
			{
			if(pagekeys.charAt(a)=='#') b++;
			else
		        keywords[b]=keywords[b]+pagekeys.charAt(a);
			}
		for(b=0;b<(keywords.length-1) && keywords[b]!='';b++)	
		if(compare(searchword,keywords[b])==1)
			{
			dummyword=keywords[b];
			if(pageurl.charAt(0)=='$')
				{
				pageurl=pageurl.substring(1,pageurl.length);
				protect='y';
				}
			
			document.write("<p align=\"left\"><a href='"+pageurl+"#"+keywords[b].toUpperCase()+"' "); 
			
			///if(pageurl=='diagrams.htm') 
			///alert(keywords[b].toLowerCase());
			//document.write(" onClick=\"SetCookie('diagram','"+keywords[b].toLowerCase()+"',exp)\" "); 
			//}
			
			document.write("><b><u><font size='2' color='#FF9900'>"+numberofpages+". "+pagename+"</font></u></b></a>");
			if(protect=='y') 
				{
				document.write("  <img border=\"0\" src=\"images/log_req_indicator.gif\" alt=\"PASSWORD REQUIRED\" >");
				protect='n';
				}
			document.write("<br><b>"+pagedisc+".</b><br>");
			document.write("<font size='2' color='#A2C8A9'>The key words for this page are :</font>");
			numberofpages++;
			for(c=0;c<keywords.length && keywords[c]!='';c++)
			if(compare(searchword,keywords[c])==1)
			{
			document.write(" <font size='2' color='#FF9966'><b>¤</b></font> <a href='"+pageurl+"#"+keywords[c].toUpperCase()+"'><font size='1' color='#FF9966'><b>"+keywords[c].toUpperCase()+"</b></font></a>") 
			sectioncount++;numberofkeywords++;
			}
			else
			document.write(" <font size='2' color='#33cccc'><b>¤</b></font> <a href='"+pageurl+"#"+keywords[c].toUpperCase()+"'><font size='1' color='#A2C8A9'>"+keywords[c]+"</font></a>")
			document.write("<font size='1' color='#A2C8A9'> etc.</font><br>");

			document.write("    Page URL is www.ecosight.org/"+pageurl);	break;
			}
			
}
document.writeln("<br><br>");
if(sectioncount==0)
document.writeln("<br><img border=\"0\" src=\"images/attention.gif\" width=\"19\" height=\"19\"> ");
document.write("<font size='1'><B> THERE WAS <font color='#FF9900'>"+sectioncount+"</font> MATCHING WORD IN THIS SECTION.<B></font>");
}
	if(repeatsearch==2)document.write("</blockquote></blockquote>");	
	document.write("<br><br><b><u>RESULT</u><br>       Found <font size='2' color='#FF9900'>"+numberofkeywords+"</font> word(s) matching to \"<font size='2' color='#FF9900'>"+searchword+"</font>\" found totally in <font size='2' color='#FF9900'>"+(numberofpages-1)+"</font> Page(s).</b>");
	if(numberofkeywords==0)
{
document.writeln("<br><br><br><b><span style=\"background-color: #008000\"><font color=\"#008000\">.</font><font color=\"#FFFFFF\">Tips");
document.writeln("to get Proper Results</font><font color=\"#008000\">.</font></span></b>"); 
document.writeln("<table border=\"0\" width=\"98%\" cellspacing=\"0\" cellpadding=\"0\">");
document.writeln("    <tr>");
document.writeln("      <td width=\"14%\"><img border=\"0\" src=\"images/bulb.gif\" width=\"29\" height=\"36\"></td>");
document.writeln("      <td width=\"86%\"><font face=\"Verdana\" size=\"2\"><font color=\"#FF9900\"><b><i>Correct");
document.writeln("        the Spelling</i></b></font> of the word you typed and retry or <font color=\"#FF9900\">use an <br>");
document.writeln("        <b><i>Apt Search Word</i></b></font>");
document.writeln("        which would suite the concept of this site!</font></td>");
document.writeln("    </tr>");
document.writeln("  </table>");
}
}


// -----------SEARCH ENGINE PROGRAMME ENDS---------->
function compare(swrd,kwrd)
{
rt=0,a=0;
for(;a<=(kwrd.length-swrd.length);a++)
    {
    if(swrd==kwrd.substring(a,a+swrd.length)) 
    rt=1;
    }
return rt;
}
// <-----------PAGE LOCK PROGRAMME BEGINS----------
function pagelock()
{

if(GetCookie("flag")!=1)
{
SetCookie("loginurl",document.location,exp);
location.href="login.htm";
}
}

// -----------PAGE LOCK PROGRAMME  ENDS---------->

function printdate()
{
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
todaydate=dayarray[day]+", "+montharray[month]+" "+daym+", "+year;
document.write(todaydate);
}

function visithistory()
{
visithistory = GetCookie("visitcount");
document.write("<table width='95%'>");
for(a=0,b=1;a<(visithistory.length);a++) 
{	if(visithistory.charAt(a)=="*")
	{
	if(b>1)document.write("<tr>");
	document.write("<td width='3%' valign=\"top\"><font color='#006600' size='1' face='Verdana'><b>");
	if(b<10) document.write("0");
	document.write(b+". </b>");
	b++;
	}
	if(visithistory.charAt(a)=="*")
	document.write("</td><td width='12%' valign=\"top\"><font color='#FF9999' size='1' face='Verdana'>")
	else 
	if(visithistory.charAt(a)=="@")
	document.write("</td><td width='65%' valign=\"top\"><font color='#7AB,84' size='1' face='Verdana'>")
	else 	
	if(visithistory.charAt(a)=="»")
	document.write("</td><td width='20%' align=\"right\" valign=\"top\"><font color='#FF9999' size='1' face='Verdana'>")
	else 	document.write(visithistory.charAt(a));
}
document.write("</td><td width='5%' valign=\"top\"><font color='#FF0000' size='1' face='Verdana'>CURRENT FILE</td></tr></table><br><font color='#006600' size='1' face='Verdana'>Total URLs <b></font><font color='#FF0000' size='1' face='Verdana'>"+(GetCookie('ecosightuser')).toUpperCase()+"</font><font color='#006600' size='1' face='Verdana'></b> visited is <b></font><font color='#FF0000' size='1' face='Verdana'>"+(b-1)+"</b>.</font>");
}


function visitcounter()
{
var urlnam=document.URL;
var a=urlnam.length, b=a;
var filnam="";
var bslash='/';	
for(a=urlnam.length;urlnam.charAt(a-1)!=bslash ;a--); 
filnam=urlnam.substring(a,b);
var visitcount="";

now = new Date();
if(!GetCookie("visitstarttime")) 
SetCookie("visitstarttime",now.getTime())
else
{
DeleteCookie("visitendtime");
endtime=SetCookie("visitendtime",GetCookie("visitstarttime"));
DeleteCookie("visitstarttime");
starttime=SetCookie("visitstarttime",now.getTime());
}
ttltime=((GetCookie("visitstarttime"))-(GetCookie("visitendtime")))/1000;
fn=now+"x"
fn=fn.substring(10,19);
if(opencount>1)filnam=" » "+ttltime+" Sec.<br>*"+fn+" @ "+filnam
else
filnam="<br>*"+fn+" @ "+filnam
if(!GetCookie("visitcount")) 
visitcount = filnam
else
{
visitcount = GetCookie("visitcount");
visitcount = visitcount+filnam;
}
DeleteCookie("visitcount");
visitcount=SetCookie('visitcount',visitcount);
}

<!-- disable right click
  var message="Sorry Good Heart, In  the sites of Olympuss, RIGHT CLICK gives neutral result!";
  function click(e) {
    if (document.all) {
      if (event.button == 2) {
        alert(message);
        return false;
      }
    }
    if (document.layers) {
      if (e.which == 3) {
        alert(message);
        return false;
      }
    }
  }
  if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN);
  }
  document.onmousedown=click;
// --> 


function headerarea()
{
document.write("<script language='JavaScript1.3' type='text/javascript' src='homemenulayers.js'></script>");
visitcounter();
document.writeln("   <script>if(!GetCookie('ecosightuser')) initialize(); </script>");
document.writeln("<table border=\"0\" width=\"781\" bgcolor=\"#A2C8A9\" cellspacing=\"0\">");
document.writeln("    <tr>");
document.writeln("      <td width=\"100%\">");
document.writeln("        <table border=\"0\" width=\"782\" cellspacing=\"0\">");
document.writeln("          <tr>");
document.writeln("            <td width=\"1\"></td>");
document.writeln("            <td width=\"426\"><img border=\"0\" src=\"images/ecosight.jpg\" width=\"426\" height=\"55\"></td>");
document.writeln("            <td width=\"2\"></td>");
document.writeln("            <td width=\"332\">");
document.writeln("      <table border=\"1\" width=\"97%\" bgcolor=\"#006600\" cellpadding=\"0\">");
document.writeln("        <tr>");
document.writeln("          <td width=\"100%\">");
document.writeln("            <p align=\"center\"><font color=\"#FFFFFF\" face=\"Arial\" size=\"1\">A Portal on");
document.writeln("      Olympuss, Ecosophy, Sustainable Life,&nbsp;Integrated Knowledge &amp; Eco-Spiritual Practices for&nbsp;the");
document.writeln("            Seekers of Peace, Knowledge &amp; Sustainment based on Natural Laws.</font></td>");
document.writeln("        </tr>");
document.writeln("      </table>");
document.writeln("            </td>");
document.writeln("            <td width=\"1\"></td>");
document.writeln("          </tr>");
document.writeln("        </table>");
document.writeln("      </td>");
document.writeln("    </tr>");
document.writeln("    <tr>");
document.writeln("      <td width=\"100%\"><img border=\"0\" src=\"images/fadline2.jpg\" width=\"781\" height=\"9\"><br>");
document.writeln("        <embed width=\"781\" height=\"75\" src=\"images/esbanner.swf\" border=\"0\"><noembed>This browser would not support flash</noembed><br>");
document.writeln("        <img border=\"0\" src=\"images/fadline1.jpg\" width=\"781\" height=\"9\"></td>");
document.writeln("    </tr>");
document.writeln("    <tr>");
document.writeln("      <td width=\"100%\">");
document.writeln("<table border=\"0\" width=\"781\" cellspacing=\"0\">");
document.writeln("          <tbody><tr>");
document.writeln("            <td valign=\"middle\" align=\"center\"><script>findform();</script\>");
document.writeln("          </td>");
document.writeln("            <td valign=\"middle\" align=\"center\"><script>pagenavigator();</script\>");
document.writeln("          </td>");
document.writeln("            <td valign=\"middle\" align=\"center\"><script>searchformarea();</script\></td>");
document.writeln("            <td valign=\"middle\" align=\"center\"><script>icons();</script\></td>");
document.writeln("            <td valign=\"middle\" align=\"center\"><script>hotkeys();</script\></td>");
document.writeln("            <td valign=\"middle\" align=\"center\" width=\"10\"></td>");
document.writeln("          </tr></tbody>");
document.writeln("        </table>");
document.writeln("      </td>");
document.writeln("    </tr>");
document.writeln("  </table>");
document.writeln("        <table border=\"0\" width=\"100%\" cellspacing=\"0\" bgcolor=\"#608C60\" height=\"1\">");
document.writeln("          <tr>");
document.writeln("            <td align=\"center\" width=\"3\"></td>");
document.writeln("          </tr>");
document.writeln("        </table>");
document.writeln(" <table border=\"0\" width=\"100%\" height=\"1\" cellspacing=\"0\" bgcolor=\"#A2C8A9\">");
document.writeln("          <tr>");
document.writeln("          <td width=\"1%\"> </td>");
document.writeln("            <td width=\"32%\">");
document.writeln("            </td>");
document.writeln("            <td width=\"31%\"><font face=\"Verdana\" size=\"1\">GREEN");
document.writeln("        SALUTES <script>document.write(GetCookie(\"ecosightuser\").toUpperCase());</script>,</font></td>");
document.writeln("            <td width=\"7%\"></td>");
document.writeln("            <td width=\"36%\">");
document.writeln("              <p align=\"right\"><font size=\"1\" color=\"#FFFFFF\"><script>printdate();</script></font></td>");
document.writeln("            <td width=\"4%\"></td>");
document.writeln("          <tr>");
document.writeln("          <td>.");
document.writeln("          </td>");
document.writeln("          </tr>");
document.writeln("        </table>");

if(!document.layers)
{
document.writeln("<div ID=\"menucaller\"");
document.writeln("style=\"position: absolute; left: 0; top: 204; width: 160; height: 15; visibility: visible\">");
document.writeln("<table border=\"0\" height=\"15\" width=\"100%\" cellspacing=\"0\" bordercolor=\"#000000\" cellpadding=\"0\" onMouseOver=\"show('menulayer');window.status='MOUSE OVER TO SEE THE COMPLETE  LIST OF MENU IN ECOSIGHT...';return true\" onMouseOut=\"hide('menulayer');window.status=' ';return false;\">");

document.writeln("  <tr>");
document.writeln("    <td width=\"\">");
document.writeln("<img border=\"0\" src=\"images/menurol.gif\" width=\"208\" height=\"17\"></td>");
document.writeln("  </tr>");
document.writeln("</table>");
document.writeln("</div>");
}
}


function formlessheaderarea()
{
headerarea();
}

function hotkeys()
{
document.writeln("<table onMouseOver=\"window.status='E-BEGGING for an ECO HAMLET';return true;\" onMouseOut=\"window.status='';return true;\" border=\"1\" width=\"60\" height=\"40\" cellspacing=\"0\" bgcolor=\"#CCCC00\" cellpadding=\"0\">");
document.writeln("  <td> <p align=\"center\">");
document.writeln("    <a href=\"ebeg.htm\"><img border=\"0\" src=\"images/ebeg.gif\" width=\"32\" height=\"32\" alt=\"E-BEGGING for an ECO HAMLET\"></a>");
document.writeln("    </td>");
document.writeln("    </table>");
}

function searchformarea()
{
document.writeln("  <table onMouseOver=\"window.status='SEARCH FOR A KEY WORD IN THE PAGES OF ECOSIGHT';return true;\" onMouseOut=\"window.status='';return true;\" width=\"100\" height=\"40\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
document.writeln("      <td valign=\"middle\" align=\"center\">");
document.writeln("<form name=\"sname\" onSubmit=\"loc_results(sname);return false;\">");
document.writeln("        <p align=\"center\">");
document.writeln("        <input type=\"text\" name=\"searchwrd\" size=\"9\" style=\"background-color: #EFFBDB; font-size: 8pt; font-family: Verdana\" value=\"SiteSearch\">");
document.writeln("        <input type=\"image\" src=\"images/next.gif\" Value=\"Submit\" width=\"12\" height=\"12\" name=\"I1\">");
document.writeln("      </form></p>");
document.writeln("    </tr>");
document.writeln("  </table>");
}



function findform()
{
document.writeln("  <table onMouseOver=\"window.status='FIND A WORD OF THE CURRENT PAGE';return true;\" onMouseOut=\"window.status='';return true;\" width=\"100\" height=\"40\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
document.writeln("      <td valign=\"middle\" align=\"center\">");
document.writeln("<form name=\"findword\" onSubmit=\"return findInPage(this.string.value);\">");
document.writeln("        <p align=\"center\">");
document.writeln("        <input type=\"text\" name=\"string\" size=\"9\" style=\"background-color: #EFFBDB; font-size: 8pt; font-family: Verdana\" value=\"FindAword\" onChange=\"n = 0;\">");
document.writeln("        <input type=\"image\" src=\"images/next.gif\" Value=\"Submit\" width=\"12\" height=\"12\" name=\"I1\">");
document.writeln("      </form></p>");
document.writeln("    </tr>");
document.writeln("  </table>");
}


function formlessheaderarea()
{
headertop();
headerbottom();
}


function icons()
{

document.writeln("<table width=\"320\" height=\"40\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
document.writeln("<td valign=\"middle\" align=\"center\">");
document.writeln("<a href=\"sitemap.htm\"><img border=\"0\" src=\"images/sitemap.GIF\" alt=\"SITE MAP & KEY WORDS\" onMouseOver=\"window.status='SITE MAP & KEY WORDS';return true;\" onMouseOut=\"window.status='';return true;\" width=\"30\" height=\"30\"></a>");
document.writeln("<a href=\"credits.htm\"><img border=\"0\" src=\"images/credits.GIF\" alt=\"CREDITS\" width=\"30\" onMouseOver=\"window.status='CREDITS';return true;\" onMouseOut=\"window.status='';return true;\" height=\"30\"></a>");
document.writeln("<a href=\"links.htm\"><img border=\"0\" src=\"images/links.GIF\" alt=\"LINKS\" onMouseOver=\"window.status='LINKS';return true;\" onMouseOut=\"window.status='';return true;\" width=\"30\" height=\"30\"></a>");
document.writeln("      <a href=\"signup.htm\"><img border=\"0\" src=\"images/signup.gif\" alt=\"GO TO SIGN UP PAGE\" onMouseOver=\"window.status='GO TO SIGN UP PAGE';return true;\" onMouseOut=\"window.status='';return true;\" width=\"30\" height=\"30\"></a>");
flag=GetCookie("flag");
if(flag==1)
document.writeln("<a href=\"javascript:history.go(0)\"><img border=\"0\" src=\"images/log_on.gif\" onMouseOver=\"window.status='CLICK TO LOG OFF';return true;\" onMouseOut=\"window.status='';return true;\" width=\"30\" height=\"30\" onClick=\"(flag=SetCookie('flag','0',exp))\" alt=\"Now you are in the LOGGED ON area!  CLICK TO LOG OFF\"></a>");
else
document.writeln("<a href='private.htm' onMouseOver=\"window.status='LOG ON TO PERSONALIZED AREAS...';return true\" onMouseOut=\"window.status=' ';return false\"><img border=\"0\" src=\"images/log_off.gif\" width=\"30\" height=\"30\" onClick=\"(location.href='private.htm')\" alt=\"Now you are in the LOGGED OFF area!  CLICK TO LOG ON\"></a>");
document.writeln("<a href=\"statistics.htm\"><img border=\"0\" src=\"images/statistics.GIF\" alt=\"STATISTICS\" onMouseOver=\"window.status='STATISTICS';return true;\" onMouseOut=\"window.status='';return true;\" width=\"30\" height=\"30\"></a>");
document.writeln("<a href=\"webteam.htm\"><img border=\"0\" src=\"images/webteam.GIF\" alt=\"THE WEB TEAM\" onMouseOver=\"window.status='THE WEB TEAM';return true;\" onMouseOut=\"window.status='';return true;\" width=\"30\" height=\"30\"></a>");
document.writeln("<a href=\"contactus.htm\"><img border=\"0\" src=\"images/mailtous.GIF\" alt=\"CONTACT US\" onMouseOver=\"window.status='CONTACT US';return true;\" onMouseOut=\"window.status='';return true;\" width=\"30\" height=\"30\"></a>");
document.writeln("</tr>");
document.writeln("</table>");
}


function pagenavigator()
{
document.writeln("  <table   width=\"180\" height=\"40\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
document.writeln("      <td valign=\"middle\" align=\"center\">");
document.writeln("      <a href=\"javascript:history.go(-1)\"><img border=\"0\" src=\"images/back.gif\" alt=\"GO TO PREVIOUS PAGE\" onMouseOver=\"window.status='GO TO PREVIOUS PAGE';return true;\" onMouseOut=\"window.status='';return true;\" width=\"30\" height=\"30\"></a>");
document.writeln("      <a href=\"index.htm\"><img border=\"0\" src=\"images/home.gif\" alt=\"GO TO HOME PAGE\" onMouseOver=\"window.status='GO TO HOME PAGE';return true;\" onMouseOut=\"window.status='';return true;\" width=\"30\" height=\"30\"></a>");
document.writeln("      <a href=\"javascript:history.go(+1)\"><img border=\"0\" src=\"images/next.gif\" alt=\"GO TO NEXT PAGE\" onMouseOver=\"window.status='GO TO NEXT PAGE';return true;\" onMouseOut=\"window.status='';return true;\" width=\"30\" height=\"30\"></a>");
document.writeln("<a href=\"javascript:history.go(0)\"><img border=\"0\" src=\"images/print.gif\" alt=\"PRINT THIS PAGE\" onMouseOver=\"window.status='PRINT THIS PAGE';return true;\" onMouseOut=\"window.status='';return true;\" onClick=\"window.print();\" width=\"30\" height=\"30\"></a>");
document.writeln("<a href=\"terminology.htm\"><img border=\"0\" src=\"images/terminology.GIF\" alt=\"TERMINOLOGY\" onMouseOver=\"window.status='TERMINOLOGY';return true;\" onMouseOut=\"window.status='';return true;\" width=\"30\" height=\"30\"></a>");
document.writeln("    </td></tr>");
document.writeln("  </table>");
}

function footerarea()
{
document.writeln("<table border=\"0\" width=\"100%\" cellspacing=\"0\" bgcolor=\"#A2C8A9\">");
document.writeln("  <tr>");
document.writeln("    <td width=\"3%\"></td>");
document.writeln("    <td width=\"47%\"></td>");
document.writeln("  </center>");
document.writeln("    <td width=\"47%\">");
document.writeln("      <p align=\"right\"><script>pagenavigator();</script\></td>");
document.writeln("  <center>");
document.writeln("    <td width=\"3%\"></td>");
document.writeln("  </tr>");
document.writeln("</table>");
document.writeln("<table border=\"0\" width=\"100%\" cellspacing=\"0\" bgcolor=\"#A2C8A9\">");
document.writeln("  <tr>");
document.writeln("<td width=\"100%\" bgcolor=\"#608C60\">");
document.writeln("      <p align=\"center\"><font size=\"1\" face=\"Verdana\"></font><font color=\"#FF0000\" face=\"Verdana\" size=\"3\"><b>¤</b></font><font size=\"1\" face=\"Verdana\">&nbsp;&nbsp;&nbsp;");
document.writeln("      <a href=\"coverstory.htm\"><font color=\"#FFFFFF\">COVER STORY</font></a>&nbsp;&nbsp;&nbsp;");
document.writeln("      </font><font color=\"#FF0000\" face=\"Verdana\" size=\"3\"><b>¤</b></font><font size=\"1\" face=\"Verdana\">&nbsp;&nbsp;&nbsp;");
document.writeln("      <a href=\"aboutus.htm\"><font color=\"#FFFFFF\">ABOUT US</font></a>&nbsp;&nbsp;&nbsp;");
document.writeln("      </font><font color=\"#FF0000\" face=\"Verdana\" size=\"3\"><b>¤</b></font><font size=\"1\" face=\"Verdana\">&nbsp;&nbsp;&nbsp;");
document.writeln("      <a href=\"faq.htm\"><font color=\"#FFFFFF\">FREQUENTLY ASKED</font></a>&nbsp;&nbsp;&nbsp;");
document.writeln("      </font><font color=\"#FF0000\" face=\"Verdana\" size=\"3\"><b>¤</b></font><font size=\"1\" face=\"Verdana\">&nbsp;&nbsp;&nbsp;");
document.writeln("      <a href=\"ecolifepractices.htm\"><font color=\"#FFFFFF\">ECO LIFE PRACTICES</font></a>&nbsp;&nbsp;&nbsp;");
document.writeln("      </font><font color=\"#FF0000\" face=\"Verdana\" size=\"3\"><b>¤</b></font><font size=\"1\" face=\"Verdana\">&nbsp;&nbsp;&nbsp;");
document.writeln("      <a href=\"exclusivetopics.htm\"><font color=\"#FFFFFF\">EXCLUSIVE TOPICS</font></a>&nbsp;&nbsp;&nbsp;");
document.writeln("      </font><font color=\"#FF0000\" face=\"Verdana\" size=\"3\"><b>¤</b></font><font size=\"1\" face=\"Verdana\">&nbsp;&nbsp;&nbsp;<br>");
document.writeln("      </font><font size=\"1\" face=\"Verdana\"></font><font color=\"#FF0000\" face=\"Verdana\" size=\"3\"><b>¤</b></font><font size=\"1\" face=\"Verdana\">&nbsp;&nbsp;&nbsp;");
document.writeln("      <a href=\"glancenotes.htm\"><font color=\"#FFFFFF\">GLANCE NOTES</font></a>&nbsp;&nbsp;&nbsp;");
document.writeln("      </font><font color=\"#FF0000\" face=\"Verdana\" size=\"3\"><b>¤</b></font><font size=\"1\" face=\"Verdana\">&nbsp;&nbsp;&nbsp;&nbsp;");
document.writeln("      </font><font size=\"1\" face=\"Verdana\"><a href=\"proposedprojects.htm\"><font color=\"#FFFFFF\">PROPOSED PROJECTS</font></a>&nbsp;&nbsp;&nbsp;");
document.writeln("      </font><font color=\"#FF0000\" face=\"Verdana\" size=\"3\"><b>¤</b></font><font size=\"1\" face=\"Verdana\">&nbsp;&nbsp;&nbsp;");
document.writeln("      <a href=\"proposedprograms.htm\"><font color=\"#FFFFFF\">PROPOSED PROGRAMS</font></a>&nbsp;&nbsp;&nbsp;");
document.writeln("      </font><font color=\"#FF0000\" face=\"Verdana\" size=\"3\"><b>¤</b></font><font size=\"1\" face=\"Verdana\">&nbsp;&nbsp;&nbsp;");
document.writeln("      <a href=\"programsforyou.htm\"><font color=\"#FFFFFF\">PROGRAMS for YOU</font></a>&nbsp;&nbsp;&nbsp;");
document.writeln("      </font><font color=\"#FF0000\" face=\"Verdana\" size=\"3\"><b>¤</b></font><font size=\"1\" face=\"Verdana\">&nbsp;&nbsp;&nbsp;<br>");
document.writeln("      </font><font size=\"1\" face=\"Verdana\"></font><font color=\"#FF0000\" face=\"Verdana\" size=\"3\"><b>¤</b></font><font size=\"1\" face=\"Verdana\">&nbsp;&nbsp;&nbsp;");
document.writeln("      <a href=\"camps.htm\"><font color=\"#FFFFFF\">CAMPS</font></a>&nbsp;&nbsp;&nbsp;");
document.writeln("      </font><font color=\"#FF0000\" face=\"Verdana\" size=\"3\"><b>¤</b></font><font size=\"1\" face=\"Verdana\">&nbsp;&nbsp;&nbsp;");
document.writeln("      <a href=\"downloadables.htm\"><font color=\"#FFFFFF\">DOWNLOADABLES</font></a>&nbsp;&nbsp;&nbsp; </font><font color=\"#FF0000\" face=\"Verdana\" size=\"3\">");
document.writeln("      </b></font><font size=\"1\" face=\"Verdana\"></font><font color=\"#FF0000\" face=\"Verdana\" size=\"3\"><b>¤</b></font>&nbsp;&nbsp;&nbsp;");
document.writeln("      </font><font size=\"1\" face=\"Verdana\"><a href=\"coursesoffered.htm\"><font color=\"#FFFFFF\">COURSES OFFERED</font></a>&nbsp;&nbsp;&nbsp;");
document.writeln("      </font><font color=\"#FF0000\" face=\"Verdana\" size=\"3\"><b>¤</b></font><font size=\"1\" face=\"Verdana\">&nbsp;&nbsp;&nbsp;");
document.writeln("      <a href=\"news.htm\"><font color=\"#FFFFFF\">NEWS</font></a>&nbsp;&nbsp;&nbsp;");
document.writeln("      </font><font color=\"#FF0000\" face=\"Verdana\" size=\"3\"><b>¤</b></font><font size=\"1\" face=\"Verdana\">&nbsp;&nbsp;&nbsp;");
document.writeln("      <a href=\"otherinformation.htm\"><font color=\"#FFFFFF\">OTHER INFORMATION</font></a>&nbsp;&nbsp;&nbsp;");
document.writeln("      </font><font color=\"#FF0000\" face=\"Verdana\" size=\"3\"><b>¤</b></font><font size=\"1\" face=\"Verdana\">&nbsp;</font>");
document.writeln("      <a href=\"new.htm\"><font color=\"#FFFFFF\">NEW</font></a>&nbsp;&nbsp;&nbsp;");
document.writeln("      </font><font color=\"#FF0000\" face=\"Verdana\" size=\"3\"><b>¤</b></font><font size=\"1\" face=\"Verdana\">&nbsp;</font></p>");
document.writeln("    </td>");
document.writeln("  </tr>");
document.writeln("</table>");
document.writeln("");
document.writeln("<table border=\"0\" width=\"100%\" bgcolor=\"#A2C8A9\">");
document.writeln("  <tr>");
document.writeln("    <td width=\"100%\">");
document.writeln("      <p align=\"center\">");
document.writeln("<img border=\"0\" src=\"images/oly_logo.gif\" width=\"150\" height=\"150\"><br>");
document.writeln("      <font size=\"1\" face=\"Verdana\"><b>  © The Thumbelinaue Spectrumes&nbsp;<br>");
document.writeln("      </b> Integrated Environmental Research Centre.<br>");
document.writeln("      Tattamangalam, South India.</font></td>");
document.writeln("  </tr>");
document.writeln("</table>");
menulayers();
}

function changeclr()
{
alert()
document.tags.TD.bgcolor="RED";
///document.tags.td.class=clrchanger;
}
//// find program


var NS4 = (document.layers); // Which browser?
var IE4 = (document.all);

var win = window; // window to search.
var n = 0;

function findInPage(str) {
var txt, i, found;

if (str == "")
return false;

// Find next occurance of the given string on the page, wrap around to the
// start of the page if necessary.

if (NS4) {

// Look for match starting at the current point. If not found, rewind
// back to the first match.

if (!win.find(str))
while(win.find(str, false, true))
n++;
else
n++;

// If not found in either direction, give message.

if (n == 0)
alert("Not found.");
}

if (IE4) {
txt = win.document.body.createTextRange();

// Find the nth match from the top of the page.

for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
txt.moveStart("character", 1);
txt.moveEnd("textedit");
}

// If found, mark it and scroll it into view.

if (found) {
txt.moveStart("character", -1);
txt.findText(str);
txt.select();
txt.scrollIntoView();
n++;
}

// Otherwise, start over at the top of the page and find first match.

else {
if (n > 0) {
n = 0;
findInPage(str);
}

// Not found anywhere, give message.

else
alert("The word \""+str+"\" is not found in this page.");
}
}

return false;
}





function LinkList() {

alert(document.links[1].innerText);

var myheader = "<head><title>Links In "+document.title+"</title></head>";
myheader = myheader + "<body>";
var myfont = "<font style=\"font: 8pt Verdana, Arial, Helvetica, Sans-serif; line-height:18pt;\" face=\"verdana, tahoma, geneva\" size=\"-1\" >";
var mytext = "<center><b>Links in " + document.title + "</b><ol></center>";
var myendfont = "</font>";
var myendheader = "</body>";

windowprops = "menubars=no,location=no,toolbars=no,scrollbars=yes,"+"width=350,height=400,top=50,left=50";
self.name = "main";

if(document.all) {
for (i=0; i<document.links.length; i++) {
if(document.links[i].innerText)
if(document.links[i].innerText != " ")
mytext += "<li><a target='_new' href="+document.links[i]+">"+document.links[i].innerText+"</a><br>";
else
mytext += "<li><a target='_new' href="+document.links[i]+">"+document.links[i]+"</a><br>" ;
   }
}
else {
for (i=0; i<document.links.length; i++) {
if(document.links[i].text) {
if(((document.links[i].text).indexOf("javascript:")) == -1) {
mytext += "<li><a target='_new' href="+document.links[i]+">"+document.links[i].text+"</a><br>" ;
   }
}
else { }
   }
}
mytext = mytext + "</ol><center><a href='javascript:window.close()'>close</a></center><BR>";

linkswin = window.open("","",windowprops);
with (linkswin.document) {
open();
write(myheader + myfont + mytext + myendfont + myendheader);
close();
   }
}
////////////////////////////
function Links() {
text="";
if(document.all) 
	{
	for (i=0; i<document.links.length; i++) 
	{
	if(document.links[i].innerText)
	if(document.links[i].innerText != " ")
		{
		text += "<a href="+document.links[i]+">"+document.links[i].innerText+"</a><br>";
		}
		else
		text += "<a href="+document.links[i]+">"+document.links[i]+"</a><br>" ;

   	}
	}
document.write(text);
}


