var hum={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12,DEBUG_NONE:0,DEBUG_USE_CONSOLE:1,DEBUG_USE_ALERT:2,DEBUG_ALWAYS_ALERT:6,DEBUG_MESSAGES:0,addClass:function(a,b){if(!hum.hasClass(a,b)){a.className+=a.className?" "+b:b}},addListener:function(d,a,c,b){if(document.addEventListener){d.addEventListener(a,c,b)}else{d.attachEvent("on"+a,c)}},analytics:function(){if(!gaId){return null}gaJsHost=(("https:"==document.location.protocol)?"https://ssl.":"http://www.");hum.loadScript(gaJsHost+"google-analytics.com/ga.js",hum.analyticsLoaded)},analyticsLoaded:function(){if(!gaId){return null}try{var a=_gat._getTracker(gaId);a._setDomainName(BASE_URL.replace(/http:\/\//,"").replace(/\/.*$/,""));a._trackPageview()}catch(b){}},createCookie:function(c,d,e){var b,a;if(e){b=new Date();b.setTime(b.getTime()+(e*24*60*60*1000));a="; expires="+b.toGMTString()}else{a=""}document.cookie=c+"="+d+a+"; path=/"},debugMessage:function(a){if(!hum.DEBUG_MESSAGES){return null}var b=(typeof console!="undefined"&&typeof console.log!="undefined");if(hum.DEBUG_MESSAGES&hum.DEBUG_USE_CONSOLE&b){console.log(a)}if(hum.DEBUG_MESSAGES&hum.DEBUG_USE_ALERT&!b){alert(a)}if(hum.DEBUG_MESSAGES&hum.DEBUG_ALWAYS_ALERT&b){alert(a)}},enableImageSelector:function(){var d,a,c,b;d=document.getElementById("imageselector");if(d){a=d.getElementsByTagName("img");c=new Image();for(b=0;b<a.length;b++){c.src=FILES_URL+"/"+a.item(b).src.match(/([^\\\/]+)$/)[1]}}jQuery("#imageselector img").click(function(){var e,f,g;e=FILES_URL+"/"+this.src.match(/([^\\\/]+)$/)[1];jQuery("#imageviewer img").hide("slow",function(){f=document.getElementById("imageviewer");g=f.getElementsByTagName("img").item(0);g.src=e});jQuery("#imageviewer img").show("slow")})},eraseCookie:function(a){hum.createCookie(a,"",-1)},externalLinks:function(){var b,a;b=document.getElementsByTagName("a");for(a=0;a<b.length;++a){anchor=b[a];if(anchor.getAttribute("href")&&anchor.getAttribute("rel")=="external"){anchor.target="_blank"}}},fileExtension:function(a){return a.substr(a.lastIndexOf(".")+1,a.length)},fileIcon:function(c){var b,a;b=hum.fileExtension(c);switch(b.toLowerCase()){case"jpg":case"jpeg":a="jpeg.jpg";break;case"gif":a="gif.jpg";break;case"png":a="png.jpg";break;case"doc":case"dot":a="doc.jpg";break;case"xls":case"xlm":case"xla":case"xlc":case"xlt":case"xlw":a="xls.jpg";break;case"ppt":case"pps":case"pos":a="ppt.jpg";break;case"pdf":a="pdf.jpg";break;case"tiff":case"tif":a="tiff.jpg";break;case"zip":a="zip.jpg";break;case"gz":a="gz.jpg";break;case"bz":a="bz.jpg";break;case"bz2":a="bz2.jpg";break;case"rtf":a="rtf.jpg";break;case"swf":a="swf.jpg";break;case"psd":a="psd.jpg";break;case"html":case"htm":a="html.jpg";break;default:a="unknown.jpg";break}return a},formSubmissionCheck:function(e,d){var c,h,b,g=[],a,f;c=hum.getElementsByClassName(e,"warning");if(c.length){for(a=0;a<c.length;++a){hum.removeClass(c[a],"warning");c[a].onfocus=null;if(c[a].tagName.toLowerCase()=="input"||c[a].tagName.toLowerCase()=="textarea"&&c[a].value==d){c[a].value=""}}}h=hum.getElementsByClassName(e,"required");if(h){for(a=0;a<h.length;++a){b=h[a].getElementsByTagName("input");if(!b.length){b=h[a].getElementsByTagName("textarea")}if(!b.length){b=h[a].getElementsByTagName("select")}if(b.length){b=b.item(0);if(b.getAttribute("type")=="hidden"||b.getAttribute("type")=="submit"||b.getAttribute("type")=="reset"){continue}g.push(b)}}}for(a=0;a<g.length;++a){if(g[a].tagName.toLowerCase()=="select"){f=g[a].options[g[a].selectedIndex].value}else{f=g[a].value}if(!hum.trim(f)){hum.addClass(g[a],"warning");if(g[a].tagName.toLowerCase()!="select"&&!(g[a].tagName.toLowerCase()=="input"&&g[a].getAttribute("type")=="password")){g[a].value=d}g[a].onfocus=function(){hum.debugMessage("focusing on "+this.tagName);if(this.value==d){this.value=""}hum.removeClass(this,"warning")}}}return(hum.getElementsByClassName(e,"warning").length==0)},getElementsByClassName:function(b,c,a){var l,h=[],k,f,g,e,c,d;if(b&&typeof b.getElementsByClassName!="undefined"){f=b.getElementsByClassName(c);if(!f){hum.debugMessage("hum.getElementsByClassName() nothing found, returning empty array");return h}for(g=0;g<f.length;++g){if(hum.isSafari31()){if(!hum.hasClass(f.item(g),c)){continue}}h[g]=f.item(g)}return h}classnames=c.split(" ");if(a){f=b.getElementsByTagName(a)}else{f=b.all?b.all:b.getElementsByTagName("*")}for(g=0;g<f.length;++g){l=false;if(!f.item(g).className){continue}for(e=0;e<classnames.length;++e){if(f.item(g).className.indexOf(classnames[e])<0){l=true}}if(!l){h.push(f.item(g))}}return h},getKeyCode:function(b){var a;if(b){a=b.which}else{a=window.event.keyCode}return a},hasClass:function(c,b){var a;if(!c){return false}if(typeof b=="string"){b=hum.trim(b.replace(/\s{2,}/g,""));b=b.split(" ")}if(hum.isArray(b)){for(a=0;a<b.length;++a){if(!c.className.match(b[a])){return false}}return true}return false},isArray:function(a){return(a.constructor&&a.constructor==Array)},isIE8:function(){return hum.isIE()&&!!document.querySelector},isIE7:function(){return hum.isIE()&&!!document.documentElement&&typeof document.documentElement.style.maxHeight!="undefined"&&!hum.isIE8()},isIE6:function(){return hum.isIE()&&!!document.compatMode&&!hum.isIE7()&&!hum.isIE8()&&typeof document.createAttribute!="undefined"},isIE:function(){return !!(document.all&&!window.opera)},isMozilla3:function(){return typeof document.getElementsByClassName!="undefined"&&hum.isMozilla()},isMozilla2:function(){return hum.isMozilla()&&!hum.isMozilla3()},isMozilla:function(){return typeof document.getElementsByTagName("script").item(0).contains=="undefined"&&!document.all},isOpera:function(){return !!window.opera},isSafari31:function(){return hum.isSafari3()&&typeof document.getElementsByClassName!="undefined"},isSafari30:function(){return hum.isSafari3()&&!hum.isSafari31()},isSafari3:function(){return hum.isSafari()&&window.devicePixelRatio},isSafari2:function(){return hum.isSafari()&&!hum.isSafari3()},isSafari:function(){return navigator&&navigator.vendor&&navigator.vendor.toLowerCase().indexOf("apple")!=-1},isWebsafeImage:function(a){ext=hum.fileExtension(a);switch(ext){case"jpg":case"jpeg":case"gif":case"png":return true;break;default:return false;break}},loadScript:function(b,a){var c=document.createElement("script");c.onreadystatechange=function(){if((this.readyState=="completed"||this.readyState=="loaded")&&!this.loadScriptDone){this.loadScriptDone=true;a()}};c.onload=a;c.type="text/javascript";c.src=b;document.getElementsByTagName("head")[0].appendChild(c);return c},ltrim:function(a){if(typeof a=="string"){return a.replace(/^\s+/,"")}return a},readCookie:function(b){var e=b+"=",a,d,f;a=document.cookie.split(";");for(d=0;d<a.length;d++){f=a[d];while(f.charAt(0)==" "){f=f.substring(1,f.length)}if(f.indexOf(e)==0){return f.substring(e.length,f.length)}}return null},reCaptcha:function(){if(!reCaptchaKey||!document.getElementById("recaptchaplaceholder")){return null}loadScript((("https:"==document.location.protocol)?"https://api-secure":"http://api")+".recaptcha.net/js/recaptcha_ajax.js",reCaptchaLoaded)},reCaptchaLoaded:function(){if(!reCaptchaKey||!document.getElementById("recaptchaplaceholder")){return null}Recaptcha.create(reCaptchaKey,document.getElementById("recaptchaplaceholder"))},removeClass:function(a,b){if(hum.hasClass(a,b)){a.className=a.className.replace(new RegExp("(\\s|^)"+b+"(\\s|$)")," ")}},rtrim:function(a){if(typeof a=="string"){return a.replace(/\s+$/,"")}return a},setClass:function(a,b){a.className=b},textToImage:function(c,b,m){var h,a,l=[],f,g,k,e;if(hum.isArray(c)){l=c}else{menu=document.getElementById(c);if(menu){l=menu.getElementsByTagName("a")}}if(l.length){for(f=0;f<l.length;++f){k="";for(e=0;e<l[f].childNodes.length;++e){k=k+l[f].childNodes[e].nodeValue;l[f].childNodes[e].nodeValue=""}if(m&&k.length){k=k.toUpperCase()}url=STATIC_URL+"/tti/"+b+"/"+escape(k);if(hum.isIE6()){l[f].style.cursor="pointer";var d=document.createTextNode(k);div=document.createElement("div");div.appendChild(d);g=document.createElement("img");g.src=url;g.wrapperDiv=div;div.filterImage=g;if(g.width&&g.height){div.style.width=g.width+"px";div.style.height=g.height+"px"}else{g.onreadystatechange=function(){if(this.readyState=="complete"){this.wrapperDiv.style.width=this.width+"px";this.wrapperDiv.style.height=this.height+"px"}}}div.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='image',src='"+url+"')";div.style.cursor="pointer";div.style.display="block";div.style.textIndent="-2000px";div.style.textAlign="left";l[f].appendChild(div)}else{g=document.createElement("img");g.src=url;g.alt=k;l[f].appendChild(g)}}}},trim:function(a){if(typeof a=="string"){return a.replace(/^\s+|\s+$/g,"")}return a}};
/* DomLoaded courtesy of Dean Edwards and contributors at http://dean.edwards.name
 * Released under an MIT License http://www.opensource.org/licenses/mit-license.php 
 * Modified by Kieran Whitbread */
var DomLoaded={onload:[],loaded:function(){var a;if(arguments.callee.done){return}arguments.callee.done=true;for(a=0;a<DomLoaded.onload.length;a++){DomLoaded.onload[a]()}},load:function(fireThis){this.onload.push(fireThis);if(document.addEventListener){document.addEventListener("DOMContentLoaded",DomLoaded.loaded,null)}if(/KHTML|WebKit/i.test(navigator.userAgent)){var _timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(_timer);delete _timer;DomLoaded.loaded()}},10);
/*@cc_on @*/
/*@if (@_win32)
var proto = "src='javascript:void(0)'";
if (location.protocol == "https:") proto = "src=//0";
document.write("<scr"+"ipt id=__ie_onload defer " + proto + "><\/scr"+"ipt>");
var script = document.getElementById("__ie_onload");
script.onreadystatechange = function() {
    if (this.readyState == "complete") {
        DomLoaded.loaded();
    }
};
/*@end @*/
}window.onload=DomLoaded.loaded}};if(!Array.indexOf){Array.prototype.indexOf=function(b,c){for(var a=(c||0);a<this.length;++a){if(this[a]==b){return a}}}}if(typeof jQuery!="undefined"){jQuery.noConflict()}hum.DEBUG_MESSAGES=hum.DEBUG_NONE;