var str
var tablestr ='</TD></TR></TBODY></TABLE>'
var linkset=new Array()
var mtop = 87, lmargin = 25
var leftpos=new Array(58, 85, 210, 320, 385, 450)
var twidth = new Array(105, 158, 153, 135,115, 105)


function links(n, mstr)
{
  var s
  s='<TD BGCOLOR="#0080FF"><A HREF="#" ONMOUSEOVER="showmenu(event,'+n+')" ONMOUSEOUT="delayhidemenu()"><FONT COLOR="#FFFFFF">'+mstr+'</FONT></A></TD>';
  document.write(s);
}

function drawtable(padding, spacing, width, fcolor, fontw, height)
{
  var s  
  s= '<TABLE BORDER="0" CELLPADDING="'+padding+'" CELLSPACING="'+spacing+'" WIDTH="'+width+'" STYLE="font-family: Arial,Verdana, Helvetica; font-size: 10pt';
 
  if(fcolor) s=s+'; color: '+fcolor;
  s+='; font-weight : '+fontw +'" HEIGHT="'+height+'"><TBODY><TR><TD '; 
   
return s
}

//Pop-it menu- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use



//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT
linkset[0]=""
ulink(0, "/about_tic.htm", "Introduction");
ulink(0, "/scripts/ticorgchart.asp","Organisation");
ulink(0, "","Project map");

linkset[1]=""
ulink(1,"/scripts/irr_prj.asp", "Irrigation Projects");
ulink(1, "/scripts/he_prj.asp","Hydroelectric Projects");
ulink(1, "/photo_gallery.htm","Photo Gallery");
//ulink(1, "","Salient Features");
ulink(1, "/major_projects.htm","&nbsp;&nbsp; Features of major projects");
//ulink(1, "","&nbsp;&nbsp; » Medium Projects");
//ulink(1, "","&nbsp;&nbsp; » MI Projects");
//ulink(1, "hydrofeatures.htm","&nbsp;&nbsp; » Hydroelectric");

linkset[2]=""
ulink(2, "/scripts/st_rot.asp","Storage Position");
ulink(2, "","Irrigation");
ulink(2, "/scripts/ticpip.asp","&nbsp;&nbsp;  » Program");
ulink(2, "/irrigation_scheduling.htm", "&nbsp;&nbsp;  » Schedule");
ulink(2, "/irr_rpt.htm","&nbsp;&nbsp;  » Report");
ulink(2, "","Non-Irrigation");
ulink(2, "/scripts/tic_niuse.asp", "&nbsp;  » Program");
ulink(2, "/non_irrsch.htm","&nbsp;&nbsp;  » Schedule");
ulink(2, "/rivermgt.htm","River Water Program");
ulink(2, "/water_account.htm","Water Account");
ulink(2, "/water_auditing.htm","Water Auditing");

linkset[3]=""
ulink(3, "/wua.htm", "WUA Formation");
ulink(3, "/rec_status.htm", "Recovery status");
ulink(3, "/wua_list.htm", "WUA List");
ulink(3, "/scripts/ni_arrs.asp", "Arrears");

linkset[4]=""
ulink(4, "/scripts/tic_tenders.asp","Tender Notices");
ulink(4, "/tic_rest.htm","Rest house");
ulink(4, "/touris.htm","Tourism");

linkset[5]=""
ulink(5, "/rel_links.htm","Related Links");
//ulink(5, "","News");
ulink(5, "/ticsignbk.asp","Feedback");

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all
var ns4=document.layers

function ulink(n, lnk, item)
{
  linkset[n]+='<div class="menuitems">'
  if(lnk != "") linkset[n]+='<a href="'+lnk+'">'
  linkset[n]+='&nbsp;&nbsp;'+item+'&nbsp;&nbsp;</a></div>'
}

function showmenu(e,n)
{
        
	if (!document.all&&!document.getElementById&&!document.layers)
	return
        var which=linkset[n]
	var w
	clearhidemenu()
        
	menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : ""
	menuobj.tstyle=(ie4||ns6)? menuobj.style : menuobj
        
	if (ie4||ns6){w=document.body.clientWidth-lmargin;
	menuobj.innerHTML=which;}
	else
	{      w=document.innerWidth-lmargin;
		menuobj.document.write('<layer name=gui bgColor=#E6E6E6 onmouseover="clearhidemenu()" onmouseout="hidemenu()">'+which+'</layer>')
		menuobj.document.close()
	}
        if (w <525)w=525;
	menuobj.tstyle.left = lmargin+leftpos[n]*w/525;
	menuobj.tstyle.top= mtop
	menuobj.tstyle.visibility="visible"
        menuobj.tstyle.width=twidth[n];
	return false
}

