// JavaScript Document

//below is the script for the changing image and news story on banner of the frontpage

var imagenumber = 3 ;
var randomnumber = Math.random() ;
var rand1 = Math.round( (imagenumber-1) * randomnumber) + 1 ;
images = new Array
images[1] = "images/buttons/civic_a.jpg" 
images[2] = "images/buttons/civic_b.jpg"
images[3] = "images/buttons/civic_c.jpg"
var image = images[rand1]

function story(){
var image = images[rand1]
if (image=="images/buttons/civic_a.jpg") { window.location="http://newsinfo.iu.edu/news/page/normal/11021.html"; done=1; }
if (image=="images/buttons/civic_b.jpg") { window.location="http://newsinfo.iu.edu/news/page/normal/9847.html"; done=1; }
if (image=="images/buttons/civic_c.jpg") { window.location="http://newsinfo.iu.edu/news/page/normal/10719.html"; done=1; }
}


// <!-- clicking on the picture on the TODAYS STORY on the banner.inc calls the function story() above ^ 

// document.write('<a title="Today\'s\ Story" href="#" , onClick="story(); return false";><img border="0" src="' + image + '" ALT="today\'\s story"></a>')    -->


//below is the script for the faculty picture / profile section on the frontpage


var number5 = 6 ;
var imagefaculty="";
var facultyname="";
var textprof="";
var random_number5 = Math.random() ;
random_number5 = Math.round( (number5-1) * random_number5) + 1 ;

if (random_number5==1) {
imagefaculty="images/faculty/flessner.jpg";
facultyname="Ryan Flessner";
textprof="I am interested in issues of equity and educational change in mathematics and language education as they relate to pedagogy, policy, and teacher education. My knowledge and experiences as an...";
}
if (random_number5==2) {
imagefaculty="images/faculty/ray.jpg";
facultyname="Joanna Ray";
textprof="I am interested in issues of equity and educational change in mathematics and language education as they relate to pedagogy, policy, and teacher education. My knowledge and experiences as an...";
}
if (random_number5==3) {
imagefaculty="images/faculty/little.jpg";
facultyname="Chuck Little";
textprof="I have a joint appointment with the IU School of Education at Indianapolis as a Clinical Associate Professor and with the Ivy Tech Community College - Central Indiana School...";
}
if (random_number5==4) {
imagefaculty="images/faculty/bartholomew.jpg";
facultyname="Samantha Bartholomew";
textprof="I have a joint appointment with the IU School of Education at Indianapolis as a Clinical Associate Professor and with the Ivy Tech Community College - Central Indiana School...";
}
if (random_number5==5) {
imagefaculty="images/faculty/cole.jpg";
facultyname="Mary Cole";
textprof="I am interested in issues of equity and educational change in mathematics and language education as they relate to pedagogy, policy, and teacher education. My knowledge and experiences as an...";
}
if (random_number5==6) {
imagefaculty="images/faculty/weis.jpg";
facultyname="Patricia Weis";
textprof="After graduating from IU Bloomington with an elementary and kindergarten education degree, I worked as a teacher in kindergarten, second and fourth grades while working on...";
}


function faculty(){
if (imagefaculty=="images/faculty/flessner.jpg") { window.location="http://education.iupui.edu/soe/directory/facultydetail.aspx?id=119"; done=1; }
if (imagefaculty=="images/faculty/ray.jpg") { window.location="http://education.iupui.edu/soe/directory/facultydetail.aspx?id=109"; done=1; }
if (imagefaculty=="images/faculty/little.jpg") { window.location="http://education.iupui.edu/soe/directory/facultydetail.aspx?id=14"; done=1; }
if (imagefaculty=="images/faculty/bartholomew.jpg") { window.location="http://education.iupui.edu/soe/directory/facultydetail.aspx?id=102"; done=1; }
if (imagefaculty=="images/faculty/cole.jpg") { window.location="http://education.iupui.edu/soe/directory/facultydetail.aspx?id=122"; done=1; }
if (imagefaculty=="images/faculty/hill.jpg") { window.location="http://education.iupui.edu/soe/directory/facultydetail.aspx?id=121"; done=1; }
}

//below is the script for mouseover buttons in banner

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,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) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,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];}
}





// below is the script for pop-up windows 

function popup1() {
window.open("../../popup/chrissy.aspx", "popupA", "height=400,width=450,toolbar=no,scrollbars=no");
}
function popup2() {
window.open("../../popup/dean.aspx", "popupB", "height=400,width=450,toolbar=no,scrollbars=no");
}
function popup3() {
window.open("../../popup/mission.aspx", "popupC", "height=400,width=450,toolbar=no,scrollbars=no");
}
function popup4() {
window.open("newsAnnouncements.aspx", "popupD", "height=400,width=470,toolbar=no,scrollbars=yes");
}
function popup5() {
window.open("../../popup/joel.aspx", "popupE", "height=400,width=450,toolbar=no,scrollbars=no");
}
function popup6() {
window.open("../../popup/shanna.aspx", "popupF", "height=400,width=450,toolbar=no,scrollbars=no");
}
function popup7() {
window.open("../../popup/troy.aspx", "popupG", "height=400,width=450,toolbar=no,scrollbars=no");
}
function popup8() {
window.open("../../popup/#.aspx", "popupH", "height=400,width=450,toolbar=no,scrollbars=no");
}
function popup9() {
window.open("../../popup/#.aspx", "popupI", "height=400,width=450,toolbar=no,scrollbars=no");
}
function popup10() {
window.open("../../popup/#.aspx", "popupJ", "height=400,width=450,toolbar=no,scrollbars=no");
}


