//preload the graphics
var img1=new Image(200,226)
img1.src="graphics/office_midway.gif"
var img2=new Image(200,226)
img2.src="graphics/office_chinaspring.gif"
var img3=new Image(200,226)
img3.src="graphics/office_campus.gif"
var img4=new Image(200,226)
img4.src="graphics/office_waco.gif"



var total=4		//how many graphics in the slide
var speed=5		//speed in seconds
//var slideV=1	//start from which slide
var slideV = Math.floor(Math.random()*3);
var temp=1		

function showslide(){
   if (!document.images)
      return
   if (document.all)
      slide.filters.blendTrans.apply()
      document.images.slide.src=eval("img"+slideV+".src")
   if (document.all)
      slide.filters.blendTrans.play()
      temp=slideV
   if (slideV<total)
      slideV++
   else
      slideV=1
   if (document.all)
      setTimeout("showslide()",speed*1000+3000)
   else
      setTimeout("showslide()",speed*1000)
}

function restartslide(){
   setTimeout("showslide()",2000)
   return true
}

window.onerror=restartslide

var imglinks=new Array()

imglinks[0]="http://IM3.imagemaker360.com/View.asp?ID=19752"
imglinks[1]="http://IM3.imagemaker360.com/View.asp?ID=19752"
imglinks[2]="http://www.campusrealtors.com"
imglinks[3]="http://IM3.imagemaker360.com/View.asp?ID=19752"

function imglink()
	{
	if (document.images.slide.src==img1.src)
		window.location=imglinks[0]
	
	else if (document.images.slide.src==img2.src)
		window.location=imglinks[1]

	else if (document.images.slide.src==img3.src)
		window.location=imglinks[2]

	else
		window.location=imglinks[3]
	return true
	}