// JavaScript Document

//xZXZXZ
//Contents for menu 1
/*
menu1 Refers CENTERS Menu.
menu2 Refers Departments Menu.
menu3 Refers ADMINISTRATION Menu.
menu4 Refers Activities Menu.
menu5 Refers CONTACTS Menu.
menu6 Refers  ABOUT US Menu
*/
var menu1=new Array()
menu1[0]='<a href="library.html" style="font-weight:normal;color:#000000;"> Library </a>'
menu1[1]='<a href="health.html" style="font-weight:normal;color:#000000;">Health Center</a>'

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="./depttour.html" style="font-weight:normal;color:#000000;">QuickTour</a>'
menu2[1]='<a href="./ece.html" style="font-weight:normal;color:#000000;">ECE Department</a>'
menu2[2]='<a href="./cse.html" style="font-weight:normal;color:#000000;">CSE Department</a>'
menu2[3]='<a href="./it.html" style="font-weight:normal;color:#000000;">IT Department</a>'
menu2[4]='<a href="./me.html" style="font-weight:normal;color:#000000;">ME Department</a>'
menu2[5]='<a href="./civil.html" style="font-weight:normal;color:#000000;">CIVIL Department</a>'
menu2[6]='<a href="./eee.html" style="font-weight:normal;color:#000000;">EEE Department</a>'
menu2[7]='<a href="./mba.html" style="font-weight:normal;color:#000000;">M.B.A Department</a>'
menu2[8]='<a href="./mca.html" style="font-weight:normal;color:#000000;">M.C.A Department</a>'
menu2[9]='<a href="./placement.html" style="font-weight:normal;color:#000000;">Training&placement</a>'
menu2[10]='<a href="./labs.html" style="font-weight:normal;color:#000000;">Departmental Labs</a>'

var menu3=new Array()
menu3[0]='<a href="./chairman.html" style="font-weight:normal;color:#000000;">Chairman</a>'
menu3[1]='<a href="./principal.html" style="font-weight:normal;color:#000000;">Principal</a>'




var menu4=new Array()
menu4[0]='<a href="./alumni.html" style="font-weight:normal;color:#000000;">Alumni Association</a>'
menu4[1]='<a href="./cultural.html" style="font-weight:normal;color:#000000;">Cultural Activities</a>'
menu4[2]='<a href="./nss.html" style="font-weight:normal;color:#000000;">NSS&amp;Sports</a>'
menu4[3]='<a href="./necnpac.html" style="font-weight:normal;color:#000000;">Nec-N-Pac</a>'



var menu5=new Array()
menu5[0]='<a href="./location.html" style="font-weight:normal;color:#000000;">Location</a>'
menu5[1]='<a href="./tele.html" style="font-weight:normal;color:#000000;">Telephone Directory</a>'
menu5[2]='<a href="mailto:nrtec_principal@yahoo.com" style="font-weight:normal;color:#000000;">Write to webmaster</a>'
        

var menu6=new Array()
menu6[0]='<a href="./profile.html" style="font-weight:normal;color:#000000;"> Profile of the Institution</a>'
menu6[1]='<a href="./mgmt.html" style="font-weight:normal;color:#000000;"> Management</a>'
menu6[2]='<a href="./courses.html" style="font-weight:normal;color:#000000;">Courses Offered</a>'
menu6[3]='<a href="./facilities.html" style="font-weight:normal;color:#000000;">Facilities</a>'

var menu7=new Array()
menu7[0]='<a href="./attendence.html" target="_blank" style="font-weight:normal;color:#000000;">Attendence</a>'
menu7[1]='<a href="./marks.html" target="_blank" style="font-weight:normal;color:#000000;">Sessional Marks</a>'
menu7[2]='<a href="./anouncements.html" target="_blank" style="font-weight:normal;color:#000000;">Anouncements</a>'

var menuwidth='165px' //default menu width
var menubgcolor='#ffffff'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}
function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}

function dropdownmenu(obj, e, menucontents, menuwidth)
{
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu


document.write("<style>");
 document.write("td,legend {font-family:ms sans serif;color:gray;font-weight:bold;font-size:10px;}");
 document.write("A:link,A:active,A:visited {color:lightslategray;font-family:tahoma;font-weight:bold;text-decoration:none;font-size:10px;}");
 document.write("A:hover {text-decoration:underline ;color:maroon}");
 document.write("select {background:whitesmoke;font-size:10px}");
 document.write("li {padding:10px;list-style-type:square;font-size:10px;}");
 document.write("</style>");



var ie4=document.all    // Microsoft Internet Explorer
 var ns4=document.layers // Netscape Navigator
 var ns_gecko=document.getElementById&&!document.all //Netscape Gecko,Mozilla..
//title scroll begin

var repeat=10 //enter 0 to not repeat scrolling after 1 run, othersise, enter 1

//var title=document.title
var title="*Welcome to the Official  Website of N.E.C,Narasaraopet          *"

var leng=title.length

var start=1

function titlemove() {

  titl=title.substring(start, leng) + title.substring(0, start)

 //document.title=titl
 window.status= "Narasaraopet Engineering College,Narasaropet "
  start++

  if (start==leng+1) {

    start=0

    if (repeat==0)

    return

  }

  setTimeout("titlemove()",140)

}

titlemove()
