
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function checkQuery() {
  var queryFld = document.keyword.query
  if (queryFld.value == "") {
    alert ("Please enter a query")
    queryFld.focus()
  return(false)
  }
  return(true)
}

function checkName() {
  var nameFld = document.ccso.NAME
  if (nameFld.value == "") {
    alert ("Please enter a name")
    nameFld.focus()
    return(false)
  }
  return(true)
}

function convertString( temp ) {
  var newString = "";
  var i=0;
  for( i=0; i < temp.length; i++ ) {
    if( temp.charAt(i) != " " ) {
      newString += temp.charAt(i);
    }
    else {
      newString += "+";
    }
  }
  return newString;
}

function startSearch() {


if( document.keyword.searchnav[0].checked ) {
 if( checkQuery() ) {
  var header = "http://www.google.com/u/vcu?";
  var options = "&sitesearch=vcu.edu&domains=vcu.edu";
  var searchVal = "q=" + convertString(document.keyword.query.value);
  eval( "location = " + "\"" + header + searchVal + options + "\"");
  }
 }


if( document.keyword.searchnav[1].checked ) {
  if( checkQuery() ) {
    var header = "http://search.vcu.edu/cgi-bin/directall.pl?";
    options = "TYPE=All";
    searchVal = "&NAME=" + convertString(document.keyword.query.value);
    eval( "location = " + "\"" + header + options + searchVal + "\"" );
  }
}


}

function setVCURadio(ip){
        if (ip.indexOf("128.172.")<0) {
                document.keyword.searchnav[0].checked = true;
        } else {
                document.keyword.searchnav[1].checked = true;
        }
}

function cleartextbox()
{
if (document.keyword.query.value == "Search")
document.keyword.query.value = "";
}

//-- Generate a random number between 0 and max.
  function randomNum(max) {
    var rNum="NaN"
    while (isNaN(rNum)) {
      rNum=Math.floor(Math.random()*(max))
    }
    return rNum
  }

  var pic = new Array()
  pic[0]="flashpics/pic1.jpg"
  pic[1]="flashpics/pic2.jpg"
  pic[2]="flashpics/pic3.jpg"
  pic[3]="flashpics/pic4.jpg"
  pic[4]="flashpics/pic5.jpg"
  pic[5]="flashpics/pic6.jpg"
  pic[6]="flashpics/pic7.jpg"
  pic[7]="flashpics/pic8.jpg"
  pic[8]="flashpics/pic9.jpg"
  pic[9]="flashpics/pic10.jpg"

