function $(id)
{
	return document.getElementById(id);
}
function gotoo(url)
{
	window.location.href = url;
}

function hoverMenu(menuId)
{
	$(menuId).className = ($(menuId).className == "menubg") ? "menubg1" : "menubg";
}

function showMenu(menuId)
{
	var subDiv = menuId+"_sub";
	//$(subDiv).style.display = ($(subDiv).style.display == "block") ? "none" : "block";
	$(menuId).className = "menubg1";
	$(subDiv).style.display = "block";
}

function hideMenu(menuId)
{
	var subDiv = menuId+"_sub";
	//$(subDiv).style.display = ($(subDiv).style.display == "block") ? "none" : "block";
	//$(menuId).className = "menubg";
	$(subDiv).style.display = "none";
}

function tabToggle(id,curnt,tot)
{
	for (i=1; i<=tot; i++) { var divname = id+i; $(divname).className = (i == curnt) ? "tabAct" : "tabNonAct" ; }
}


function tabToggleDiv(id,curnt,tot)
{
	for (i=1; i<=tot; i++) { var divname = id+i; $(divname).className = (i == curnt) ? "tabAct" : "tabNonAct" ; var divnameSub = id+i+"sub"; $(divnameSub).style.display = (i == curnt) ? "block" : "none" ;}
}



/******************************************
* Scrollable content script II-  Dynamic Drive (www.dynamicdrive.com)
* Visit http://www.dynamicdrive.com/ for full source code
* This notice must stay intact for use
******************************************/


//specify speed of scroll (greater=faster)
var speed=5

iens6 = document.all||document.getElementById
firefox = document.getElementById && !document.all
 
var crossobj;
var contentwidth;
 
function movedown(a){

if (document.getElementById(a) != null )
{
crossobj=document.getElementById(a) 
if (iens6){
contentwidth=crossobj.offsetWidth 
}
if (firefox){
contentwidth=crossobj.offsetWidth + 0
}
}
if (iens6&&parseInt(crossobj.style.left)>=(contentwidth*(-1)+10))  /* IE Fix */
crossobj.style.left=parseInt(crossobj.style.left)-speed+"px"
movedownvar=setTimeout("movedown('a')",50)
}

function moveup(a){
if (document.getElementById(a) != null )
{
crossobj=document.getElementById(a) 
contentwidth=crossobj.offsetWidth
}
if (iens6&&parseInt(crossobj.style.left)<=0)
crossobj.style.left=parseInt(crossobj.style.left)+speed+"px"
moveupvar=setTimeout("moveup('a')",20)
}

/* menu functions */

function menuHvr(valu)
{
	var menuRef = 'drop'+valu;
	var menuId = 'menu'+valu;
	ypSlideOutMenu.showMenu(menuRef);
	$(menuId).className = "menuCurrent";
}

function menuOut(valu)
{
	var menuRef = 'drop'+valu;
	var menuId = 'menu'+valu;
	ypSlideOutMenu.hideMenu(menuRef);
	$(menuId).className = "menuNonCurrent";
}

function crntPgMenuUpd()
{ }

function showStudWithCriteria(course,year,alpha)
{
	var specialization = document.studList.select2.value;
	var ug = document.studList.select1.value;
	
	var qryString = "course="+course+"&year="+year+"&alpha="+alpha;
	
	if(specialization != 'All Categories') qryString = qryString + "&spl="+specialization;
	
	if(ug != 'All Categories') qryString = qryString + "&ug="+ug;
	
	location.href='adminstudentsList.asp?'+ qryString;
	
}

function showStudWithCriteria2(course,year,alpha)
{
	var specialization = document.studList.select2.value;
	var ug = document.studList.select1.value;
	
	var qryString = "course="+course+"&year="+year+"&alpha="+alpha;
	
	if(specialization != 'All Categories') qryString = qryString + "&spl="+specialization;
	
	if(ug != 'All Categories') qryString = qryString + "&ug="+ug;
	
	location.href='studentsList.asp?'+ qryString;
	
}


function showStud(course,year,alpha)
{
	var specialization = document.studList.select2.value;
	var ug = document.studList.select1.value;
	
	var qryString = "course="+course+"&year="+year+"&alpha="+alpha;
	
	if(specialization != 'All Categories') qryString = qryString + "&spl="+specialization;
	
	if(ug != 'All Categories') qryString = qryString + "&ug="+ug;
	
	location.href='studentsList.asp?'+ qryString;
	
}


function showAlumni(alpha)
{
	if(alpha == "all")
		location.href='adminAlumniList.asp';
	else
		location.href='adminAlumniList.asp?alpha='+ alpha;
}

var menus = 
	[
		new ypSlideOutMenu("drop1", "down", 15, 0, 130, 182),
		new ypSlideOutMenu("drop2", "down", 116, 0, 167, 65),
		new ypSlideOutMenu("drop3", "down", 247, 0, 178, 85),
		new ypSlideOutMenu("drop4", "down", 393, 0, 167, 85),
		new ypSlideOutMenu("drop5", "down", 531, 0, 129, 65),
		new ypSlideOutMenu("drop6", "down", 635, 0, 87, 45),
		new ypSlideOutMenu("drop7", "down", 717, 0, 90, 105)
	];