<!--

browsver = parseInt(navigator.appVersion);

if (browsver < 4) {
	if (confirm("You appear to be using an older web browser, and parts of this page will not display properly. If you would like to upgrade to a newer browser, click \"OK\".")){
		parent.location='http://inside.bard.edu/computing/downloads/';
	}
	else {}
}


IE = document.all;
NS4 = document.layers;
NS6 = document.getElementById;

if (NS4) {
origWidth = innerWidth;
origHeight = innerHeight;
}


function NSfixfunk() {
	if (innerWidth != origWidth || innerHeight != origHeight)
	location.reload();
}

if (NS4) onResize = NSfixfunk;

var ro_all_n = "/images/nav_ro_all_n.gif";

var ro_acad_u = "/images/nav_ro_academic_u.gif";
var ro_camp_u = "/images/nav_ro_campus_u.gif";
var ro_comp_u = "/images/nav_ro_computing_u.gif";

//var nullimg_nullpos = "/images/spacer.gif";

//function preloadfunk() {
acad_u = new Image(), acad_u.src = ro_acad_u;
camp_u = new Image(), camp_u.src = ro_camp_u;
comp_u = new Image(), comp_u.src = ro_comp_u;
//}


function swapfunk(thisimg,tothisimg){
	if (browsver < 3) {}
	else if (NS6 && !IE){
		//theimage = document.getElementById(thisimg);
		document.getElementById(thisimg).src = eval(tothisimg);
	}

	else {
		theimage = eval("document." + thisimg);
		//document.ro_comp.src = ro_comp_n;
		theimage.src = eval(tothisimg);
	}
}


function showhidefunk(showthis){
	if (document.all || document.getElementById){
thislayer = document.getElementById? document.getElementById(showthis):document.all(showthis);

thatlayer = document.getElementById? document.getElementById('academiclayer'):document.all('academiclayer');
thatlayer.style.visibility='hidden';

thatlayer = document.getElementById? document.getElementById('campuslayer'):document.all('campuslayer');
thatlayer.style.visibility='hidden';

thatlayer = document.getElementById? document.getElementById('computinglayer'):document.all('computinglayer');
thatlayer.style.visibility='hidden';

thislayer.style.visibility='visible';
}

	else if (document.layers){
thislayer = eval("document." + showthis);
document.academiclayer.visibility="hidden";
document.campuslayer.visibility="hidden";
document.computinglayer.visibility="hidden";

thislayer.visibility="visible";
}

}


function website(form) {
	var myindex=form.select.selectedIndex;
	var gohere=form.select.options[myindex].value;
	if(gohere != "none"){
		window.open(gohere,'newwin','toolbar=yes,resizable=yes,location=yes,status=yes,scrollbars=yes');
	}
	else {}
}





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_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_findObj(n, d) { //v3.0
  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); 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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->





function hideall() {
	showhide();
}


function showhide(thisid) {
//	if (browsagt.indexOf("safari") != -1 && section == "hp") {
	if (browsagt.indexOf("mac") != -1 && section == "hp") {
		return;
	}
	navnum = 7;
	mainsubnav = document.getElementById('mainsubnavigation');
	subnavvis = false;
	for (i=1; i<=navnum; i++) {
		thislink = document.getElementById('navlink'+i);
		thissubnav = document.getElementById('mainsubnav'+i);
		if (thislink && thissubnav) {
			if (thisid == i) {
				thislinktop = getpos('navlink'+i);
				thislink.style.borderBottomWidth = "1px";
				thislink.style.marginBottom = "8px";
				//thislink.style.borderBottomColor = "#666666";
				thissubnav.style.display = "block";
				mainsubnav.style.top = thislinktop + "px";
				subnavvis = true;
			}
			else {
				thislink.style.borderBottomWidth = "0px";
				thislink.style.marginBottom = "9px";
				//thislink.style.borderBottomColor = "transparent";
				thissubnav.style.display = "none";
			}

			if (subnavvis == true) {
				//mainsubnav.style.visibility = "visible";
				mainsubnav.style.display = "block";
			}
			else {
				//mainsubnav.style.visibility = "hidden";
				mainsubnav.style.display = "none";
			}
		}
	}

}

function newseventsview(id1,id2,id3) {
	thisicon = document.getElementById(id1);
	viewthis1 = document.getElementById(id2);
	if (id3) {
		viewthis2 = document.getElementById(id3);
	}

	if (viewthis1.style.display == "none") {
		viewthis1.style.display = "block";
		if (id3) {
			viewthis2.style.display = "none";
		}
		thisicon.src = "/images/icon_more.gif";
	}
	else {
		viewthis1.style.display = "none";
		if (id3) {
			viewthis2.style.display = "block";
		}
		thisicon.src = "/images/icon_less.gif";
	}
}
