<!------------------------------------------------------------------->
<!--        DOCTYPE HTML PUBLIC -//IETF//DTD HTML 3.0//EN          -->
<!--              Resource25 WebViewer Version 2.0                 -->
<!--     Copyright 2000 CollegeNET, Inc. All rights reserved.      -->
<!------------------------------------------------------------------->

<!------------------------------------------------------------------->
<!--                       Browser "Sniffer"                       -->
<!------------------------------------------------------------------->
function Is () {
	var agt=navigator.userAgent.toLowerCase(); 

	if (navigator.appVersion.indexOf("MSIE")!=-1){
		this.major=parseInt(navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE")+5))
		this.minor=parseFloat(navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE")+5))
	}else{
	    	this.major = parseInt(navigator.appVersion); 
	    	this.minor = parseFloat(navigator.appVersion);
	}
	
	this.nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) 
		&& (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) 
	        && (agt.indexOf('webtv')==-1)); 
	this.nav5up = (this.nav && (this.major >= 5)); 
	this.nav3up = (this.nav && (this.major >= 3)); 

	this.ie   = (agt.indexOf("msie") != -1); 
	this.ie4up  = (this.ie  && (this.major >= 4)); 
	this.ie4  = (this.ie  && (this.major == 4)); 
	this.ie5  = (this.ie  && (this.major == 5)); 

	this.opera = (agt.indexOf("opera") != -1);
	this.opera5up = this.opera;
	//this.opera5up  = (this.opera  && (this.major >= 5)); 

	this.win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) ); 
	this.mac    = (agt.indexOf("mac")!=-1); 
}


// MSIE on Mac implements TITLE instead of ALT for IMG tags!
function isAltAtrib() {
	if (this.mac && this.ie) {
		return "TITLE"
	}else{
		return "ALT"
	}
}


// MSIE on Mac confuses stylesheets in different frames - therefore fool the caching mechanism
function isCSSFrame(aFrame) {
	if (this.mac && this.ie) {
		if (aFrame==null) aFrame=self
		if (aFrame.name!="") {
			return "?"+aFrame.name
		}else{
			return ""
		}
	}else{
		return ""
	}
}


// Indicate whether to preload images for certain browsers
function isImgPreload() {
	if (is.ie) {
		return true
	}else{
		return false
	}
}



// Create the new sniffer object
var is = new Is();



// Only support DHTML/CSS compatible browsers
if (!is.nav5up && !is.ie4up && !is.opera5up){
	window.location="sorry.html"
}else{
	Is.prototype.altAtrib = isAltAtrib
	Is.prototype.cssFrame = isCSSFrame
	Is.prototype.imgPreload = isImgPreload
}

