

//Generate transition CSS (transition=0 to 23)
document.write('<STYLE TYPE="text/css">.imgTrans{ filter:revealTrans(duration=0.4,transition=12) }</STYLE>');

//Uncomment the next line for fading rollovers instead of dissolving:
//document.write('<STYLE TYPE="text/css">.imgTrans{ filter:blendTrans(duration=0.4) }</STYLE>');

var onImages=new Array();
function Rollover(imgName, imgSrc)
{
	onImages[imgName] = new Image();
	onImages[imgName].src = imgSrc;
}

function turnOn(imgName){ 
	if(document.images[imgName].filters != null)
		document.images[imgName].filters[0].apply();
	document.images[imgName].offSrc = document.images[imgName].src;
	document.images[imgName].src    = onImages[imgName].src;
	if(document.images[imgName].filters != null)
		document.images[imgName].filters[0].play();
}

function turnOff(imgName){ 
	if(document.images[imgName].filters != null)
		document.images[imgName].filters[0].stop();
	document.images[imgName].src = document.images[imgName].offSrc;
}

//Specify name of participating images, plus paths to their onMouseover replacements:
Rollover("about", "about1.gif");
Rollover("act", "act1.gif");
Rollover("adarsh", "adarsh1.gif");
Rollover("adm", "adm1.gif");
Rollover("aff", "aff1.gif");
Rollover("auth","auth1.gif");
Rollover("camp", "camp1.gif");
Rollover("conf", "conf1.gif");
Rollover("cour", "cour1.gif");
Rollover("dis", "dis1.gif");
Rollover("exam", "exam1.gif");
Rollover("fun", "fun1.gif");
Rollover("gall", "gall1.gif");
Rollover("lib", "lib1.gif");
Rollover("org", "org1.gif");
Rollover("other", "other1.gif");
Rollover("pub", "pub1.gif");
Rollover("sans", "sans1.gif");
Rollover("bye-laws", "bye-laws1.gif");
Rollover("annual", "annual1.gif");
Rollover("office", "faculity1.gif");
Rollover("tender", "tender1.gif");


var divs = new Array();
var da = document.all;
var start;

//CONFIGUER THESE VARS!!!!!!
//speed of pulsing
var speed = 50;

function initVars(){

if (!document.all)
return

//Extend of shrink the below list all you want
//put an "addDiv(1,"2",3,4); for each div you made, 
//1)'id' of div
//2)color or glow(name or hex)(in quotes!!!)
//3)minimum strength
//4)maximum strength

addDiv(Rs,"white",2,11);
addDiv(New,'#cdae95',4,9);

//NO MORE EDITING!!!!!!

startGlow();
}

function addDiv(id,color,min,max)
{
var j = divs.length;
divs[j] = new Array(5);
divs[j][0] = id;
divs[j][1] = color;
divs[j][2] = min;
divs[j][3] = max;
divs[j][4] = true;
}

function startGlow()
{
	if (!document.all)
		return 0;

	for(var i=0;i<divs.length;i++)
	{
		divs[i][0].style.filter = "Glow(Color=" + divs[i][1] + ", Strength=" + divs[i][2] + ")";
		divs[i][0].style.width = "100%";
	}

	start = setInterval('update()',speed);
}

function update()
{
	for (var i=0;i<divs.length;i++)
	{
		if (divs[i][4])
		{
			divs[i][0].filters.Glow.Strength++;
			if (divs[i][0].filters.Glow.Strength == divs[i][3])
				divs[i][4] = false;
		}
	
		if (!divs[i][4])
		{
			divs[i][0].filters.Glow.Strength--;
			if (divs[i][0].filters.Glow.Strength == divs[i][2])
				divs[i][4] = true;
		}
	}
}



//specify interval between slide (in mili seconds)
var slidespeed=1000


//specify images
var slideimages=new Array("campus_rss.gif","campus_allahabad.gif","campus_lucknow.gif","campus_sringeri.gif","campus_guru.gif","campus_puri.gif","campus_JAIPUR.GIF")

//specify corresponding links
var slidelinks=new Array("about.htm","allaha.htm","lucknow.htm","sringeri.htm","guru.htm","puri.htm","JAIPUR.htm")


var newwindow=0 //open links in new window? 1=yes, 0=no

var imageholder=new Array()
var ie=document.all
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}

