/* Change classes */
function changeClass(nam) { 
nam.className='navhover'; 
return true; 
}
function changeClassBack(nam) { 
nam.className='navbar'; 
return true; 
}
/*Launches pull down select list items.  The list of links in mywindows will create a new window when selected */

function gotoit(launch){

var mywindows=new Array("Bus Schedule","Academy Bus Schedule","Academy Application","Outlook Web Access","Scholarships","Graduation Requirements","vbschools.com", "VBCPS.net", "OLHS Student Planner");

var selected=launch.options[launch.selectedIndex].text;
var loopIndex=0, found=false;
var max=mywindows.length;

while((loopIndex < max) && (found == false))  {

	if (selected == mywindows[loopIndex]) {
		found = true;
	}
	loopIndex++;
   }


	if (found == true) {
		if (selected == "OLHS Student Planner")  {
			alerter();
		}
	openwindow(launch.options[launch.selectedIndex].value);
	}

	else {
		location.href=launch.options[launch.selectedIndex].value;
	}

}

/* All in one opening windows (win), alert boxes (alert), both(winalert) or nothing (same) Works for pulldowns and regular links*/
function openit(arg)  {
var gothere;
var operation;

	if (arg.name == "launcher")  {
		gothere=arg.options[arg.selectedIndex].value;
		operation=arg.options[arg.selectedIndex].id;
	}
	else {
   		gothere=arg.href;
		operation=arg.id;
	}
	  
 switch (operation) {
	case "same":
		same(gothere);
		break
	case "win":
		openwindow(gothere);
		break
	case "winalert":  
		alerter();
		openwindow(gothere);
		break
	case "alert":
		alerter();
		same(gothere);
		break
	}
}

/* Opens a link in the same window */
function same(dest)  {
location.href=dest;
}

/* Opens a link in a new window */
function openwindow(win)	{
window.open(win,"window3", "width=620,height=540,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");
}

/* Alerts people when leaving the Virginia Beach City Schools network */
function alerter()  {
alert("NOTICE:\nYou are now leaving the Ocean Lakes High School web site.\n\nVirginia Beach City Schools has identified this website as having educational value. Virginia Beach City Public Schools does not control nor guarantee the content of this site, nor does the school division endorse the organization, its views, products, or services.");
}

<!--//
/* Rotating Images on Frontpage */
/*var myimages = new Array();
var image_index = 0;
var interval= 10 // delay between changing images (in seconds)

interval *= 1000;

myimages[image_index++]=new imageItem("images/schoolsketch.gif");
myimages[image_index++]=new imageItem("images/school2.jpg");
myimages[image_index++]=new imageItem("images/school3.jpg");

var image_number = myimages.length;

function myrotate(win) {
var new_image=getNextImage();
document[win].src = new_image;
var recur_call = "myrotate('"+win+"')";
setTimeout(recur_call, interval);
}
*/

//-->
