<!--/* CONTENTdm Version 4.3000.0    (c) DiMeMa, Inc. 2007 - All Rights Reserved */// browser sniffervar uAgent = navigator.userAgent;var bName = navigator.appName;var bVer = parseInt(navigator.appVersion);var isMac=false,isSafari=false,isNetscape=false,isOpera=false,isExplorer=false,isFirefox=false;var os,br;ns5 = (bName == "Netscape" && bVer < 5);ie4 = (bName == "Microsoft Internet Explorer" && bVer < 4);(ie4 || ns5)?location.replace('needmore.php'):0;(uAgent.indexOf('Mac')!= -1)?(os = "Mac", isMac=true):os = "PC";(uAgent.indexOf('MSIE')!= -1)?(br = "Explorer", isExplorer=true):0;(uAgent.indexOf('Netscape')!= -1)?(br = "Netscape", isNetscape=true):0;(uAgent.indexOf('Safari')!= -1)?(br = "Safari", isSafari=true):0;(uAgent.indexOf('Firefox')!= -1)?(br = "Firefox", isFirefox=true):0;(uAgent.indexOf('Opera')!= -1)?(br = "Opera", isOpera=true):0;// cookie snifferdocument.cookie="dmtestcookie=dmtestcookie;path=/";if (isMac && isNetscape){cookieEnabled = (document.cookie.indexOf("dmtestcookie") != -1)?true:false;} else if(!isMac && isExplorer){cookieEnabled = (document.cookie.indexOf("dmtestcookie") != -1)?true:false;} else if (typeof navigator.cookieEnabled == "undefined"){cookieEnabled = (document.cookie.indexOf("dmtestcookie") != -1)?true:false;} else {cookieEnabled = (navigator.cookieEnabled)?true:false;}// name urlvar url = top.parent.location.href;/*####################### functions ######################## *//*####################### functions ######################## *//*####################### functions ######################## */	// zoom & pan windowfunction ImageView(){window.open(image_viewer_url,'popup','width=760,height=650,status=no,location=no,toolbar=no,menubar=no,scrollbars=auto,resizable=yes,top=20,screenY=20,left=20,screenX=20');}// Cookiesfunction getCookie(name) {    var start = document.cookie.indexOf(name+"=");    var len = start+name.length+1;    if ((!start) && (name != document.cookie.substring(0,name.length))) return null;    if (start == -1) return null;    var end = document.cookie.indexOf(";",len);    if (end == -1) end = document.cookie.length;    return unescape(document.cookie.substring(len,end));}function setCookie(name,value,expires,path,domain,secure) {var today = new Date();var expires = new Date(today.getTime() + (24 * 60 * 60 * 1000 * 365));var path = '/';    document.cookie = name + "=" +value +        ( (expires) ? ";expires=" + expires.toGMTString() : "") +        ( (path) ? ";path=" + path : "/") +         ( (domain) ? ";domain=" + domain : "") +        ( (secure) ? ";secure" : "");        }function delCookie(name,value,expires,path,domain,secure) {var today = new Date();var expires = new Date(today.getTime() - (24 * 60 * 60 * 1000 * 365));var path = '/';    document.cookie = name + "=" +value +        ( (expires) ? ";expires=" + expires.toGMTString() : "") +        ( (path) ? ";path=" + path : "/") +         ( (domain) ? ";domain=" + domain : "") +        ( (secure) ? ";secure" : "");        }// popup windowsvar value = null;var xpos = 0;var ypos = 0; function pop(value,w,h){	window.open(value,'popup','width=' + w + ',height=' + h + ',status=0,location=0,toolbar=0,menubar=0,scrollbars=1,resizable=1,top=10,screenY=10,left=10,screenX=10');}	function pop2(value,w,h){	window.open(value,'popup2','width=' + w + ',height=' + h + ',status=0,location=0,toolbar=0,menubar=0,scrollbars=1,resizable=1,top=20,screenY=20,left=20,screenX=20');}	function clipperpop(value,w,h){	window.open(value,'clipperpop','width=' + w + ',height=' + h + ',status=0,location=0,toolbar=0,menubar=0,scrollbars=1,resizable=1,top=20,screenY=20,left=20,screenX=20');}function clippop(value,w,h){	window.open(value,'clippop','width=' + w + ',height=' + h + ',status=0,location=0,toolbar=0,menubar=0,scrollbars=1,resizable=1,top=20,screenY=20,left=20,screenX=20');}	// parse out url variables for form functionsvar TopSearchString = unescape(top.location.search);function TopCisoRoot(){	if(TopSearchString.indexOf('&')!= -1){;	cisoroot = TopSearchString.lastIndexOf('CISOROOT') + 1;	amp = TopSearchString.indexOf('&');	root = TopSearchString.substring(cisoroot+8,amp);	}	if(TopSearchString.indexOf('&')== -1){;	cisoroot = TopSearchString.lastIndexOf('CISOROOT') + 1;	root = TopSearchString.substring(cisoroot+8);	}		var TopRoot = replacetext(root, '%2F', '/');		return TopRoot;}function TopCisOptr(){	TopShortString = TopSearchString.substring(cisoroot+9+root.length);	if(TopShortString.indexOf('&')!= -1){;	cisoptr = TopShortString.lastIndexOf('CISOPTR') + 1;	amp = TopShortString.indexOf('&');	TopOptr = TopShortString.substring(cisoptr+7,amp);	}	if(TopShortString.indexOf('&')== -1){;	cisoptr = TopShortString.lastIndexOf('CISOPTR') + 1;	TopOptr = TopShortString.substring(cisoptr+7);	}		return TopOptr;}function PageCisoRoot(){	SearchString = unescape(top.parent.right.location.search);	cisoroot2 = SearchString.lastIndexOf('CISOROOT') + 1;	amp2 = SearchString.indexOf('&');	root2 = SearchString.substring(cisoroot2+8,amp2);	PageRoot = replacetext(root2, '%2F', '/');		return PageRoot;}function PageCisOptr(){	SearchString = unescape(top.parent.right.location.search);	shortsearchstring = SearchString.substring(cisoroot2+9+root2.length);	if(shortsearchstring.indexOf('&')!= -1){	cisoptr2 = shortsearchstring.lastIndexOf('CISOPTR') + 1;	amp2 = shortsearchstring.indexOf('&');	PageOptr = shortsearchstring.substring(cisoptr2+7,amp2);	}	if(shortsearchstring.indexOf('&')== -1){	cisoptr2 = shortsearchstring.lastIndexOf('CISOPTR') + 1;	PageOptr = shortsearchstring.substring(cisoptr2+7);	}		return PageOptr;}// clear form valuesfunction clearDefault(el) {  if (el.defaultValue==el.value) el.value = ""}// checkbox functionsfunction checkAll() {    for (i=0,n=document.searchResultsForm.elements.length;i<n;i++)        if (document.searchResultsForm.elements[i].type == 'checkbox')            document.searchResultsForm.elements[i].checked = true;            isStatus();}function clearAll() {    for (i=0,n=document.searchResultsForm.elements.length;i<n;i++)		if (document.searchResultsForm.elements[i].type == 'checkbox')            document.searchResultsForm.elements[i].checked = false;            isStatus();} // count text in strings function countInstances(string, word) {var substrings = string.split(word);return substrings.length - 1;}// make a string from checkbox valuesfunction makeStrFromCheck(form) {var i;var outlist = '';	for (i = 0; i < form.elements.length; i++) {		if ((form.elements[i].type == 'checkbox') && (form.elements[i].checked == true)) {		outlist = outlist + '&' +form.elements[i].value;        }	}	return outlist;}function bellair(){	if(!cookieEnabled){	alert(error_cookies);	} else {	document.bell.submit();	}}// duplicate bellair to fix bottom menu option and maintain page conformityfunction bellair2(theForm){	if(!cookieEnabled){	alert(error_cookies);	} else {	theForm.submit();	}}// set session cookiefunction dmSessCookie(name,value){document.cookie=name+"="+value+";path=/";}// set bounding box cookiefunction dmTextCookie(thebox){	if(thebox.value != ""){	document.cookie="SEARCH=dc<0>CISOSEARCHALL<"+thebox.value+">;path=/";	}	}// set bounding box cookie from metadatafunction dmMetaTextCookie(text){	if(text != ""){	document.cookie="SEARCH=dc<0>CISOSEARCHALL<"+text+">;path=/";	}	}// delete bounding box cookiefunction delSearchCookie(){document.cookie="SEARCH=;path=/";}// add multiple items to favoritesfunction addItemsFav(form){chkstr = makeStrFromCheck(form);	if(!cookieEnabled){	alert(error_cookies);	} else {	var buf = (document.cookie.indexOf("BUF")!=-1)?unescape(getCookie("BUF")):"";		if(buf != null){		numv = (buf != '')?countInstances(buf, "/"):0;		numn = countInstances(chkstr, "&");		k = 0;		str = chkstr.split('&');			for(i=1;i<str.length;i++){			str[i] = replacetext(str[i],'|','<')+'>';				if(buf.indexOf(str[i]) != -1){				k = i;				}			}			if(numv + numn > max_fav){			alert(too_many_fav);			} else if(k > 0){			alert(already_fav);			} else {			chstr = replacetext(replacetext(chkstr,'&','>'),'|','<')+">";			newbuf = buf+chstr.substring(1);			setCookie("BUF",newbuf);			// Begin Reed College Modification.			if (getCookie("fav_win") == 1) { // the favs window is open				favorites = window.open("","favorites");				favorites.location.reload();			}			// End Reed College Modification.			alert(added_fav);			clearAll();			}		} else {		chstr = replacetext(replacetext(chkstr,'&','>'),'|','<')+">";		newbuf = chstr.substring(1);		setCookie("BUF",newbuf);		// Begin Reed College Modification.		if (getCookie("fav_win") == 1) { // the favs window is open			favorites = window.open("","favorites");			favorites.location.reload();		}		// End Reed College Modification.		alert(added_fav);		clearAll();				}	}	}// add single item or complete document to favoritesfunction addItemFav(r,n){	if(!cookieEnabled){	alert(error_cookies);	} else {	var buf = (document.cookie.indexOf("BUF")!=-1)?unescape(getCookie("BUF")):"";		if(buf != null){		numv = (buf != '')?countInstances(buf, "/"):0;			if(numv == "100"){			alert(too_many_fav);			} else if(buf.indexOf(r+'<'+n+'>') != -1){			alert(already_fav);			} else {			addbuf = r+'<'+n+'>';			setCookie('BUF',buf+addbuf);			// Begin Reed College Modification.			if (getCookie("fav_win") == 1) { // the favs window is open				favorites = window.open("","favorites");				favorites.location.reload();			}			// End Reed College Modification.			alert(added_fav);			}		} else {		addbuf = r+'<'+n+'>';		setCookie('BUF',addbuf);		// Begin Reed College Modification.		if (getCookie("fav_win") == 1) { // the favs window is open			favorites = window.open("","favorites");			favorites.location.reload();		}		// End Reed College Modification.		alert(added_fav);		}	}}// add single page of document to favoritesfunction addPageFav(){var proots = PageCisoRoot()+'<'+citationUrl().substring(',')+'>';	if(!cookieEnabled){	alert(error_cookies);	} else {	var buf = (document.cookie.indexOf("BUF")!=-1)?unescape(getCookie("BUF")):"";	numv = countInstances(buf, "/");		if(numv == "100"){		alert(too_many_fav);		} else if(buf.indexOf(proots) != -1){				alert(already_fav);		} else {		setCookie('BUF',buf+proots);		// Begin Reed College Modification.		if (getCookie("fav_win") == 1) { // the favs window is open			favorites = window.open("","favorites");			favorites.location.reload();		}		// End Reed College Modification.		alert(added_fav);		}	}}// delete favoritesfunction deleteFavs(str){var newbuf = "";	if(str.indexOf('all') != -1){	delCookie("BUF");	} else {	var buf = (document.cookie.indexOf("BUF")!=-1)?unescape(getCookie("BUF")):"";	ifav = buf.split('>');	ar = str.split(',');		for(i=0;i<ifav.length-1;i++){		n = 0;			for(k=0;k<ar.length;k++){        		if (i == (ar[k]-1)){        		n = 1;        		break;        		}			}			if(n == 0){			newbuf += ifav[i]+">";			}		}	setCookie("BUF",newbuf);	setCookie("gallery_mod","1"); // Reed College Modification.	}reload();}// move favoritesfunction moveFavs(from,to) {var buf = (document.cookie.indexOf("BUF")!=-1)?unescape(getCookie("BUF")):"";ifav = buf.split('>');	if ((from > 0) && (from <= ifav.length) && (to > 0) && (to <= ifav.length-1) && (from != to)){	from = from - 1;	to = to - 1;		if (from < to){		tempifav = ifav[from];			for (i = from; i < to; i++){			ifav[i] = ifav[i+1];			}		ifav[to] = tempifav;		} else {        tempifav = ifav[from];        	for (i = from; i > to; i--){        	ifav[i] = ifav[i-1];        	}        ifav[to] = tempifav;        }	nifav = "";		for (i = 0; i < ifav.length; i++){		nifav = nifav + ifav[i]+">";		}	newbuf = replacetext(nifav, '>>','>');	setCookie("BUF",newbuf);	setCookie("gallery_mod","1"); // Reed College Modification.	reload();    }}// replace textfunction replacetext(string,text,by) {	var strLength = string.length, txtLength = text.length;	    if ((strLength == 0) || (txtLength == 0))     return string;    var i = string.indexOf(text);        if ((!i) && (text != string.substring(0,txtLength)))     return string;        if (i == -1)     return string;    var newstr = string.substring(0,i) + by;    if (i+txtLength < strLength)	newstr += replacetext(string.substring(i+txtLength,strLength),text,by);    return newstr;}// hide showfunction showob(object) {	if (document.getElementById){	myObject = eval(document.getElementById('' + object + ''));		if(myObject){		myObject.style.visibility = 'visible';		}	}	    else if (document.layers) {		if (document.layers[object] != null) 		document.layers[object].visibility = 'visible';    	}    	    else if (document.all)	document.all[object].style.visibility = 'visible';}function hideob(object) {	if (document.getElementById){	myObject = eval(document.getElementById('' + object + ''));		if(myObject){		myObject.style.visibility = 'hidden';		}	}	    else if (document.layers) {        if (document.layers[object] != null)         document.layers[object].visibility = 'hidden';    }        else if (document.all)	document.all[object].style.visibility = 'hidden';}// global blank initfunction init(){}function StatusOff(id) {	if (document.getElementById){		myObject = eval(document.getElementById('' + id + ''));		if(myObject){		myObject.style.color = button_font_color;		}	}	     if (document.all) {		document.all[id].style.color = button_font_color;    }}function StatusOn(id) {	if (document.getElementById){		myObject = eval(document.getElementById('' + id + ''));		if(myObject){		myObject.style.color = status_off;		}	}	     if (document.all) {		document.all[id].style.color = status_off;    }}function changeColor(num) {	for (n = 1; n < totalitems; n = n+1) {		if (n == num){		eval(document.links.item + n + '.style.color="'+(status_on)+'"');		}		else{		eval(document.links.item + n + '.style.color="'+(status_off)+'"');		}	}	return true;}function changeClass(id, newClass) {var thisob = '';	if(document.getElementById){	thisob = document.getElementById(''+id+'');		if(thisob){		thisob.className = newClass;		}	}}// table highlighterfunction setPointer(field, action, defaultColor, pointerColor, markColor) {var newColorvar currentColorcurrentColor=field.style.backgroundColor;if (action == 'over' && currentColor.toLowerCase() == defaultColor.toLowerCase()) {newColor=pointerColor; }if (action == 'out' && currentColor.toLowerCase() == pointerColor.toLowerCase()) {newColor=defaultColor; }if (newColor) {field.style.backgroundColor=newColor; }}function isStatus(){	var numChecked = 0;	var theForm = document.searchResultsForm;  	for (i=0; i<theForm.elements.length; i++) {    if (theForm.elements[i].type == 'checkbox' && theForm.elements[i].checked) numChecked++;  	}  	  		if(numChecked != 0){  		changeClass('adfav[1]', 'submenu');  		changeClass('adfav[2]', 'submenu');  		}  			else{		changeClass('adfav[1]', 'offstatus');		changeClass('adfav[2]', 'offstatus');		}}// maximize browser windowfunction maximizeWindow(){window.moveTo(0,0);window.resizeTo(screen.availWidth,screen.availHeight);}// minimixe browser windowfunction minimizeWindow(){	if(screen.availWidth > 800 && screen.availHeight > 600){	window.moveTo(0,0);	window.resizeTo('796','596');	}}// determine browser widthfunction getBrowserWidth(){var myWidth = 0, myHeight = 0;	if( typeof(window.innerWidth ) == 'number'){	myWidth = window.innerWidth; myHeight = window.innerHeight;	}	else if(document.documentElement && (document.documentElement.clientWidth ||document.documentElement.clientHeight)){	myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight;	}	else if(document.body && (document.body.clientWidth || document.body.clientHeight)){	myWidth = document.body.clientWidth; myHeight = document.body.clientHeight;	}	setWidth = (pad_height)-0;		return myWidth-setWidth;}// determine browser heightfunction getBrowserHeight(){var url = top.parent.location.href;var menuheight = 20;var setHeight = (head_height+pad_height)-0;(isFirefox)?menuheight = menuheight*1.15:0;(isNetscape)?menuheight = menuheight*1.15:0;(isMac && isSafari)?menuheight = menuheight*1.14:0;(isMac && isFirefox)?menuheight = menuheight*1.04:0;(isMac && isSafari)?setHeight = setHeight*1.01:0;(isMac && isFirefox)?setHeight = setHeight*1.01:0;(isMac && isNetscape)?setHeight = setHeight*1.04:0;var myWidth = 0, myHeight = 0;	if( typeof(window.innerWidth) == 'number' ){	myWidth = window.innerWidth; myHeight = window.innerHeight;	} 	else if(document.documentElement && (document.documentElement.clientWidth ||document.documentElement.clientHeight)){	myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight;	} 	else if(document.body && (document.body.clientWidth || document.body.clientHeight)){	myWidth = document.body.clientWidth; myHeight = document.body.clientHeight;	}		if(bot_menu){	myHeight = myHeight-(menuheight+setHeight);	} else {	myHeight = myHeight-setHeight;	}		if((url.indexOf("slideshow.php") != -1) || (url.indexOf("compare.php") != -1) || (url.indexOf("page_text.php") != -1) || (url.indexOf("side_side.php") != -1)){	myHeight = myHeight+(head_height-87);	}	return myHeight	}// reload page after resize to correct iframe sizefunction reload(){	if(url.indexOf("document.php") != -1){	querystr = unescape(top.parent.right.location.search);		if(querystr.indexOf("CISOPAGE")!=-1){		pageNum = extVar('CISOPAGE',querystr);			for(j=0; j<List_menu.length; j++){				if(List_menu[j][2].indexOf("CISOPAGE="+pageNum) > -1){				showNum = extVar('CISOSHOW',List_menu[j][2]);				break;				}			}		querystr = querystr.replace(/&CISOSHOW=\d*/g,'');		querystr = querystr.replace(/&CISOBOX=\d*/g,'');		parent.location.replace('document.php'+querystr+'&CISOSHOW='+showNum);		} else {		PageCisoRoot();		querystr = unescape(top.location.search);		querystr = querystr.replace(/&CISOSHOW=\d*/g,'');		parent.location.replace('document.php'+querystr+'&CISOSHOW='+PageCisOptr());		}	} else {		if(isSafari){		location.replace(location.href.replace(/#/,'?')); // a hack, but it works.		} else {		parent.location.reload(true);		}	}}// change bgColor of my favorites locallyfunction setBgColour(bgCol,txCol,lkCol,page){	if(!cookieEnabled){	alert(error_cookies);	} else {			switch(page){			case "compare":				document.bgColor = bgCol;		parent.left.document.bgColor = bgCol;		parent.right.document.bgColor = bgCol;				break;		case "slide":				document.bgColor = bgCol;		parent.slideframe.document.bgColor = bgCol;				break;				}	document.cookie="sessionBgColor="+(bgCol+"&"+txCol+"&"+lkCol)+"path=/";		}		}// set preferences cookiefunction setPrefs(which,val){	if(!cookieEnabled){	alert(error_cookies);	} else {	setCookie(which,val);	alert(prefs_saved);	}}// set my favorites bgColorfunction getBg(page){sessionBgColor = getCookie("sessionBgColor");favPrefsBgColor = getCookie('favPrefs');	if (sessionBgColor != null) {	sessionBgColor = sessionBgColor.split('&');	bgCol = sessionBgColor[0];	}	else if (favPrefsBgColor != null){	favPrefs = favPrefsBgColor.split('&');	bgCol = favPrefs[0];	}else{	bgCol = page_bgColor;	}	switch(page){		case "compare":			parent.left.document.bgColor = bgCol;	parent.right.document.bgColor = bgCol;			break;	case "view":		document.bgColor = bgCol;	break;		case "slide":		parent.slideframe.document.bgColor = bgCol;	break;		}}function trim(str) {     if(str.substring(0,1) == " "){    str = str.substring(1, str.length);    }    if(str.substring(str.length-1,str.length) == " "){    str = str.substring(0, str.length-1);    }return str;} // variable extractorfunction extVar(v,str){var vars = str.split("&");	for (var i=0;i<vars.length;i++) {	var pair = vars[i].split("=");		if (pair[0] == v) {		return pair[1];  		}  	}  } // detect plugin (mac)function isPlugin(p){var isP = false;	if(navigator.plugins && navigator.plugins.length > 0){	var pl = navigator.plugins.length;		for (i=0; i < pl;i++){	    var n = 0;	    	for(k=0; k < p.length; k++){	    		if((navigator.plugins[i].name.indexOf(p[k]) >= 0) || (navigator.plugins[i].description.indexOf(p[k]) >= 0)){				n++;				}			}			if(n == p.length) {			isP = true;			break;	    	}		}    }return isP;}//-->