function contains_ns6(a, b) 
{
	//Determines if 1 element in contained in another- by Brainjar.com
	while (b.parentNode)
	if ((b = b.parentNode) == a)return true;
	return false;
}

function hidemenu()
{
	if (window.menuobj)
	menuobj.tstyle.visibility=(ie4||ns6)? "hidden" : "hide"
}

function dynamichide(e)
{
	if (ie4&&!menuobj.contains(e.toElement))
	hidemenu()
	else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
	hidemenu()
}

function delayhidemenu()
{
	if (ie4||ns6||ns4)
	delayhide=setTimeout("hidemenu()",500)
}

function clearhidemenu()
{
	
     if (window.delayhide)
	clearTimeout(delayhide)
}

function highlightmenu(e,state)
{
	if (document.all)
	source_el=event.srcElement
	else if (document.getElementById)
	source_el=e.target
       
	if (source_el.className=="menuitems")
	{
		source_el.id=(state=="on")? "mouseoverstyle" : ""
	}
	else
	{
		while(source_el.id!="popmenu")
		{
			source_el=document.getElementById? source_el.parentNode : source_el.parentElement
			if (source_el.className=="menuitems")
			{
				source_el.id=(state=="on")? "mouseoverstyle" : ""
			}
		}
	}
}

if (ie4||ns6)
document.onclick=hidemenu

str= '<LINK REL="stylesheet" TYPE="text/css" HREF="/ticw.css"></HEAD>';
str+='<BODY TOPMARGIN="0">';
str+= drawtable("0","0","100%","", "normal", "1");
str+='ALIGN="center" WIDTH="100%" HEIGHT="65" COLSPAN="2">';
str+= drawtable("0","0","100%","#000080", "normal","57");
str+='HEIGHT="57"><IMG BORDER="0" SRC="/images/mudra1.gif" WIDTH="36" HEIGHT="57"></TD><TD Style="Text-ALIGN:center" VALIGN="Bottom" HEIGHT="57" Width="50%">';
str+='<FORM METHOD="POST" ACTION="/search.asp?fd=0">';
str+= drawtable("0","0","165","#808000", "bold","1");
str+='VALIGN="Middle" STYLE="Text-ALIGN:Center" WIDTH="163">';
str+='<INPUT TYPE="text" NAME="Search" SIZE="15" STYLE="font-family: Arial,Verdana, Helvetica; color: #0000FF; font-size: 8pt">&nbsp;';
str+='<INPUT TYPE="submit" VALUE="Search" NAME="B1" STYLE="font-family: Arial,Verdana, Helvetica; font-size: 8pt">';
str+=tablestr+'</FORM></TD>';
str+='<TD HEIGHT="57" WIDTH="50%"><IMG BORDER="0" SRC="/images/tic1.gif" ALIGN="right" HSPACE="8" WIDTH="249" HEIGHT="30">';
str+='</TD></TR></TABLE></TD></TR><TR><TD WIDTH="100%" HEIGHT="24">';
str+= drawtable("2","1","100%","#FFFFFF", "bold","1");
str+='BGCOLOR="#0080FF"><A HREF="/default.asp" STYLE="color: #FFFFFF">Home</FONT></TD>'
document.write(str);
links(0, "About us");
links(1, "Projects");
links(2, "Water Management");
links(3, "WUA");
links(4, "Business");
links(5, "Other");

str='</TBODY></TABLE></TD></TR>';
//str+= drawtable("2","0","100%","", "bold", "0");
//str += tablestr
//str+='WIDTH="100%" BGCOLOR="#0080FF" ALIGN="Left">'
document.write (str)
//links(5, "Other", "left")
//document.write ('<TD BGCOLOR="#0080FF" STYLE="Text-Align:Left"><A HREF="#" ONMOUSEOVER="showmenu(event,5)" ONMOUSEOUT="delayhidemenu()"><FONT COLOR="#FFFFFF">Other</FONT></A></TD>');
str= tablestr+tablestr;
str+='<DIV ID="popmenu" CLASS="menuskin" ONMOUSEOVER="clearhidemenu();highlightmenu(event,\'on\')" ONMOUSEOUT="highlightmenu(event,\'off\');dynamichide(event)"></DIV>';
document.write(str);
