function createCookie(d,e,f){if(f){var c=new Date();c.setTime(c.getTime()+(f*24*60*60*1000));var b="; expires="+c.toGMTString()}else{var b=""}if(!readCookie(d)){document.cookie=d+"="+e+b+"; path=/"}}function createnewCookie(d,e,f){if(f){var c=new Date();c.setTime(c.getTime()+(f*24*60*60*1000));var b="; expires="+c.toGMTString()}else{var b=""}document.cookie=d+"="+e+b+"; path=/"}function createUseridCookie(b,c){document.cookie=b+"="+c+"; expires=Sun, 18 Jan 2038 00:00:00 GMT; path=/; domain=.bodc.ac.uk;"}function readCookie(d){var f=d+"=";var b=document.cookie.split(";");for(var e=0;e<b.length;e++){var g=b[e];while(g.charAt(0)==" "){g=g.substring(1,g.length)}if(g.indexOf(f)==0){return g.substring(f.length,g.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;"}function Form_Validator(c){if(document.all||document.getElementByID){c.username.style.background="white";c.password.style.background="white"}var b=c.password.value.match(/\b(^[a-zA-Z0-9]{1,}$)\b/gi);if(c.username.value==""){c.username.focus();if(document.all||document.getElementByID){c.username.style.background="#EBEBEB"}alert("Please enter your username");return false}if((c.password.value=="")||(!b)){c.password.focus();if(document.all||document.getElementByID){c.password.style.background="#EBEBEB"}alert("Please enter your valid password containing only letters and numbers.");return false}disableButton(c.submit);return(true)}function disableButton(b){if(document.all||document.getElementById){b.value="Authenticating";b.disabled=true}else{if(b){b.oldOnClick=b.onclick;b.onclick=null;b.oldValue=b.value;b.value="Authenticating"}}}var p7tbma=new Array();var p7tbmt=new Array();function P7_initTBM(){var m="_f2";var f="_f3";var l,h,r,g,o,u,q,c,b,p,n,s,e,t=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;q=document.getElementById("p7TBM");u=document.getElementById("p7TBMroot");if(!u||!q){return}s=u.getElementsByTagName("A");h=0;for(l=0;l<s.length;l++){p7tbmt[h]=s[l].id;h++;o="p7TBMsub"+s[l].id.replace("p7TBMt","");c=document.getElementById(o);if(c){c.onmouseover=function(){P7_TBMsub(this)}}p7tbmt[h]=(c)?c.id:false;s[l].hasSub=p7tbmt[h];h++;s[l].isRoot=true;s[l].onclick=function(){return P7_TBMtrig(this)};s[l].onmouseover=function(){P7_TBMovr(this)};s[l].p7state=0;s[l].hasIm=false;b=s[l].getElementsByTagName("IMG");if(b&&b[0]){p=b[0];n=p.getAttribute("src");r=n.lastIndexOf(".");t[0]=n.substring(0,r);t[1]="."+n.substring(r+1);p.p7mimg=new Array();p.p7mimg[0]=n;if(p7tbma[1]>1){n=t[0]+m+t[1];P7_TBMpl(n)}p.p7mimg[1]=n;if(p7tbma[1]==3){p.p7mimg[2]=n}if(p7tbma[1]==1||p7tbma[1]==2){n=t[0]+f+t[1];P7_TBMpl(n);if(p7tbma[1]==1){p.p7mimg[1]=n}}p.p7mimg[2]=n;p.p7state=0;s[l].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(f){var e,c,b;for(e=0;e<p7tbmt.length;e+=2){b=document.getElementById(p7tbmt[e]);c=b.className;if(p7tbmt[e]!=f.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(g){var e,f,c,b;e=document.getElementById(g);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(g){var e,c,f,b;for(e=0;e<p7tbmt.length;e+=2){if(!g||p7tbmt[e]!=g.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","")}}f=document.getElementById(p7tbmt[e+1]);if(f){f.style.visibility="hidden"}}}}function P7_TBMtrig(b){var e,d,c=false;P7_TBMdown(b);e=b.href;d="javascript:; javascript:void(0)";if(p7tbma[3]==1){if(e.charAt(e.length-1)=="#"||document.location.href==e){c=false}else{c=(d.indexOf(e)>-1)?false:true}}else{c=false}return c}function P7_TBMdown(d){var e,f,c,b;for(e=0;e<p7tbmt.length;e+=2){f=document.getElementById(p7tbmt[e]);f.p7state=0;f.className=P7_trim(f.className.replace("p7TBMdown",""));if(f.hasIm){c=f.getElementsByTagName("IMG")[0];c.p7state=0}}d.p7state=2;if(d.hasIm){c=d.getElementsByTagName("IMG")[0];c.p7state=2;c.src=c.p7mimg[2]}else{b=d.className;d.className=(b&&b.length>0)?b+" p7TBMdown":"p7TBMdown"}P7_TBMshow(d.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 r,m,l,g,c,n,f,s,d,t,q,h,o,e,p;n=window.location.href;var b=new Array(1,"","");if(document.p7TBMop){b=document.p7TBMop}o=b[0];if(o<1){return}e=/index\.[\S]*/i;g=-1,c=-1;f=document.getElementById("p7TBM");s=f.getElementsByTagName("A");for(l=0;l<s.length;l++){p=s[l].href.replace(e,"");if(o>0){if(s[l].href==n||p==n){g=l;c=-1;break}}if(o==2){if(s[l].firstChild){if(s[l].firstChild.nodeValue==b[1]){c=l}}}if(o==3&&s[l].href.indexOf(b[1])>-1){c=l}if(o==4){for(r=1;r<b.length;r+=2){if(n.indexOf(b[r])>-1){if(s[l].firstChild&&s[l].firstChild.nodeValue){if(s[l].firstChild.nodeValue==b[r+1]){c=l}}}}}}g=(c>g)?c:g;if(g>-1){q=false;if(!s[g].hasIm&&!s[g].isRoot){t=s[g].className;s[g].className=(t&&t.length>0)?t+" p7TBMmark":"p7TBMmark"}d=s[g].parentNode;while(d){if(d.id&&d.id=="p7TBMroot"){q=s[g];break}if(d.id&&d.id.indexOf("p7TBMsub")>-1){h="p7TBMt"+d.id.replace("p7TBMsub","");q=document.getElementById(h);break}d=d.parentNode}if(q){P7_TBMdown(q)}}}var Pushup={Version:"1.0.3",options:{appearDelay:0.5,fadeDelay:6,images:"/images/icons/",message:"Important browser update available",reminder:{hours:24,message:"Remind me again in #{hours}"},skip:true},updateLinks:{IE:"http://www.microsoft.com/windows/downloads/ie/",Firefox:"http://www.getfirefox.com",Safari:"http://www.apple.com/safari/download/",Opera:"http://www.opera.com/download/"},Browser:{IE:!!(window.attachEvent&&navigator.userAgent.indexOf("Opera")===-1),Firefox:navigator.userAgent.indexOf("Firefox")>-1,Safari:navigator.userAgent.indexOf("AppleWebKit/")>-1&&/Apple/.test(navigator.vendor),Opera:navigator.userAgent.indexOf("Opera")>-1}};Pushup.conditions={IE:(function(c){var b=/MSIE ([\d.]+)/.exec(c);return b&&parseFloat(b[1])<7})(navigator.userAgent),Firefox:Pushup.Browser.Firefox&&parseFloat(navigator.userAgent.match(/Firefox[\/\s](\d+)/)[1])<3,Safari:Pushup.Browser.Safari&&parseFloat(navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1])<500,Opera:Pushup.Browser.Opera&&(!window.opera.version||parseFloat(window.opera.version())<9.5)};(function(){for(var f in Pushup.Browser){if(Pushup.Browser[f]){Pushup._browserUsed=f}}Pushup._updateBrowser=Pushup.conditions[Pushup._browserUsed]&&Pushup._browserUsed;if(!Pushup._updateBrowser&&Pushup.options.skip){return}function h(j,l){for(var k in l){j[k]=l[k]}return j}h(Pushup,{start:function(){if(/^(https?:\/\/|\/)/.test(this.options.images)){this.images=this.options.images}else{var m=/pushup(?:-[\w\d.]+)?\.js(.*)/,j=document.getElementsByTagName("script");for(var n=0,k=j.length;n<k;n++){var o=j[n];if(o.src&&o.src.match(m)){this.images=o.src.replace(m,"")+this.options.images}}}if(Pushup._updateBrowser){this.show()}},build:function(){this.pushup=document.createElement("div");e.set(this.pushup,0);this.pushup.id="pushup";this.messageLink=this.pushup.appendChild(document.createElement("a"));this.messageLink.className="pushup_messageLink";this.messageLink.target="_blank";this.messageLink.appendChild(this.icon=document.createElement("div"));this.icon.className="pushup_icon";this.messageLink.appendChild(this.message=document.createElement("span"));this.message.className="pushup_message";this.message.innerHTML=this.options.message;var j=this.options.reminder.hours;if(j&&Pushup.cookiesEnabled){this.pushup.appendChild(this.reminder=document.createElement("a"));this.reminder.href="#";this.reminder.className="pushup_reminder";this.pushup.className="withReminder";var k=j+" hour"+(j>1?"s":""),l=this.options.reminder.message.replace("#{hours}",k);this.reminder.innerHTML=l}if(Pushup.Browser.Opera&&(!window.opera.version||parseFloat(window.opera.version())<9.25)){this.messageLink.style.cssFloat="none";this.reminder.style.cssFloat="none"}Pushup.setBrowser(Pushup._updateBrowser);document.body.appendChild(this.pushup);Pushup.addEvents()},addEvents:function(){if(this.reminder){b.add(this.reminder,"click",function(j){b.stop(j);Pushup.setReminder(Pushup.options.reminder.hours);Pushup.fade()})}b.add(this.pushup,"mouseover",Pushup.clearFade);b.add(this.pushup,"mouseout",function(){Pushup.fade({delay:Pushup.options.fadeDelay})})},setBrowser:function(j){j=j||"IE";i(this.icon,this.images+j.toLowerCase()+".png");this.messageLink.href=this.updateLinks[j]},show:function(){var k=typeof arguments[0]=="string"?arguments[0]:Pushup._browserUsed||"IE",j=arguments[k?1:0]||{};if(j.resetReminder){Pushup.resetReminder()}if(!j.ignoreReminder&&Pushup.cookiesEnabled&&c.get("_pushupBlocked")){return}if(!Pushup.pushup){Pushup.build()}e.set(Pushup.pushup,0);Pushup.pushup.style.display="block";if(k){Pushup.setBrowser(k)}this.appear({fadeAfter:true,delay:Pushup.options.appearDelay})},appear:function(k){Pushup.clearFade();var j=arguments[0]||{};return window.setTimeout(function(){d(Pushup.pushup,{afterFinish:function(){if(j.fadeAfter){Pushup.fade({delay:Pushup.options.fadeDelay})}}})},(j.delay||0.01)*1000)},clearFade:function(){if(Pushup._fadeTimer){window.clearTimeout(Pushup._fadeTimer);Pushup._fadeTimer=null}},fade:function(){var j=arguments[0]||{};Pushup._fadeTimer=window.setTimeout(function(){g(Pushup.pushup)},(j.delay||0.01)*1000)},setReminder:function(j){c.set("_pushupBlocked","blocked",{duration:1/24*j})},resetReminder:function(){c.remove("_pushupBlocked")}});var e={set:function(j,k){j.style.opacity=(k==1||k==="")?"":(k<0.00001)?0:k},get:function(k){var j=k.style.opacity;return j?parseFloat(j):1}};if(Pushup.Browser.IE){e.get=function(k){var j=k.style.opacity;if(!j&&k.currentStyle){j=k.currentStyle[j]}if(j=(k.style.filter||"").match(/alpha\(opacity=(.*)\)/)){if(j[1]){return parseFloat(j[1])/100}}return 1};e.set=function(k,n){function o(p){return p.replace(/alpha\([^\)]*\)/gi,"")}var j=k.currentStyle;if((j&&!j.hasLayout)||(!j&&k.style.zoom=="normal")){k.style.zoom=1}var m=k.style.filter,l=k.style;if(n==1||n===""){(m=o(m))?l.filter=m:l.filter=""}else{l.filter=o(m)+"alpha(opacity="+(n*100)+")"}}}function d(k){var l=e.get(k),j=arguments[1]||{};if(k.style.display!="block"){k.style.display="block"}if(l<1){setTimeout(function(){e.set(k,l+=0.05);d(k,j)},0.01)}else{if(Pushup.Browser.IE&&k.style.filter){k.style.removeAttribute("filter")}if(j.afterFinish){j.afterFinish.call()}}}function g(k){var l=e.get(k),j=arguments[1]||{};if(l>0){setTimeout(function(){e.set(k,l-=0.05);g(k,j)},0.01)}else{k.style.display="none";if(j.afterFinish){j.afterFinish.call()}}}function i(l,k){var j=h({align:"top left",repeat:"no-repeat",sizingMethod:"crop",backgroundColor:""},arguments[2]||{});h(l.style,arguments.callee.IEBelow7?{filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+k+"'', sizingMethod='"+j.sizingMethod+"')"}:{background:j.backgroundColor+" url("+k+") "+j.align+" "+j.repeat})}i.IEBelow7=Pushup.Browser.IE&&parseFloat(/MSIE ([\d.]+)/.exec(navigator.userAgent)[1])<7;var c={set:function(m,n){var j="",l=arguments[2]||{};if(l.duration){var k=new Date();k.setTime(k.getTime()+l.duration*1000*60*60*24);n+="; expires="+k.toGMTString()}document.cookie=m+"="+n+j+"; path=/"},remove:function(j){this.set(j,"",-1)},get:function(k){var n=document.cookie.split(";"),o=k+"=";for(var m=0,j=n.length;m<j;m++){var p=n[m];while(p.charAt(0)==" "){p=p.substring(1,p.length)}if(p.indexOf(o)==0){return p.substring(o.length,p.length)}}return null}};Pushup.cookiesEnabled=(function(j){if(c.get(j)){return true}c.set(j,"test",{duration:15});return c.get(j)})("_pushupCookiesEnabled");var b={add:function(l,k,j){if(l.attachEvent){l["e"+k+j]=j;l[k+j]=function(){l["e"+k+j](window.event)};l.attachEvent("on"+k,l[k+j])}else{l.addEventListener(k,j,false)}},stop:function(j){if(Pushup.Browser.IE){j.cancelBubble=true;j.returnValue=false}else{j.preventDefault();j.stopPropagation()}}};b.add(window,"load",function(){Pushup.start()})})();
