// JavaScript Document

//-------------------
//images used for multi image rollover
//-------------------
var image1 = new Image();
var image2 = new Image();
var image3 = new Image();
var image4 = new Image();
var image5 = new Image();

var image1 = "images/rollover/e004838l.jpg";
var image2 = "images/rollover/e004841l.jpg";
var image3 = "images/rollover/e004842l.jpg";
var image4 = "images/rollover/e004843l.jpg";
var image5 = "images/rollover/e004896l.jpg";
// end of images used for multi image rollover

//-------------------
//quote generator for home page
//-------------------
function Quotator(){
  var qtNum
  var rtnQuote

  // quote Array
  var a = new Array()
  a[0]= "rsdss";
  a[1]= "cpu";
  a[2]= "svip";
  a[3]= "flsn";
  a[4]= "qeia";
  a[5]= "cpin";
  qtNum = Math.floor( Math.random() * a.length );
  rtnQuote =  a[qtNum];
  //alert ("   qtNum:" + qtNum  + "   rtnQuote:" + rtnQuote);
  
   // error trap: just in case browser capability exceeded
  try {
	if (isNaN(qtNum)) {
		throw new Error("hmmm...you've encountered an unanticipated javascript problem! <br \/>Please try again.");
		} 
		//quote code here
	 switch(rtnQuote) {
		case "rsdss":
			return('See whats new in the <a href="http://dsi.lacoe.edu/rsdss/index.htm">RSDSS</a> project pages!'); 
		case "cpu":
			return('Please visit the <a href="http://dsi.lacoe.edu/cpu/index.htm">Categorical Program Units</a>'); 
		case "svip":
			return('See whats new in <a href="http://dsi.lacoe.edu/svip/index.htm">School Validation and Improvement Project</a> project pages!'); 
		case "flsn":
			return('Please visit the <a href="http://dsi.lacoe.edu/flsn/index.htm">Family Literacy Support Network</a>'); 
		case "qeia":
			return('See whats new in the <a href="http://www.qeia.org/south/">Southern California Quality Education Investment Act (QEIA)</a> Technical Assistance Center!'); 
		case "cpin":
			return('Please visit the <a href="http://dsi.lacoe.edu/cpin/index.htm">California Pre-School Instructional Network</a>'); 
		default:
			return("Visit the DSI hot topics!");
	  } 
	} catch (errMsg) {
		return(errMsg.message);
	}
}
// end of quote generator for home page


//-------------------
//table row highlighter
//-------------------
	function mouse_event(obj, newClass) {
		obj.className = newClass;
	}
// end table row highlighter

//-------------------
//Jump table
//-------------------
	function jumpPage(newLoc) {
		newPage = newLoc.options[newLoc.selectedIndex].value
		if (newPage != "") {
			window.location = newPage
		}
	}
// end table row highlighter