function MM_loadNav(c) {

var buttonFirstNames = new Array;  // the button "first names" (for _on / _off appending)
var href             = new Array;  // the href's
var preloadedImage   = new Image;  // preload while we loop!
var idir             = "images\/";  // directory to get the images from
var ilnk             = "";      // directory to link to

// 7 navigation buttons with respective pages
buttonFirstNames[0]  = "home";
href[0]              = "index.html";

buttonFirstNames[1]  = "upop_overview";
href[1]              = "upop_overview.html";

buttonFirstNames[2]  = "studinfo";
href[2]              = "student_info.html";

buttonFirstNames[3]  = "employinfo";
href[3]              = "employer_info.html";

buttonFirstNames[4]  = "volunteer";
href[4]              = "volunteer_info.html";

buttonFirstNames[5]  = "faq";
href[5]              = "faq_page.html";

buttonFirstNames[6]	= "news";
href[6]					= "news_index.html";

buttonFirstNames[7]  = "contact";
href[7]              = "contact_upop.html";

// This FOR loop makes the buttons for the navigation menu
for(var i=0; i < buttonFirstNames.length; i++) {
  
  document.write( 
  	"<tr><td width=\"120\" height=\"39\">" 
  );

  if (c == (buttonFirstNames[i]) ){
  	s = "_lock.gif\"";
  }
  else {
  	//Make a link for the button
	document.write( 
  		"<a href=\"" + 
		ilnk + 
		href[i] +
		"\""
    );
	// Swap images when the mouse leaves the button
  	document.write( 
  		"onMouseOut=\"MM_swapImgRestore()\""
  	);
	// Swap the images when the mouse is over the button
  	document.write( 
  		"onMouseOver=\"MM_swapImage(\'" + 
		buttonFirstNames[i] + 
		"\',\'\',\'" + 
		idir + 
		buttonFirstNames[i] + 
		"_on.gif\',1)\">"
  	);
  	
	s = "_off.gif\"";
  }
  document.write( 
  	"<img name=\"" + 
	buttonFirstNames[i] + 
	"\" border=\"0\" src=\"" + 
	idir + 
	buttonFirstNames[i] + 
	s
  );

  document.write( 
  	s + 
  	" width=\"120\" height=\"35\"><\/a><\/td><\/tr>"
  );

  preloadedImage.src = (idir + buttonFirstNames[i] + "_on.gif");
}
  
}

function MM_swap(d,s) {
  document[d].src = "images\/"+s+".gif";
}

var s = 2;

function moveIt() {

  

  if (document.all) {
    document.all.mover.style.pixelLeft += s;
  
    if (document.all.mover.style.pixelLeft > (document.body.clientWidth - 160))
    s = -2;

    if (document.all.mover.style.pixelLeft < 10)
    s = 2;
  }

 /* else {
    document.all.mover.left += s;
    if (document.all.mover.right > (window.innerWidth - 100))
    s = -2;
    if (document.all.mover.left < (window.innerWidth - 100))
    s = 2;
  }
*/
  setTimeout("moveIt()", 20);
}


function MM_swapImgRestore() { //v3.0

  var i,x,a = document.MM_sr;
  for(i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++){
  x.src = x.oSrc;
  }
}

function MM_preloadImages() { //v3.0

  var d = document;
  if(d.images){
      if(!d.MM_p) {
                  d.MM_p = new Array();
                  }
      var i,j = d.MM_p.length;
      var a = MM_preloadImages.arguments;
      for(i = 0; i < a.length; i++){
               if (a[i].indexOf("#") != 0){
               		d.MM_p[j]=new Image;
               		d.MM_p[j++].src=a[i];
               }
      }
  }
}

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_swapImage() { //v3.0

  var i,j = 0;
  var x,a = MM_swapImage.arguments;
  document.MM_sr = new Array;
  for(i = 0; i < (a.length - 2); i+=3){
           if ((x = MM_findObj(a[i])) != null){
              document.MM_sr[j++] = x;
              if(!x.oSrc) {
                          x.oSrc = x.src;
                          }
              x.src = a[i+2];
           }
  }
}