var NS4DOM=(document.layers) ? true:false;
if(NS4DOM){
	location.href="warnings/upgrade.htm";
}
//global variables to control menu behavior index.htm
//howisit reflects the status of tut_menu
//second reflects the status of any submenu
var howisit=null;
var second=null;
//preload images for certificate links
//create image objects
var cert_pix=new Array();
//assign graphics to image objects
cert_pix[0]="<a href='php/cert.php?cis_certid=2'><img src='graphics/topics/dbase.gif' style='border-width:0' /></a>";
cert_pix[1]="<a href='php/cert.php?cis_certid=3'><img src='graphics/topics/gamecert.gif' style='border-width:0' /></a>";
cert_pix[2]="<a href='php/cert.php?cis_certid=4'><img src='graphics/topics/netcert.gif' style='border-width:0' /></a>";
cert_pix[3]="<a href='php/cert.php?cis_certid=6'><img src='graphics/topics/unixcert.gif' style='border-width:0' /></a>";
cert_pix[4]="<a href='php/cert.php?cis_certid=7'><img src='graphics/topics/vbcert.gif' style='border-width:0' /></a>";
cert_pix[5]="<a href='php/cert.php?cis_certid=8'><img src='graphics/topics/webcert.gif' style='border-width:0' /></a>";
//function to randomly select certificate images
function certificates(){
  var num=Math.round(Math.random()*5);
   return cert_pix[num];	
}
function checkit(){
   var answer=confirm("Are you sure you want to clear the form?");
   return answer;
}
function doublecheck(){
   var answer=confirm("Are you sure you want to submit the data? This will alter the record in the database for this course");
}
//used on index.htm for tutorial files menu

function showit(nam){
	if(howisit){
		howisit.style.visibility="hidden";
		howisit=null;
		if(second)second.style.visibility="hidden";
		second=null;
	}else{
		howisit=document.getElementById(nam);
		howisit.style.visibility="visible";
	}
}
function showsub(submen){
	if(second){
		second.style.visibility="hidden";
		second=null;
		second=document.getElementById(submen);
		second.style.visibility="visible";
	}else{
		second=document.getElementById(submen);
		second.style.visibility="visible";
	}
}
function hidesub(){
	    if(second){
        second.style.visibility="hidden";
        second=null;
		}
}


//ARRAYS TO RANDOMIZE CONTENT HOME PAGE
//array to randomize graduates graphics and links
var grads=new Array();
    grads[0]="<a href='grad_quote/cox.html'><img src='graphics/people/cox_web.jpg' style='border-width:0' alt='Meet Aims CIS grad. Kevin Cox' /></a>";
    grads[1]="<a href='grad_quote/bailey.html'><img src='graphics/people/j_bailey_opt.gif' style='border-width:0' alt='Meet Aims CIS grad. Jennifer Bailey' /></a>";
	grads[2]="<a href='grad_quote/roberts.html'><img src='graphics/people/roberts_opt.gif' style='border-width:0' alt='Meet Aims CIS grad. Karen Roberts' /></a>";
	grads[3]="<a href='grad_quote/biese.html'><img src='graphics/people/melissa.png' style='border-width:0' alt='Meet Aims CIS/Graphics grad. Melissa Biesemeier' /></a>";
    grads[4]="<a href='grad_quote/longwell.htm'><img src='graphics/people/mlongwell.png' style='border-width:0' alt='Meet Aims CIS/Graphics grad. Michelle Longwell' /></a>";

//function to randomize graduate content

function graduates(){
   var num=Math.round(Math.random()*4);
   return grads[num];
}


var lab_pix=new Array();
	lab_pix[0]="<img src='graphics/classrooms/thumbs/1.jpg' alt='Classroom computer lab' width='100' height='67' hspace='3' vspace='3' align='left' border='1'  />";
	lab_pix[1]="<img src='graphics/classrooms/thumbs/2.jpg' alt='Classroom computer lab' width='100' height='67' hspace='3' vspace='3' align='left' border='1'  />";
	lab_pix[2]="<img src='graphics/classrooms/thumbs/3.jpg' alt='Classroom computer lab' width='100' height='67' hspace='3' vspace='3' align='left' border='1'  />";
    lab_pix[3]="<img src='graphics/classrooms/thumbs/4.jpg' alt='Classroom computer lab' width='100' height='67' hspace='3' vspace='3' align='left' border='1'  />";
	lab_pix[4]="<img src='graphics/classrooms/thumbs/5.jpg' alt='Classroom computer lab' width='100' height='67' hspace='3' vspace='3' align='left' border='1' />";
	lab_pix[5]="<img src='graphics/classrooms/thumbs/6.jpg' alt='Classroom computer lab' width='100' height='67' hspace='3' vspace='3' align='left' border='1' />";
	lab_pix[6]="<img src='graphics/classrooms/thumbs/7.jpg' alt='Classroom computer lab' width='100' height='67' hspace='3' vspace='3' align='left' border='1'  />";
function rand_lab(){
   var num=Math.round(Math.random()*6);
   return lab_pix[num];
}
	
	