﻿//rotating buildings script
//modified by Patillo
//random image sequence
//
//
// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header
// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully

// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3000

// Duration of crossfade (seconds)
var crossFadeDuration = 10

// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = 'images/rotate_denny.jpg'
Pic[1] = 'images/rotate_clark.jpg'
Pic[2] = 'images/rotate_shelby.jpg'
Pic[3] = 'images/rotate_alston.jpg'
Pic[4] = 'images/rotate_hoor.jpg'
Pic[5] = 'images/rotate_smith.jpg'
Pic[6] = 'images/rotate_stadium.jpg'
Pic[7] = 'images/rotate_gp.jpg'
Pic[8] = 'images/rotate_woods.jpg'
Pic[9] = 'images/rotate_prez.jpg'
Pic[10] = 'images/rotate_gorgas.jpg'
Pic[11] = 'images/rotate_ferg.jpg'


// =======================================
// do not edit anything below this line
// =======================================

var t
var p = Pic.length
var randomnumber=Math.floor(Math.random()*p)
var j = randomnumber


var preLoad = new Array()

for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}





function changeImage(imageName){ 
document.getElementById('changeimage').setAttribute('src','images/'+imageName) 
} 








































/*
Disable right click script II (on images)- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
*/

var clickmessage="Right click disabled on images"

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()





function countdown(){
	var date = new Date("November 26, 2007");
	var descriptionb = "The Countdown has begun. ";
	var description = "start ordering your<br>Spring 2008 textbooks online.";
	var now = new Date();
	var diff = date.getTime() - now.getTime();
	var days = Math.floor(diff / (1000 * 60 * 60 * 24));
	document.write("<div style=\"text-align:center;color:#0000ff;font-size:14pt;font_weight:bold;\">")
	if(days > 0) {
	document.write(descriptionb + "In " + (days+1) + " Days " + description);
	}
	else if (days == 0) {
	document.write(descriptionb + "Tomorrow " + description);
	}
	else {
	document.write(descriptionb  + "Today " + description + "!");
	}
	document.write("</div>");
	
}





