  
// begin insertion of last modified date
/*function modDate() {
	
	var platform = window.navigator.platform.toLowerCase();
	
	if (platform.indexOf('mac') != -1) { 
	document.getElementById('date').innerHTML = document.lastModified;
	}
	else if (Date.parse(document.lastModified) != 0) {
		var csDateFormat = document.lastModified.substring(0,10); 
		csDateFormat = csDateFormat.replace(csDateFormat.substring(6,8),'');
		document.getElementById('date').innerHTML = csDateFormat;
	}
}*/

function date_mmddyy(date) {
  var d = date.getDate();
  var m = date.getMonth() + 1;
  var y = date.getYear();

  // handle different year values 
  // returned by IE and NS in 
  // the year 2000.
  if(y >= 2000) {
    y -= 2000;
  }
  if(y >= 100) {
    y -= 100;
  }

  return "" +
     m + 
	"/" + (d<10?"0"+d:d) + 
	"/" + (y<10?"0"+y:y);
}


//
// get last modified date of the 
// current document.
//
function modDate() {
  
  var lmd = document.lastModified;
  var s   = "Unknown";
  var d1;
  
  if(0 != (d1=Date.parse(lmd))) {
    s = "" + date_mmddyy(new Date(d1));
  }
  document.getElementById('date').innerHTML = s;
}

function getImg(){
	
	//modify the array below to include the path to a header image.
	var pics = new Array("Images/header1-live.png","Images/header1a-live.png","Images/header2-live.png","Images/header2a-live.png",
						 "Images/header3-live.png","Images/header3a-live.png", "Images/header4-live.png","Images/header4a-live.png",
						 "Images/header5-live.png","Images/header5a-live.png","Images/header6-live.png","Images/header6a-live.png",
				  		 "Images/header1b-live.png");
	
	rand = -1; //make it an illegal value so it enters the loop
	low = 0; //lowest array pos
	mod = 10; //modifier for the random value
	high = pics.length - 1; //get last pos in array
	
	//we we do not have a valid value keep trying
	while(rand > high || rand < low){
		rand = Math.random() * mod;
		rand = Math.round(rand);
	}
	
	return pics[rand];
	
}

/*
-------------------------------------------------------------------------------------------------
Random Image/Link JavaScript(tm) by Jim Matvichuk
This code may be used freely as long as this copyright notice remains with the code.
Copyright© 1997, Jim Matvichuk Jim_Matvichuk@compuserve.com All rights reserved
Last Revision: August 19, 1997 
-------------------------------------------------------------------------------------------------
*/
G_total_sa = 0;
G_day = new Date();
G_seed = 1+G_day.getTime(); 

// please keep these lines on when you copy the source
// made by: Nicolas - http://www.javascript-page.com

var currentdate = 0
var core = 0

function StringArray (n) {
  G_total_sa = n;
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '

  }
}

image = new StringArray(13)
image[0] = "Images/header1-live.png"
image[1] = "Images/header1a-live.png"
image[2] = "Images/header2-live.png"
image[3] = "Images/header2a-live.png"
image[4] = "Images/header3-live.png"
image[5] = "Images/header3a-live.png" 
image[6] = "Images/header4-live.png"
image[7] = "Images/header4a-live.png"
image[8] = "Images/header5-live.png"
image[9] = "Images/header5a-live.png"
image[10] = "Images/header6-live.png"
image[11] = "Images/header6a-live.png"
image[12] = "Images/header1b-live.png"

function ranimage() {
  core = parseInt(((G_seed - (parseInt(G_seed/1000,10) * 1000))/10)/100*G_total_sa + 1,10)-1
    return(image[core])
}

function randomPicture() {
	document.write("<img src='" +ranimage()+ "' alt='Excellence in Computer Science' >");
}

// the following randomPicIF was added for pages inside other folders accessing images
function randomPicIF() {
	document.write("<img src='" + "../" +ranimage()+ "' alt='Excellence in Computer Science' >");
}

function questionWin(URL) {   popupWin=window.open(URL,'open_window','menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,dependent,width=480,height=315,left=100,top=100')
  }

function programWin(URL) {   popupWin=window.open(URL,'open_window','menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,dependent,width=550,height=450,left=100,top=100')
  }
  
function planningWin(URL) {   popupWin=window.open(URL,'open_window','menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,dependent,width=650,height=450,left=100,top=100')
  }