function MM_findObj(k,g){var e,c,b;if(!g){g=document}if((e=k.indexOf("?"))>0&&parent.frames.length){g=parent.frames[k.substring(e+1)].document;k=k.substring(0,e)}if(!(b=g[k])&&g.all){b=g.all[k]}for(c=0;!b&&c<g.forms.length;c++){b=g.forms[c][k]}for(c=0;!b&&g.layers&&c<g.layers.length;c++){b=MM_findObj(k,g.layers[c].document)}if(!b&&g.getElementById){b=g.getElementById(k)}return b}function MM_swapImage(){var g,e=0,b,c=MM_swapImage.arguments;document.MM_sr=new Array;for(g=0;g<(c.length-2);g+=3){if((b=MM_findObj(c[g]))!=null){document.MM_sr[e++]=b;if(!b.oSrc){b.oSrc=b.src}b.src=c[g+2]}}}function MM_swapImgRestore(){var e,b,c=document.MM_sr;for(e=0;c&&e<c.length&&(b=c[e])&&b.oSrc;e++){b.src=b.oSrc}}function dd_StatusBarMsg(b){window.status=b;document.MM_returnValue=true}function dd_StatusBarMsgClear(b){window.status=b;document.MM_returnValue=true}function MM_preloadImages(){var g=document;if(g.images){if(!g.MM_p){g.MM_p=new Array()}var e,c=g.MM_p.length,b=MM_preloadImages.arguments;for(e=0;e<b.length;e++){if(b[e].indexOf("#")!=0){g.MM_p[c]=new Image;g.MM_p[c++].src=b[e]}}}}function setCookie(c,g,l,n){var k=c+"="+escape(g);if(l!=null){var b=new Date();var e=new Date();e.setTime(b.getTime()+1000*60*60*24*l);k+="; expires="+e.toGMTString()}if(n!=null){k+="; PATH="+n}document.cookie=k;return null}function setDatedCookie(c,e,b,k){var g=c+"="+escape(e)+((b==null)?"":("; expires="+b.toGMTString()));if(k!=null){g+="; PATH="+k}document.cookie=g;return null}function getCookie(c){var e=c+"=";var g=document.cookie;var b=null;if(g.length>0){offset=g.indexOf(e);if(offset!=-1){offset+=e.length;end=g.indexOf(";",offset);if(end==-1){end=g.length}b=unescape(g.substring(offset,end))}}return b}function deleteCookie(b,c){setCookie(b,"Deleted",-1,c)}function Div_hide(c){var b=document.getElementsByTagName("div");for(i=0;i<b.length;i++){if(b[i].id.match(c)){if(document.getElementById){b[i].style.display="none"}else{if(document.layers){document.layers[b[i]].display="none"}else{document.all.hideShow.divs[i].display="none"}}}}}function Div_show(c){var b=document.getElementsByTagName("div");for(i=0;i<b.length;i++){if(b[i].id.match(c)){if(document.getElementById){b[i].style.display="block"}else{if(document.layers){document.layers[b[i]].display="block"}else{document.all.hideShow.divs[i].display="block"}}}}}function dd_StatusBarMsg(b){window.status=b;document.MM_returnValue=true}function dd_StatusBarMsgClear(b){window.status=b;document.MM_returnValue=true}function mOver(){self.status="Click here now to visit this external site";return true}function mOut(){self.status="";return true}function createCookie(e,g,k){if(k){var c=new Date();c.setTime(c.getTime()+(k*24*60*60*1000));var b="; expires="+c.toGMTString()}else{var b=""}if(!readCookie(e)){document.cookie=e+"="+g+b+"; path=/"}}function createnewCookie(e,g,k){if(k){var c=new Date();c.setTime(c.getTime()+(k*24*60*60*1000));var b="; expires="+c.toGMTString()}else{var b=""}document.cookie=e+"="+g+b+"; path=/"}function readCookie(e){var k=e+"=";var b=document.cookie.split(";");for(var g=0;g<b.length;g++){var l=b[g];while(l.charAt(0)==" "){l=l.substring(1,l.length)}if(l.indexOf(k)==0){return l.substring(k.length,l.length)}}return null}function eraseCookie(b){createCookie(b,"",-1)}rnd.today=new Date();rnd.seed=rnd.today.getTime();function rnd(){rnd.seed=(rnd.seed*9301+49297)%233280;return rnd.seed/(233280)}function rand(b){return Math.ceil(rnd()*b)}var refer=document.referrer;createnewCookie("referer",refer,0);doc=document.location;createnewCookie("document",doc,0);tid=new Date();timeid=tid.getTime();if(!readCookie("sessionid")){createCookie("sessionid",timeid,0)}if(readCookie("userid")){var myuserid=readCookie("userid");if(myuserid.length<14){eraseCookie("userid")}}if(readCookie("__utmv")){var myutmv=readCookie("__utmv");if(myutmv.length<24){eraseCookie("__utmv")}}if(!readCookie("__utmv")&&readCookie("userid")){var myuserid=readCookie("userid");document.cookie="__utmv=174674225."+myuserid+"; expires=Sun, 18 Jan 2038 00:00:00 GMT; path=/; domain=.bodc.ac.uk;"}var p7tbma=new Array();var p7tbmt=new Array();function P7_initTBM(){var q="_f2";var g="_f3";var o,n,w,l,s,A,v,c,b,u,r,y,e,z=new Array();document.p7tbmsw=new Array();p7tbma=arguments;if(!document.getElementById||document.p7tbmf){return}tb=document.getElementById("p7TBM");if(!tb){return}tb.onmouseout=P7_TBMclose;v=document.getElementById("p7TBM");A=document.getElementById("p7TBMroot");if(!A||!v){return}y=A.getElementsByTagName("A");n=0;for(o=0;o<y.length;o++){p7tbmt[n]=y[o].id;n++;s="p7TBMsub"+y[o].id.replace("p7TBMt","");c=document.getElementById(s);if(c){c.onmouseover=function(){P7_TBMsub(this)}}p7tbmt[n]=(c)?c.id:false;y[o].hasSub=p7tbmt[n];n++;y[o].isRoot=true;y[o].onclick=function(){return P7_TBMtrig(this)};y[o].onmouseover=function(){P7_TBMovr(this)};y[o].p7state=0;y[o].hasIm=false;b=y[o].getElementsByTagName("IMG");if(b&&b[0]){u=b[0];r=u.getAttribute("src");w=r.lastIndexOf(".");z[0]=r.substring(0,w);z[1]="."+r.substring(w+1);u.p7mimg=new Array();u.p7mimg[0]=r;if(p7tbma[1]>1){r=z[0]+q+z[1];P7_TBMpl(r)}u.p7mimg[1]=r;if(p7tbma[1]==3){u.p7mimg[2]=r}if(p7tbma[1]==1||p7tbma[1]==2){r=z[0]+g+z[1];P7_TBMpl(r);if(p7tbma[1]==1){u.p7mimg[1]=r}}u.p7mimg[2]=r;u.p7state=0;y[o].hasIm=true}}document.p7tbmf=true;P7_TBMopen()}function P7_TBMpl(c){var b=document.p7tbmsw.length;document.p7tbmsw[b]=new Image();document.p7tbmsw[b].src=c}function P7_TBMovr(b){if(!document.p7tbmf){return}if(document.p7TBMtm){clearTimeout(document.p7TBMtm)}P7_TBMswp(b);if(p7tbma[0]==1){document.p7TBMtm=setTimeout("P7_TBMshow('"+b.id+"')",p7tbma[4])}else{P7_TBMshow(b.id)}}function P7_TBMswp(g){var e,c,b;for(e=0;e<p7tbmt.length;e+=2){b=document.getElementById(p7tbmt[e]);c=b.className;if(p7tbmt[e]!=g.id){if(b.p7state<2){if(c.indexOf("p7TBMon")>-1){b.className=c.replace("p7TBMon","")}if(b.hasIm){im=b.getElementsByTagName("IMG")[0];if(im.p7state<2){im.src=im.p7mimg[0]}}}}else{if(b.p7state!=2){if(c.indexOf("p7TBMon")==-1){b.className=(c&&c.length>0)?c+" p7TBMon":"p7TBMon"}if(b.hasIm){im=b.getElementsByTagName("IMG")[0];if(im.p7state<2){im.src=im.p7mimg[1]}}}}}}function P7_TBMshow(k){var e,g,c,b;e=document.getElementById(k);if(e.hasIm){c=e.getElementsByTagName("IMG")[0];if(c.p7state==0){c.src=c.p7mimg[1];c.p7state=1}}if(e.hasSub){if(e.p7state!=2){e.p7state=1;b=e.className;if(b.indexOf("p7TBMon")==-1){e.className=(b&&b.length>0)?b+" p7TBMon":"p7TBMon"}}document.getElementById(e.hasSub).style.visibility="visible"}P7_TBMtg(e)}function P7_TBMtg(k){var e,c,g,b;for(e=0;e<p7tbmt.length;e+=2){if(!k||p7tbmt[e]!=k.id){a=document.getElementById(p7tbmt[e]);if(a.hasIm){c=a.getElementsByTagName("IMG")[0];if(c.p7state<2){c.src=c.p7mimg[0];c.p7state=0}}if(a.p7state!=2){a.p7state=0;b=a.className;if(b.indexOf("p7TBMon")>-1){a.className=b.replace("p7TBMon","")}}g=document.getElementById(p7tbmt[e+1]);if(g){g.style.visibility="hidden"}}}}function P7_TBMtrig(b){var g,e,c=false;P7_TBMdown(b);g=b.href;e="javascript:; javascript:void(0)";if(p7tbma[3]==1){if(g.charAt(g.length-1)=="#"||document.location.href==g){c=false}else{c=(e.indexOf(g)>-1)?false:true}}else{c=false}return c}function P7_TBMdown(e){var g,k,c,b;for(g=0;g<p7tbmt.length;g+=2){k=document.getElementById(p7tbmt[g]);k.p7state=0;k.className=P7_trim(k.className.replace("p7TBMdown",""));if(k.hasIm){c=k.getElementsByTagName("IMG")[0];c.p7state=0}}e.p7state=2;if(e.hasIm){c=e.getElementsByTagName("IMG")[0];c.p7state=2;c.src=c.p7mimg[2]}else{b=e.className;e.className=(b&&b.length>0)?b+" p7TBMdown":"p7TBMdown"}P7_TBMshow(e.id)}function P7_trim(b){b=b.replace(/^\s/,"");b=b.replace(/\s$/,"");return b}function P7_TBMclose(evt){var i,pp,tS,d,p,f,m=true;evt=(evt)?evt:((event)?event:null);if(evt){tS=(evt.relatedTarget)?evt.relatedTarget:evt.toElement;if(tS){pp=tS;while(pp){if(pp.id){d=pp.id;if(pp.id.indexOf("p7TBM")>-1){m=false;break}}pp=pp.parentNode}if(m){f="P7_TBMtg()";if(p7tbma[2]==1){for(i=0;i<p7tbmt.length;i+=2){p=document.getElementById(p7tbmt[i]);if(p.p7state==2){f="P7_TBMshow('"+p.id+"')"}}}if(p7tbma[0]==1){eval('document.p7TBMtm=setTimeout("'+f+'",'+parseInt(p7tbma[4]+50)+")")}else{eval(f)}}}}}function P7_TBMsub(c){if(document.p7TBMtm){clearTimeout(document.p7TBMtm)}var e=c.id.replace("p7TBMsub","p7TBMt"),b=document.getElementById(e);P7_TBMswp(b)}function P7_TBMmark(){document.p7TBMop=arguments}function P7_TBMopen(){var y,r,q,n,c,s,l,z,e,A,w,o,u,g,v;s=window.location.href;var b=new Array(1,"","");if(document.p7TBMop){b=document.p7TBMop}u=b[0];if(u<1){return}g=/index\.[\S]*/i;n=-1,c=-1;l=document.getElementById("p7TBM");z=l.getElementsByTagName("A");for(q=0;q<z.length;q++){v=z[q].href.replace(g,"");if(u>0){if(z[q].href==s||v==s){n=q;c=-1;break}}if(u==2){if(z[q].firstChild){if(z[q].firstChild.nodeValue==b[1]){c=q}}}if(u==3&&z[q].href.indexOf(b[1])>-1){c=q}if(u==4){for(y=1;y<b.length;y+=2){if(s.indexOf(b[y])>-1){if(z[q].firstChild&&z[q].firstChild.nodeValue){if(z[q].firstChild.nodeValue==b[y+1]){c=q}}}}}}n=(c>n)?c:n;if(n>-1){w=false;if(!z[n].hasIm&&!z[n].isRoot){A=z[n].className;z[n].className=(A&&A.length>0)?A+" p7TBMmark":"p7TBMmark"}e=z[n].parentNode;while(e){if(e.id&&e.id=="p7TBMroot"){w=z[n];break}if(e.id&&e.id.indexOf("p7TBMsub")>-1){o="p7TBMt"+e.id.replace("p7TBMsub","");w=document.getElementById(o);break}e=e.parentNode}if(w){P7_TBMdown(w)}}}var p7fbma=new Array();var p7fbmt=new Array();function P7_initFBM(){var q="_f2";var g="_f3";var o,n,w,l,s,A,v,c,b,u,r,y,e,z=new Array();document.p7fbmsw=new Array();p7fbma=arguments;if(!document.getElementById||document.p7fbmf){return}tb=document.getElementById("p7FBM");if(!tb){return}tb.onmouseout=P7_FBMclose;v=document.getElementById("p7FBM");A=document.getElementById("p7FBMroot");if(!A||!v){return}y=A.getElementsByTagName("A");n=0;for(o=0;o<y.length;o++){p7fbmt[n]=y[o].id;n++;s="p7FBMsub"+y[o].id.replace("p7FBMt","");c=document.getElementById(s);if(c){c.onmouseover=function(){P7_FBMsub(this)}}p7fbmt[n]=(c)?c.id:false;y[o].hasSub=p7fbmt[n];n++;y[o].isRoot=true;y[o].onclick=function(){return P7_FBMtrig(this)};y[o].onmouseover=function(){P7_FBMovr(this)};y[o].p7state=0;y[o].hasIm=false;b=y[o].getElementsByTagName("IMG");if(b&&b[0]){u=b[0];r=u.getAttribute("src");w=r.lastIndexOf(".");z[0]=r.substring(0,w);z[1]="."+r.substring(w+1);u.p7mimg=new Array();u.p7mimg[0]=r;if(p7fbma[1]>1){r=z[0]+q+z[1];P7_FBMpl(r)}u.p7mimg[1]=r;if(p7fbma[1]==3){u.p7mimg[2]=r}if(p7fbma[1]==1||p7fbma[1]==2){r=z[0]+g+z[1];P7_FBMpl(r);if(p7fbma[1]==1){u.p7mimg[1]=r}}u.p7mimg[2]=r;u.p7state=0;y[o].hasIm=true}}document.p7fbmf=true;P7_FBMopen()}function P7_FBMpl(c){var b=document.p7fbmsw.length;document.p7fbmsw[b]=new Image();document.p7fbmsw[b].src=c}function P7_FBMovr(b){if(!document.p7fbmf){return}if(document.p7FBMtm){clearTimeout(document.p7FBMtm)}P7_FBMswp(b);if(p7fbma[0]==1){document.p7FBMtm=setTimeout("P7_FBMshow('"+b.id+"')",p7fbma[4])}else{P7_FBMshow(b.id)}}function P7_FBMswp(g){var e,c,b;for(e=0;e<p7fbmt.length;e+=2){b=document.getElementById(p7fbmt[e]);c=b.className;if(p7fbmt[e]!=g.id){if(b.p7state<2){if(c.indexOf("p7FBMon")>-1){b.className=c.replace("p7FBMon","")}if(b.hasIm){im=b.getElementsByTagName("IMG")[0];if(im.p7state<2){im.src=im.p7mimg[0]}}}}else{if(b.p7state!=2){if(c.indexOf("p7FBMon")==-1){b.className=(c&&c.length>0)?c+" p7FBMon":"p7FBMon"}if(b.hasIm){im=b.getElementsByTagName("IMG")[0];if(im.p7state<2){im.src=im.p7mimg[1]}}}}}}function P7_FBMshow(k){var e,g,c,b;e=document.getElementById(k);if(e.hasIm){c=e.getElementsByTagName("IMG")[0];if(c.p7state==0){c.src=c.p7mimg[1];c.p7state=1}}if(e.hasSub){if(e.p7state!=2){e.p7state=1;b=e.className;if(b.indexOf("p7FBMon")==-1){e.className=(b&&b.length>0)?b+" p7FBMon":"p7FBMon"}}document.getElementById(e.hasSub).style.visibility="visible"}P7_FBMtg(e)}function P7_FBMtg(k){var e,c,g,b;for(e=0;e<p7fbmt.length;e+=2){if(!k||p7fbmt[e]!=k.id){a=document.getElementById(p7fbmt[e]);if(a.hasIm){c=a.getElementsByTagName("IMG")[0];if(c.p7state<2){c.src=c.p7mimg[0];c.p7state=0}}if(a.p7state!=2){a.p7state=0;b=a.className;if(b.indexOf("p7FBMon")>-1){a.className=b.replace("p7FBMon","")}}g=document.getElementById(p7fbmt[e+1]);if(g){g.style.visibility="hidden"}}}}function P7_FBMtrig(b){var g,e,c=false;P7_FBMdown(b);g=b.href;e="javascript:; javascript:void(0)";if(p7fbma[3]==1){if(g.charAt(g.length-1)=="#"||document.location.href==g){c=false}else{c=(e.indexOf(g)>-1)?false:true}}else{c=false}return c}function P7_FBMdown(e){var g,k,c,b;for(g=0;g<p7fbmt.length;g+=2){k=document.getElementById(p7fbmt[g]);k.p7state=0;k.className=P7_trim(k.className.replace("p7FBMdown",""));if(k.hasIm){c=k.getElementsByTagName("IMG")[0];c.p7state=0}}e.p7state=2;if(e.hasIm){c=e.getElementsByTagName("IMG")[0];c.p7state=2;c.src=c.p7mimg[2]}else{b=e.className;e.className=(b&&b.length>0)?b+" p7FBMdown":"p7FBMdown"}P7_FBMshow(e.id)}function P7_trim(b){b=b.replace(/^\s/,"");b=b.replace(/\s$/,"");return b}function P7_FBMclose(evt){var i,pp,tS,d,p,f,m=true;evt=(evt)?evt:((event)?event:null);if(evt){tS=(evt.relatedTarget)?evt.relatedTarget:evt.toElement;if(tS){pp=tS;while(pp){if(pp.id){d=pp.id;if(pp.id.indexOf("p7FBM")>-1){m=false;break}}pp=pp.parentNode}if(m){f="P7_FBMtg()";if(p7fbma[2]==1){for(i=0;i<p7fbmt.length;i+=2){p=document.getElementById(p7fbmt[i]);if(p.p7state==2){f="P7_FBMshow('"+p.id+"')"}}}if(p7fbma[0]==1){eval('document.p7FBMtm=setTimeout("'+f+'",'+parseInt(p7fbma[4]+50)+")")}else{eval(f)}}}}}function P7_FBMsub(c){if(document.p7FBMtm){clearTimeout(document.p7FBMtm)}var e=c.id.replace("p7FBMsub","p7FBMt"),b=document.getElementById(e);P7_FBMswp(b)}function P7_FBMmark(){document.p7FBMop=arguments}function P7_FBMopen(){var y,r,q,n,c,s,l,z,e,A,w,o,u,g,v;s=window.location.href;var b=new Array(1,"","");if(document.p7FBMop){b=document.p7FBMop}u=b[0];if(u<1){return}g=/index\.[\S]*/i;n=-1,c=-1;l=document.getElementById("p7FBM");z=l.getElementsByTagName("A");for(q=0;q<z.length;q++){v=z[q].href.replace(g,"");if(u>0){if(z[q].href==s||v==s){n=q;c=-1;break}}if(u==2){if(z[q].firstChild){if(z[q].firstChild.nodeValue==b[1]){c=q}}}if(u==3&&z[q].href.indexOf(b[1])>-1){c=q}if(u==4){for(y=1;y<b.length;y+=2){if(s.indexOf(b[y])>-1){if(z[q].firstChild&&z[q].firstChild.nodeValue){if(z[q].firstChild.nodeValue==b[y+1]){c=q}}}}}}n=(c>n)?c:n;if(n>-1){w=false;if(!z[n].hasIm&&!z[n].isRoot){A=z[n].className;z[n].className=(A&&A.length>0)?A+" p7FBMmark":"p7FBMmark"}e=z[n].parentNode;while(e){if(e.id&&e.id=="p7FBMroot"){w=z[n];break}if(e.id&&e.id.indexOf("p7FBMsub")>-1){o="p7FBMt"+e.id.replace("p7FBMsub","");w=document.getElementById(o);break}e=e.parentNode}if(w){P7_FBMdown(w)}}}var fileLoc="/extlink/";function mOver(){self.status="External Link";return true}function mOut(){self.status="";return true}function mLog(g){if(g.hostname=="www.bodc.ac.uk"){var o=g.href.replace(/http:\/\/www.bodc.ac.uk/g,"");o=o.replace(/https:\/\/www.bodc.ac.uk/g,"");_gaq.push(["_setAccount","UA-348926-1"],["_trackPageview",o])}var e=g.href.replace("http://","");var b=e.substring(e.indexOf("/"));var c=location.href;var n=c.replace("http://","");var l=n.substring(n.indexOf("/"));var k=new Image(1,1);k.src="log.gif?document="+b+"&referer="+l;k.onload=function(){Void()};return true}function mExtlink(e){if(e.hostname=="www.bodc.ac.uk"){var c=e.href.replace(/http:\/\/www.bodc.ac.uk/g,"");c=c.replace(/https:\/\/www.bodc.ac.uk/g,"");_gaq.push(["_setAccount","UA-348926-1"],["_trackPageview",c])}var k=e.href.replace("http://","");var b=k.substring(k.indexOf("/"));b=b.replace("/extlink/","");b=b.replace("%3A",":");var g=location.href;var o=g.replace("http://","");var n=o.substring(o.indexOf("/"));var l=new Image(1,1);l.src="log.gif?document="+b+"&referer="+n;l.onload=function(){Void()};return true}function Void(){return}function externallinks(){d=document.links;f="file:";j="javascript:";h="http:";m="mailto:";t="extlinks";p="ftp:";host="www.bodc.ac.uk";for(i=0;i<(d.length);i++){if(d[i].protocol!=f&&d[i].protocol!=j&&d[i].protocol!=m&&d[i].protocol!=p&&(/.pdf/.exec(d[i].href)||/.exe/.exec(d[i].href)||/.txt/.exec(d[i].href)||/.doc/.exec(d[i].href)||/.xls/.exec(d[i].href)||/.ppt/.exec(d[i].href)||/.csv/.exec(d[i].href)||/.kml/.exec(d[i].href)||/.xml/.exec(d[i].href)||/.zip/.exec(d[i].href))){d[i].target="_blank";d[i].onclick=function(){return mLog(this)}}if(d[i].protocol!=f&&d[i].protocol!=j&&d[i].protocol!=m&&d[i].hostname!=document.domain){d[i].onclick=function(){return mExtlink(this)};d[i].title="External link to "+d[i].href;d[i].onmouseover=mOver;d[i].onmouseout=mOut;d[i].href=fileLoc+escape(d[i].href);d[i].target="_blank"}}};