function gotoshow(){
if (newwindow)
window.open(slidelinks[whichlink])
else
window.location=slidelinks[whichlink]
}

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="authorities.htm"><font size=2 color="white">अधिकारी</font></a>'
menu1[1]='<a href="bomgmt.htm"><font size=2 color="white">प्रबन्धन समिति</font></a>'
menu1[2]='<a href="fincomm.htm"><font size=2 color="white">वित्त समिति</font></a>'
menu1[3]='<a href="academic_council.htm"><font size=2 color="white">शैक्षणिक संगठन</font></a>'
menu1[4]='<a href="index.htm"><font size=2 color="white">परिक्षा मण्डल</font></a>'
menu1[5]='<a href="index.htm"><font size=2 color="white">अनुसंधान मण्डल</font></a>'


//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="allaha.htm"><font size=2 color="white">इलाहाबाद</font></a>'
menu2[1]='<a href="jammu.htm"><font size=2 color="white">जम्मू</font></a>'
menu2[2]='<a href="puri.htm"><font size=2 color="white">पुरी</font></a>'
menu2[3]='<a href="guru.htm"><font size=2 color="white">गुरूवायूर</font></a>'
menu2[4]='<a href="jaipur.htm"><font size=2 color="white">जयपुर</font></a>'
menu2[5]='<a href="lucknow.htm"><font size=2 color="white">लखनऊ</font></a>'
menu2[6]='<a href="sringeri.htm"><font size=2 color="white">श्रृंगेरी</font></a>'
menu2[7]='<a href="garli.htm"><font size=2 color="white">गरली</font></a>'
menu2[8]='<a href="bhopal.htm"><font size=2 color="white">भोपाल</font></a>'
menu2[9]='<a href="mumbai.htm"><font size=2 color="white">मुम्बई</font></a>'

//Contents for menu 3, and so on
var menu3=new Array()
menu3[0]='<a href="../publication/reprint.pdf">पुनः मुद्रण योजना</a>'
menu3[1]='<a href="../publication/sansthan.pdf"><font size=2 color="white">संस्थान</font></a>'
menu3[2]='<a href="../publication/campus.pdf"><font size=2 color="white">परिसर प्रकाशन</font></a>'
menu3[3]='<a href="../publication/av.pdf"><font size=2 color="white">आडियो/विडियो</font></a>'
menu3[4]='<a href="../tc09.htm"><font size=2 color="white">निबंधन एवं शर्ते</font></a>'
menu3[5]='<a href="../ebook.htm"><font size=2 color="white">ई-पुस्तक</font></a>'
menu3[6]='<a href="../SVimarsha/sv.htm"><font size=2 color="white">ई-जनरल</font></a>'
//Contents for menu 4, and so on
var menu4=new Array()
menu4[4]='<a href="scheme.htm"><font size=2 color="white">योजना विभाग</font></a>'
menu4[2]='<a href="aca.htm"><font size=2 color="white">शैक्षणिक विभाग</font></a>'
menu4[3]='<a href="examw.htm"><font size=2 color="white">परीक्षा विभाग</font></a>'
menu4[0]='<a href="admin.htm"><font size=2 color="white">प्रशासन विभाग</font></a>'
menu4[1]='<a href="fin.htm"><font size=2 color="white">वित्त विभाग</font></a>'

//Contents for menu 5, and so on
var menu5=new Array()
menu5[0]='<a href="scheme.htm">योजना</a>'


//Contents for menu 6, and so on
var menu6=new Array()
menu6[0]='<a href="prak.htm"><font size=2 color="white">प्राक्-शास्त्री</font></a>'
menu6[1]='<a href="shastri.htm"><font size=2 color="white">शास्त्री</font></a>'
menu6[2]='<a href="shiksha.htm"><font size=2 color="white">शिक्षा-शास्त्री</font></a>'
menu6[3]='<a href="acharya.htm"><font size=2 color="white">आचार्य</font></a>'
menu6[4]='<a href="vidya.htm"><font size=2 color="white">विद्यावारिधि</font></a>'

//Contents for menu 7, and so on
var menu7=new Array()
menu7[0]='<a href="photo.htm">चित्रदीर्घा</a>'


//Contents for menu 8, and so on
var menu8=new Array()
menu8[0]='<a href="subject.pdf">विषयानुसार</a>'
menu8[1]='<a href="campus.pdf">संकायानुसार</a>'


		
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var horizontaloffset=2 //horizontal offset of menu from default location. (0-5 is a good value)

/////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: 160px" 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
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-obj.offsetWidth < 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 menu up?
edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? (position at top of viewable window then)
edgeoffset=dropmenuobj.y
}
}
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")+obj.offsetWidth+horizontaloffset+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"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)
}


