portal_url = "http://animaldiversity.ummz.umich.edu/site";
// popup the glossary entry
function glossPopup(base_url) {
if ( base_url == null ) {
return false;
}
var windowprops = "top=0,left=0,toolbar=0,location=0,directories=0,status=yes,menubar=0,scrollbars=yes,resizable=yes,width=320,height=320";
window.open("http://animaldiversity.ummz.umich.edu/site/glossary/popup/" + base_url + ".html", "glossary", windowprops);
return false;
}
function popupGloss(base_url) {
return glossPopup(base_url);
}
// scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0
// popup resource
function popupResource(base_url, w, h) {
if ( base_url == null ) {
return false;
}
var windowprops = "top=0,left=0,toolbar=0,location=0,directories=0,status=no,menubar=0,scrollbars=no,resizable=no,width=" + w + ",height=" + h;
window.open(base_url + "?XTHEME=POPUP", "annotation", windowprops);
return false;
}
// popup content
function popupContent(base_url, w, h) {
if ( base_url == null ) {
return false;
}
w = 500;
var windowprops = "top=0,left=0,toolbar=0,location=0,directories=0,status=yes,menubar=0,scrollbars=yes,resizable=yes,width=" + w + ",height=" + h;
window.open(portal_url + "/" + base_url + "?XTHEME=POPUP", "annotation", windowprops);
return false;
}
function previousPageLink() {
if ( document.referrer.indexOf(portal_url) > -1 ) {
referrer_url = document.referrer.substring(portal_url.length + 1);
document_url = document.URL.substring(portal_url.length + 1)
// document.write("
" + referrer_url + "\n" + document_url + "
");
if ( referrer_url.split('/')[0] != document_url.split('/')[0] ) {
document.write("
Previous page");
}
}
}
function statusMessage() {
query = this.location.search.substring(1);
if ( query.length > 0 ) {
params = query.split("&");
for (var i=0; i -1 ) {
pos = params[i].indexOf("=");
value = unescape(params[i].substring(pos + 1));
document.write("" + value + "
");
break;
}
}
}
}
function getcookie(cookiename) {
var cookiestring = "" + document.cookie;
var index1 = cookiestring.indexOf(cookiename);
if ( index1 == -1 || cookiename == "" ) return "";
var index2 = cookiestring.indexOf(';', index1);
if ( index2 == -1 ) index2 = cookiestring.length;
return unescape(cookiestring.substring(index1+cookiename.length+1,index2));
}
function editLink(url) {
// need to check that a Manager bit has been set
// a security detail, but the true authentication will happen in Mousetrap
is_logged_in = 0;
if ( ( getcookie('M2K3_ROLE').indexOf('Manager') > -1 ) && getcookie('__ac') ) is_logged_in = 1;
if ( ( is_logged_in == 1 ) && ( url.length > 0 ) ) {
document.write("Edit");
} else {
document.write("\n");
}
}
function bugTrackerLink() {
// need to check that a Manager bit has been set
// a security detail, but the true authentication will happen in Mousetrap
is_logged_in = 0;
if ( ( getcookie('M2K3_ROLE') == '"Manager"' ) && getcookie('__ac') ) is_logged_in = 1;
if ( is_logged_in == 1 ) {
// document.write(' - Someday');
var dummy = 0;
}
}
var audioWarning = function() {
// find all anchor links
did_scan = true;
var aLinks = document.getElementsByTagName("a");
var numBadAudioLinks = 0;
for(i=0; i -1) || (aHref.indexOf(".au") > -1)) {
numBadAudioLinks++;
}
}
if (numBadAudioLinks > 0) {
var warningE = document.getElementById("audio-warning");
if (warningE == null) {
warningE = document.getElementById("audio-warning-deux");
}
warningE.innerHTML = "You may need to install QuickTime to hear audio.
";
// warningE.className = "visible";
var s = warningE.style;
s["display"] = "block";
}
}
window.onload = function() {
audioWarning();
// rewriteLinks();
// taxonSynonymWarning();
}