<!--
function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function executeQuery( form, typeOperation, doSubmit)
{

	var ind = document.getElementById('whichDatabase').selectedIndex;
	var redirURL = document.getElementById('whichDatabase').options[ind].value+escape(form.q.value);
	if (form.q.value.length < 1)
	{
		alert ( "There is an empty query. Please enter a valid one" );
		form.q.focus();
		return false;
	}
	else
	{
		if(redirURL.indexOf("http://www.google.com/search") != -1) {
			window.open(redirURL);
		}
		else if(redirURL.indexOf("http://ucommxsrv1.unl.edu/peoplefinder/") != -1) {
			window.open(redirURL,'peoplefindpop','scrollbars=1,width=325,height=500,innerwidth=325,innerheight=500');
		}
		else {
			location.href = redirURL;
		}
		return false;
	}
	return false;
}

function rotateImg(imgArray_str,elementId_str,secs_int,thisNum_int){
	function showIt() {
		if(obj.src!=null && eval(imgArray_str+"["+thisNum_int+"][0]")!=null)
			obj.src=eval(imgArray_str+"["+thisNum_int+"][0]");
		if(obj.alt!=null && eval(imgArray_str+"["+thisNum_int+"][1]")!=null)
			obj.alt=eval(imgArray_str+"["+thisNum_int+"][1]");
		if(obj.parentNode.href!=null && eval(imgArray_str+"["+thisNum_int+"][2]")!=null) {
			obj.parentNode.href=eval(imgArray_str+"["+thisNum_int+"][2]");
			if(eval(imgArray_str+"["+thisNum_int+"][3]")!=null) {
				var clickEvent = eval(imgArray_str+"["+thisNum_int+"][3]");
				obj.parentNode.onclick=function() {eval(clickEvent);}
			}
			else
				obj.parentNode.onclick=null;
		}
		else
			obj.parentNode.href='#';
	}
	if(thisNum_int==null)
		thisNum_int=Math.floor(Math.random()*eval(imgArray_str+".length"));
	if(thisNum_int >= eval(imgArray_str+".length"))
		thisNum_int = 0;
	if(eval(imgArray_str+"["+thisNum_int+"]")!=null){
		// Try and set img
		var obj = MM_findObj(elementId_str);
		showIt();
	}
	thisNum_int++;
	if(secs_int>0) {
		return setTimeout("rotateImg('"+imgArray_str+"','"+elementId_str+"',"+secs_int+","+thisNum_int+")",secs_int*1000);
	} else {
		return true;
	}
}
//-->
