function SlideMenu(Par,Par2,Par3,Par4)
	{
		document.getElementById(Par2).style.display = "none";
		document.getElementById(Par3).style.display = "none";
		document.getElementById(Par4).style.display = "none";
		document.getElementById(Par).style.display = "block";
	}
function JumToWindow(Location){
window.open(Location,'MyWindow','width=425,height=260,resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no');
};
function DeleteLeaves(TypeValue,Page,RecordID)
{
	var sid = Math.floor(Math.random()*10000);
	var c = confirm("This action will delete selected record. Continue?");
	if(c)
		{
			window.location = "index.php?p="+Page+"&sid="+sid+"&TypeValue="+TypeValue+"&RecordID="+RecordID;
		}
}
function AddName(Par1,Par2)
	{
		document.getElementById('FacultyFullName').value = Par1; 
		document.getElementById('FacultyIDNumber').value = Par2;
		//document.getElementById('HideTeachersTable').style.display = "none";
	}
function AddNameSec(Par1,Par2)
	{
		document.getElementById('FacultyFullNameLeave').value = Par1; 
		document.getElementById('FacultyIDNumberLeave').value = Par2;
		//document.getElementById('HideTeachersTable').style.display = "none";
	}
function AddStudentName(Par1,Par2,Par3)
	{
		document.getElementById('StudentFullName').value = Par1; 
		document.getElementById('StudentIDNumber').value = Par2; 
		document.getElementById('Grade').value = Par3;
		document.getElementById('GradeLevel').value = Par3;
	}
function ReturnPrev(Limit,DisplayAmount,DesiredPages,Page)
{
	window.location = "index.php?p="+Page+"&Limit="+Limit+"&DisplayAmount="+DisplayAmount+"&DesiredPages="+DesiredPages;
}
function GoTo(Limit,DisplayAmount,DesiredPages,Page)
{
	//var Search = encodeURIComponent(Search)
	window.location = "index.php?p="+Page+"&Limit="+Limit+"&DisplayAmount="+DisplayAmount+"&DesiredPages="+DesiredPages;
}
function DisplayMe(x)
{
	
	if(document.getElementById(x).style.display == "block")
	{
		document.getElementById(x).style.display = "none";
	}
	
	else if(document.getElementById(x).style.display == "none")
	{
		document.getElementById(x).style.display = "block";
	}
	
}
function GoTOEditPage(Page,FacultyIDNumberLeave,Type,Reason,RecordID)
{
	window.location = "index.php?p="+Page+"&FacultyIDNumberLeave="+FacultyIDNumberLeave+"&Type="+Type+"&Reason="+Reason+"&RecordID="+RecordID;
}
function Redirect(Page,NewsID)
{
	window.location = "index.php?p="+Page+"&DepID="+NewsID;
}
function RedirectURL(Page)
{
	window.location = "index.php?p="+Page;
}
function RedirectAuth(Page,NewsID)
{
	window.location = "index.php?p="+Page+"&StaffID="+NewsID;
}
function RedirectToDelete(Page,NewsID)
{
	var c = confirm("This action will delete selected record. Continue?");
	if(c)
		{
			window.location = "index.php?p="+Page+"&DepID="+NewsID;
		}
}
function RedirectSite(Page)
{
	window.open(Page);
}
function Operation(Page,PageID,op)
{
	if(op == "Delete")
		{
			var c = confirm("This will delete your data. Continue?");
			if(c == true)
				{
					window.location = "index.php?p="+Page+"&PageID="+PageID+"&op="+op;
				}
		}
	else
		{
			window.location = "index.php?p="+Page+"&PageID="+PageID+"&op="+op;
		}
}

