// JavaScript for 2006 Campus Tour

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];}
}
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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// javascript for movement though tour -- edit the following array when adding, moving, or deleting tour pages

var pages=new Array("index.html","ggma.html","stad.html","gios.html","bda.html","bdb.html","mu.html","src.html","ssv.html","main.html","fultn.html","hsb.html","intds.html","cpcom.html","asupd.html","istb1.html","istb2.html","istb5.html","byeng.html","byac.html","byoh.html","ba.html","bac.html","cady.html","moeur.html","omall.html","wilsn.html","ed.html","edb.html","edc.html","music.html","fac.html","tmpcte.html","coor.html","stauf.html","fmall.html","art.html","tower.html","cdn.html","cds.html","cfs.html","lyc.html","mhall.html","ghall.html","whall.html","lib.html","acaci.html","achal.html","arhal.html","chupa.html","joba.html","mshal.html","mvhal.html","vbhal.html","vds.html","adel1.html","adel2.html","mcl.html","manzh.html","pablo.html","pve.html","pvm.html","pvw.html","univt.html","barrett.html","irish.html","haydn.html","mb.html","ocot.html","chola.html","discvry.html","neeb.html","cmall.html","chapl.html","mcent.html","shesc.html","cowdn.html","ll.html","tmall.html","ss.html","lse.html","lsc.html","ls.html","hmall.html","uasb.html","mur.html","pebw.html","srcfields.html","palmwalk.html","bkstr.html","pebe.html","law.html","lawlb.html","mmall.html","scob.html","eca.html","ecb-g.html","engrc.html","noble.html","psy.html","psyn.html","use.html","gwc.html","psf.html","psa.html","ps.html","pwh.html","uclub.html","univbridge.html","aquat.html", "amtn.html","csac.html","wfa.html","dap.html","cgs.html","rfpf.html","wtc.html","track.html","pbs.html","karst.html","sac.html","wtf.html","wgtf.html","alber.html","socer.html","ucntr.html","apma.html","child.html","scd.html","usb.html","ctrpt.html","index.html")	




var current_page=(document.location+"").substring(((document.location+"").lastIndexOf("/")+1))
var new_location;

function move(direction){

	if(direction>0){
		for(i=0; i<pages.length-1; i++){
			if(current_page==pages[i]){
				motion(direction)
			}
		}
	}
	else {
		for(i=pages.length-1; i>0; i--){
			if(current_page==pages[i]){
				motion(direction)
			}
		}
	}
	
}

function motion(direction)	{
	new_location=pages[i+direction];
	document.location.href=new_location;
	return;
}

/* IN YOUR CODE YOU WOULD PUT THIS:
(for backward)
	<a href="javascript: void move(-1)">BACK</a> (for forward)
	<a href="javascript: void move(1)">NEXT</a>
	
*/

// Window-pop script
function writeConsole(content,w,h,title) {

windowProps="'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=yes,width="+w+",height="+h+"'";
window_name='';

top.consoleRef=window.open('',window_name,windowProps);

 consoleContent=''
+'<html><head><TITLE>'+title+'</TITLE>'
+'<style type="text/css">'
+'<!--'
+'.close {text-decoration: none;}'
+'-->'
+'</style>'
+'</head>'
+'<BODY BGCOLOR="#000000" link="#edebd4" vlink="#edebd4" onload="self.focus();">'
+'<CENTER>'
+'<table border="0" width="100%">'
+'  <tr>'
+'    <td width="100%" align="center">'
+'		<br><img src="'+content+'">'
+'		<p align="center" style="font-family: sans-serif; font-size: 9pt; font-weight:bold;"><a href="javascript:void window.close()" class="close">close window</a></p>'
+'		</td>'
+'  </tr>'
+'</table>'
+'</body>'
+'</html>'

 top.consoleRef.document.writeln(consoleContent)
 top.consoleRef.document.close()
}