window.onload=chgImg;window.onresize=chgImg;function chgImg(){var b=document.getElementById("bgimg");var a=2/3;var g=whatSize();var c=g[0]/g[1];b.style.width="100%";b.style.height="100%";b.style.top="0";b.style.left="0";if(c==a){return}else{if(c<a){var e=Math.round(100*(a/c));var f=Math.round(-10000*(3/2)*(a-c))/100;b.style.height=e+"%";b.style.top=f+"%"}else{var e=Math.round(100*(c/a));var f=Math.round(10000*a*(a-c))/100;b.style.width=e+"%";b.style.left=f+"%"}}}function whatSize(){var a=0,b=0;if(typeof(window.innerWidth)=="number"){a=window.innerWidth;b=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){a=document.body.clientWidth;b=document.body.clientHeight}}}return new Array(b,a)};function getElementsByClassName(b,f,a){var e=(f=="*"&&b.all)?b.all:b.getElementsByTagName(f);var h=new Array();a=a.replace(/\-/g,"\\-");var g=new RegExp("(^|\\s)"+a+"(\\s|$)");var d;for(var c=0;c<e.length;c++){d=e[c];if(g.test(d.className)){h.push(d)}}return(h)}function replaceEmails(){var e=getElementsByClassName(document,"span","email");for(var a=0;a<e.length;a++){var c=e[a].childNodes[0].nodeValue;c=c.replace(/ at /,"@");c=c.replace(/ dot /g,".");e[a].childNodes[0].nodeValue="";var b=document.createElement("a");b.href="mailto:"+c;var d=document.createTextNode(c);b.appendChild(d);e[a].appendChild(b)}}window.onload=replaceEmails;