var mainURI = 'http://envstudies.brown.edu/Thesis/2001/tbolioli/';//var mainURI = 'file://C:/WINDOWS/Profiles/Tom/My Documents/Brown/Thesis/WebSite/';//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$function ShowFigureDebug(name, URI, w, h){//javascript:ShowFigure(name,URI, w, h)	window.open(URI,name,'locationbar=yes,scrollbars=yes,resizable=yes,width=' + w + ',height=' + h);}//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$function ShowFigure(name, URI, w, h) {//javascript:ShowFigure(name,URI, w, h) // NB: w and h are the dimensions of the image!var refNewWin;var fudge = 100;	if(w == null){		w = 400;	}	if(h == null){		h = 400;	}//  Deal with people with small screens and/or bad eyes	if(w >= (screen.availWidth - fudge)){		w = screen.availWidth - fudge;	}	if(h >= (screen.availHeight - fudge)){		h = screen.availHeight - fudge;	}// Does the window actually exist// If so flag it to not be moved.//###HERE// NB: The names coming in will be 'tablePopUp', 'htmlTablePopUp', 'figurePopUp', 'htmlFigurePopUp', 'notesPopUp'// NB: The 'tablePopUp' windows REQUIRE a white background.	var strHTML = '<html><head><title>' + name +	'</title><link rel="stylesheet" href="' + mainURI + 	'global.css" type="text/css"><script src="' + mainURI + 	'global.js" type="text/javascript" language="JavaScript1.2"></script></head><body bgcolor="#FFFFFF" text="#000000"><p align="center"><img src="' + URI + 	'"><form><center><input type="Button" name="Close" value="Close" onclick="javascript:self.close()"></center></form><p></p>';	if(isHTML(URI) >= 0 ){ //isCompat() == -1		//var newURI = makeAbsFiguresURI(URI);		var refNewWin = PopUpWin(URI, name, w, h);		refNewWin.resizeTo(w,h);	}	else{ //isCompat()		var newW = w + fudge;		var newH = h + fudge;		refNewWin = PopUpWinByRef(name, newW, newH);			//Clears the contents of the window in IE only		//refNewWin.location.replace(); 			//Clears the contents of the window in IE 			// all of the time and Mozilla half of the time		refNewWin.location.reload(); 		refNewWin.document.write(strHTML);		refNewWin.resizeTo(newW,newH);	}	refNewWin.focus();//###HERE//	if(flagUsedWin){		//screen.availLeft // x coord//		refNewWin.screenX(0);		//screen.availTop  // y coord//		refNewWin.screenY(0);//	}}//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$function isHTML(URI){var re = /\.html?/gi;//	URI.search(re) returns -1 on no matchreturn(URI.search(re));}//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$function PopUpWinByRef(name, w, h) {	//window.open(null, ...) does not work in mozilla. use '' instead.	// Yet in ns4 the '' does not work, doh!	var NewWin = window.open('', name, 'resizable=yes,menubar=no,toolbar=no,scrollbars=yes,width=' + w + ',height=' + h);return(NewWin);}//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$function isCompat() {var	NSvers = 6.2, IEvers = 4.0;var compat, verStr=navigator.appVersion, app=navigator.appName, version = parseFloat(verStr);	if (app.indexOf('Netscape') != -1) {		if (version >= NSvers) {			compat = 1;		}    	else if(version <= NSvers) {			compat = 0;		}	}	else if (app.indexOf('Microsoft') != -1){		if (version >= IEvers || verStr.indexOf(IEvers) != -1){			compat = 1;		}		else {			compat = 0;		}	} 	else if (app.indexOf('Mozilla') != -1){		compat = 1;	}	else {		// Assume it is compatible		// People with crappy browsers know it anyhow and I will not 		// be able to maintain a list of browsers into the future.		compat = 1;	}return(compat);}//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$function PopUpWin(URI, name, w, h) {var NewWin = window.open(URI, name, 'resizable=yes,menubar=no,toolbar=no,scrollbars=yes,width=' + w + ',height=' + h);return(NewWin);}// Not being used...//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$function makeAbsFiguresURI(URI){var re = /\.\.\/+/g;var newURI = URI.replace(re, '');newURI = mainURI + 'images/thesis/' + newURI;return(newURI);}