var str
var tablestr ='</TD></TR></TBODY></TABLE>'
var linkset=new Array()
var mtop = 88, lmargin =150
var leftpos=new Array(190, 252, 306, 477, 453, 450)
var twidth = new Array(135, 130, 150, 120,145, 105)
var sw=screen.width

function links(n, mstr)
{
  var s
  s='<TD BGCOLOR="#008080" align="Center">  <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_esc.htm", "About META");
ulink(0,"esc_obj.htm","Objectives");
ulink(0, "inforight.htm","Right to Information");
ulink(0, "esc_orgchart.htm","Organization setup");
ulink(0, "esc_contact.htm","Contact Information");

linkset[1]=""
ulink(1,"esc_trgprg.htm", "Training Introduction");
ulink(1, "esc_facilities.htm","Training Facilities");
ulink(1, "esc_faculty.htm","Training Faculties");
ulink(1, "esc_rtc.htm","Regional Centers");
ulink(1, "esc_trg.htm","Training Calendar");
ulink(1, "onl_reg.htm","Online Registration");
ulink(1, "tslist.htm","Selection List");

linkset[2]=""
ulink(2, "esc_exm.htm","Introduction");
ulink(2, "prof_syllab.htm","Syllabus");
ulink(2, "prof_cal.htm","Examination Calendar");
ulink(2, "online_result.jsp", "Examination Results");

linkset[3]=""
ulink(3, "download.htm", "Downloads");
linkset[4]=""
ulink(4, "nsk_tourism.htm","Places in Nashik");
ulink(4, "nsk_around.htm","Places around Nashik");
ulink(4, "feedback.htm","Feedback");
ulink(4, "esc_links.htm","Related Links");
var ns6=document.getElementById && !document.all
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()
        if(document.all) menuobj=document.all.popmenu;
        else if(document.getElementById) menuobj=document.getElementById("popmenu");
        else if(document.layers) menuobj=document.popmenu
        if(document.all||document.getElementById) menuobj.tstyle=menuobj.style;
        else menuobj.style=menuobj;
                if(document.body.clientWidth) w=document.body.clientWidth-lmargin;
        else if(document.innerWidth) w=document.innerWidth-lmargin;
        else if(window.innerWidth) w=window.innerWidth-lmargin;
	if (document.all || document.getElementById)menuobj.innerHTML=which;
	else
	{      	menuobj.document.write('<layer name=gui bgColor=#E6E6E6 onmouseover="clearhidemenu()" onmouseout="hidemenu()">'+which+'</layer>')
		menuobj.document.close()
	}
        if (w < 450) w=450;
     	menuobj.tstyle.left =((w-450)/2)+leftpos[n];
	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)
	{
		if(navigator.userAgent.toLowerCase().indexOf('netscape6')!=-1) menuobj.tstyle.visibility="hide"; 
                else if (document.all||document.getElementById) menuobj.tstyle.visibility="hidden";
        }  
}

function dynamichide(e)
{
	if (document.all && !menuobj.contains(e.toElement))
	hidemenu()
	else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
	hidemenu()
//else if (e.currentTarget!= e.relatedTarget) hidemenu();
}

function delayhidemenu()
{
	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" : ""
			}
		}
	}
}

document.onclick=hidemenu
str= '<LINK REL="stylesheet" TYPE="text/css" HREF="/esc.css"></HEAD>';
str+='<BODY TOPMARGIN="0" bgcolor="7BDFD2" fgcolor="#000080">';
str+= drawtable("0","0","100%","", "normal", "85");
str+='ALIGN="center" WIDTH="100%" HEIGHT="65" COLSPAN="2">';
str+= drawtable("0","0","100%","#000080", "normal","57");
str+='><IMG BORDER="0" SRC="/images/sesc_logo.jpg"></TD>';
document.write(str);
document.writeln('<TD align="Center"><img name="animate" src="/images/shimg1.jpg" BORDER="0" STYLE="filter:blendTrans(duration=1)">');
if(document.images.animate)
{
var msie=false,imgcontainer, current=0, delay;
imgcontainer=new Array();
for (i=0;i<2;i++)
{
	imgcontainer[i]=new Image();
	imgcontainer[i].src="/images/shimg"+(i+1)+".jpg";
}

if(window.createPopup) msie=window.createPopup;

delay=(msie)? document.images.animate.filters[0].duration : 0
function show()
{
	if (document.images)
	{
		if (msie) document.images.animate.filters[0].apply()
		document.images.animate.src=imgcontainer[current].src
		if (msie) document.images.animate.filters[0].play()
		current=(!current)?1:0;
		setTimeout("show()",2000+delay*1000)
	}	
}
show();
}
  function setWidth()
  {
  		var w;
  		if(document.body.clientWidth) 
  		w=document.body.clientWidth;
  		else if (document.innerWidth) 
  		w=document.innerWidth;
  		else w="100%";
  		if (w < 620) w=620; w-=50;
  		
  		if(document.layers)
  		mainTable.width=w;
  		else (document.all||document.getElementById)
  		mainTable.style.width= w;
  	}
  	window.onresize=setWidth;	
  	window.onload=setWidth;
str='</TD><TD Style="Text-ALIGN:center" VALIGN="Bottom" width="150">';
str+='<FORM METHOD="POST" Name="SearchForm" ACTION="/search.jsp?fd=0">';
str+= drawtable("0","0","100","#000000", "normal","1");
str+=' VALIGN="Middle" STYLE="Text-ALIGN:Left;font-size: 9pt" WIDTH="100%" Colspan="2" Height="1">';
str+='Web Search:</TD></TR><TR><TD><INPUT TYPE="text" NAME="search" SIZE="18" STYLE="font-family: Arial,Verdana, Helvetica; color: #0000FF; font-size: 8pt">&nbsp;';
str+='</TD><TD valign="top"><INPUT TYPE="submit" VALUE="Find" NAME="B1" STYLE="font-family: Arial,Verdana, Helvetica; font-size: 8pt">';
str+=tablestr+'</FORM></TD>';
str+='</TR></TBODY></TABLE></TD></TR><TR><TD colspan="2"><table width="100%" border="0"><tr><td width="150">&nbsp;</td><TD HEIGHT="24" align="center">';
str+= drawtable("2","1","450","#FFFFFF", "normal","1");
str+='BGCOLOR="#008080" align="center"><A HREF="/index.jsp" STYLE="color: #FFFFFF">Home</FONT></TD>'
document.write(str);
links(0, "About&nbsp;us");
links(1, "Training");
links(2, "Professional&nbsp;Examinations");
links(3, "Downloads");
links(4, "Other&nbsp;&nbsp;");

str='</tr></TBODY></table></td></tr></TABLE>'+tablestr;
document.writeln (str)
str='<DIV ID="popmenu" CLASS="menuskin" ONMOUSEOVER="clearhidemenu();highlightmenu(event,\'on\')" ONMOUSEOUT="highlightmenu(event,\'off\');dynamichide(event)"></DIV>';
document.writeln(str);
document.writeln('<div ID=mainTable align="center" Style="Width:100%;height:80%">');
