var DefaultSite = 'www.nioh.ac.za';

function menuBlur(x)
{
  x.className = "menuSpan";
}

function menuHover(x)
{
  x.className = "menuSpanHover";
}

function changeClass(x,y)
{
	x.className = y;
}

function printWindow(x)
{
	window.open("http://"+DefaultSite+x, "print", "width=800,height=600, scrollbars=1, toolbar=1, left=0,top=0, status=1, resizable=1");
}

function notifyWindow(x)
{
	var myRegExp = new RegExp("&","gi");
	var str = x.replace(myRegExp,"|"); 
	window.open("http://"+DefaultSite+"/includes/notify.php?url="+str, "notify", "width=400,height=450, scrollbars=0, toolbar=0, left=10,top=10, status=0, resizable=1");
}

function show(x) 
{
	/*var box = document.getElementById(x)
	box.style.display = ""*/
	
	var z = document.getElementById(x);

	if(z.style.display=="none")
	{
		z.style.display="";
	}
	else if(z.style.display=="")
	{
		z.style.display="none";
	}
}

function libcatShow(x)
{
	var z = document.getElementById(x);
	var r = document.getElementById('row'+x);

	if(z.style.display=="none")
	{
		z.style.display="";
		r.title="Click to hide info";
	}
	else if(z.style.display=="")
	{
		z.style.display="none";
		r.title="Click to show info";
	} 
}

function hide(x) 
{
	var box = document.getElementById(x)
	box.style.display = "none"
}

function bookmarksite(title, url){
  if (document.all) {
    window.external.AddFavorite(url, title);
 } else if (window.sidebar) {
     window.sidebar.addPanel(title, url, "")
  }
}

function expandSearch() 
{
	var tips = document.getElementById('searchTips')
	tips.style.display = ""
	
	var expandIcon = document.getElementById('expandTipsIcon')
	expandIcon.style.display = "none"
	
	var collapseIcon = document.getElementById('collapseTipsIcon')
	collapseIcon.style.display = ""
}

function collapseSearch() 
{
	var tips = document.getElementById('searchTips')
	tips.style.display = "none"
	
	var expandIcon = document.getElementById('expandTipsIcon')
	expandIcon.style.display = ""
	
	var collapseIcon = document.getElementById('collapseTipsIcon')
	collapseIcon.style.display = "none"
}

function swapToolsOn(x,y) {
	x.className = y;
}

function swapToolsOff(x,y) {
	x.className = y;
}

