function navFlip(which)
{
	if (which != 'nav1')
	{
		var numericValue = which.split('nav');
		var numericValue2 = parseInt(numericValue[1]);
		if ((document.getElementById('cap' + (numericValue2 - 1)).style.backgroundColor == 'transparent')||(document.getElementById('cap' + (numericValue2 - 1)).style.backgroundColor == '')) var color = '#94DCD8';
		else var color = 'transparent';
		document.getElementById('cap' + (numericValue2 - 1)).style.backgroundColor = color;
	}
}

var activeOne = '1';
var activeImgName = '';

function swapTourImg(whichImg,whichLink,whichImgName)
{
	document.getElementById('digit' + activeOne).className = '';
	var activeLink = whichLink.split('digit');
	document.getElementById('digit' + activeLink[1]).className = 'on';
	
	document.getElementById('tourImage').src = whichImg;
	
	activeOne = activeLink[1];
	activeImgName = whichImgName;
}

function setMediaImage(whichImgName){
	activeImgName = whichImgName;
}
function openMediaImage(whichHref){
	if(activeImgName != ""){
		var myWindow=window.open("/emuseum/code/getimage.asp?filename=" + activeImgName + "&type=full&mediatype=Image","Media","height=540,width=540,resizable,scrollbars");
	} else {
		var myWindow=window.open(whichHref,"Media","height=540,width=540,resizable,scrollbars");
	}
    myWindow.focus();
}

// Browser sniff
function BrowserCheck()
{
	var b = navigator.appName
	if (b=="Netscape") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else this.b = b
	this.v = parseInt(navigator.appVersion)
	this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ns6 = (this.b=="ns" && this.v==5)
	this.ie = (this.b=="ie" && this.v>=4)
	this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0)
	this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0)
	this.ie5b = (navigator.userAgent.indexOf('MSIE 5.5')>0)
	this.ie6 = (navigator.userAgent.indexOf('MSIE 6')>0)
	if (this.ie5) this.v = 5
	if (this.ie6) this.v = 6
	this.min = (this.ns||this.ie)
}

// automatically create the "is" object
is = new BrowserCheck()

var macVersion = '';

var agt2 = navigator.userAgent.toLowerCase();
var isMac = (agt2.indexOf('mac') != -1) ? true : false;
var isIe = (agt2.indexOf('msie') != -1) ? true : false;
var isMacIe = ((agt2.indexOf('msie') != -1) && (agt2.indexOf('mac') != -1)) ? true : false;
var isMacIe50 = ((agt2.indexOf('msie 5.0') != -1) && (agt2.indexOf('mac') != -1)) ? true : false;
var isNS = (agt2.indexOf('netscape') != -1) ? true : false;
var isNS6 = (agt2.indexOf('netscape6') != -1) ? true : false;