function download(a){if(a=="Select document"){return}window.location=a}function goToByScroll(a){$("html,body").animate({scrollTop:$("#"+a).offset().top},"slow")}function checkParentCheckbox(b,a){if($(b).attr("checked")){$(a).attr("checked",true)}}function uncheckChildCheckbox(b,a){if(!$(a).attr("checked")){$(b).attr("checked",false)}}jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};(function(a){var b={};a.fn.publish=function(e,d,j){if(typeof b[e]=="undefined"){return this}var d=d||[],i=d.length,f=b[e],c=f.length,h=this,g=function(){h.each(function(k,l){d[i]=l;for(var k=0;k<c;k++){f[k].callback.apply(f[k].object,d)}})};if(j===true){g()}else{setTimeout(g,0)}return this};a.fn.subscribe=function(c,d){b[c]=b[c]||[];this.each(function(e,f){b[c][b[c].length]={object:f,callback:d}});return this};a.fn.unsubscribe=function(c){if(typeof b[c]=="undefined"){return this}this.each(function(d,e){b[c]=a.grep(b[c],function(f,g){return(e!==f.object)})});if(b[c].length===0){delete b[c]}return this}}(jQuery));(function(a){a.hitch=function(b,c){if(!c){c=b;b=null}if(typeof c=="string"){b=b||window;if(!b[c]){throw (["method not found"])}return function(){return b[c].apply(b,arguments||[])}}return !b?c:function(){return c.apply(b,arguments||[])}}})(jQuery);function isMouseLeaveOrEnter(c,b){var a=c.relatedTarget?c.relatedTarget:c.type=="mouseout"?c.toElement:c.fromElement;while(a&&a!=b){a=a.parentNode}return(a!=b)}function printwindow(){if(!window.print){alert(Translation.noprint);return}window.print()}function pmt(b,d,c,a){document.location.href="mailto:"+b+"@"+d+"?subject="+c+"&body="+a}function is_object(a){if(a instanceof Array){return false}else{return(a!==null)&&(typeof(a)=="object")}}Utilities={purple:true,nextid:0,initListeners:function(){$(this).subscribe("feedback",$.hitch(this,"_displayFeedback"));$(this).subscribe("AjaxStarting",$.hitch(this,"_ajaxStarting"));$(this).subscribe("AjaxDone",$.hitch(this,"_ajaxDone"));$(this).subscribe("removeElementsByClass",$.hitch(this,"_removeElementsByClass"));$(this).subscribe("moveElementsByClass",$.hitch(this,"_moveElementsByClass"));$(this).subscribe("replaceDom",$.hitch(this,"_replaceDom"));$(this).subscribe("removeDomElement",$.hitch(this,"_removeDomElement"));$(this).subscribe("JS",$.hitch(this,"_jsAction"));$(this).subscribe("htmlXHR",$.hitch(this,"_htmlXHR"));$(this).subscribe("jsonXHR",$.hitch(this,"_jsonXHR"));$(this).subscribe("trackEvent",$.hitch(this,"_trackEvent"));$(this).subscribe("trackPageView",$.hitch(this,"_trackPageView"));$(this).subscribe("openLightbox",$.hitch(this,"_openLightbox"));if($("#purpleGui").length==0){this.purple=false;$(this).subscribe("XHR",$.hitch(this,"_jsonXHR"))}$("ul a.disabled").click(function(a){a.preventDefault()});this._initAjaxLinks(false)},_initAjaxLinks:function(a){if(!a){$(".formLink").click(function(c){var b=$(this).closest("form");if(!b.length){return}if(b.find("input[type=file]").length>0){return}c.preventDefault();$(this).publish("jsonXHR",[{href:b.attr("action"),form:b}])});$(".xhrLink").click(function(b){b.preventDefault();if(Utilities.purple){insertFormJavascript();$(this).publish("closeSlides");$(this).publish("XHR",[{href:$(this).attr("href")}])}else{$(this).publish("jsonXHR",[{href:$(this).attr("href")}])}});$(".initLink").each(function(){_span=$('<span class="site-ajax-loading"></span>').prependTo($(this).parent());var b={url:$(this).attr("href"),timeout:100000,type:"get",span:_span,context:$(this).parent(),error:function(c,e,d){console.error("HTTP status code: ",e);this.html("");return response},success:function(d,e,c){this.html(d)}};$.ajax(b)})}else{$(a).find(".formLink").click(function(c){c.preventDefault();var b=$(this).closest("form");if(!b.length){return}$(this).publish("jsonXHR",[{href:b.attr("action"),form:b}])});$(a).find(".xhrLink").click(function(b){b.preventDefault();if(Utilities.purple){$(this).publish("closeSlides");$(this).publish("XHR",[{href:this.href}])}else{$(this).publish("jsonXHR",[{href:this.href}])}})}},_displayFeedback:function(a){if(a.feedback!=""){$("#feedback-message-purple").html(a.feedback);$("#notifications").show(600);clearTimeout(this.timer);this.timer=setTimeout("$('#notifications').hide('slow')",6000)}},_ajaxStarting:function(b){var c,a;if(document.compatMode=="CSS1Compat"){c=document.body.parentNode.scrollTop}else{c=window.scrollY}$("#loading").css("top",c+"px");$("#loading").show();$("#loading").fadeIn(10)},_ajaxDone:function(a){$("#loading").fadeOut(200,function(){$("#loading").hide()})},_removeElementsByClass:function(a){$("."+a.className).remove()},_moveElementsByClass:function(a){$("."+a.className).each(function(){if(a.direction=="up"){$(this).prev().before($(this))}else{$(this).next().after($(this))}})},_replaceDom:function(b){var a=$("#"+b.id);a.html(b.content);this._initAjaxLinks(a)},_removeDomElement:function(a){$("#"+a.id).remove()},_jsAction:function(a){if(a.script){$.globalEval(a.script)}},_trackEvent:function(a){if(window._gaq===undefined){return}_gaq.push(["_trackEvent",a.event,a.action])},_trackPageView:function(a){if(window._gaq===undefined){return}_gaq.push(["_trackPageview",a.url])},_openLightbox:function(b){this.nextid++;var a=$('<a href="#lightbox'+this.nextid+'"></a>').appendTo(document.body);a.fancybox({content:b.body});a.trigger("click")},_htmlXHR:function(a){if(a.form!=undefined){this.makeRequest("post","html",a.href,a.form,a.update,true)}else{this.makeRequest("get","html",a.href,null,a.update,true)}},_jsonXHR:function(a){if(a.load==undefined){a.load=true}if(a.form!=undefined){this.makeRequest("post","json",a.href,a.form,false,a.load)}else{this.makeRequest("get","json",a.href,null,false,a.load)}},makeRequest:function(h,a,c,d,g,f){if(f){$(this).publish("AjaxStarting")}var b={url:c,dataType:a,timeout:100000,type:h,error:function(i,k,j){$(this).publish("AjaxDone");console.error("HTTP status code: ",k);return response}};if(d){b.data=$(d).serialize()}if(a=="html"){if(typeof(g)=="string"){b.context=$("#"+g)}else{b.context=g}b.success=function(j,k,i){$(this).html(j);$(this).publish("AjaxDone")}}if(a=="json"){b.success=function(j,k,i){$(this).publish("AjaxDone");Utilities.runEvents(j.events)}}var e=$.ajax(b)},runEvents:function(a){$.each(a,function(b,c){$(this).publish(c.topic,[c])})},setCookieValue:function(b,d){var c=$.cookie("PurpleSite");var a=$.parseJSON(c);if(!is_object(a)){a={}}a[b]=d;$.cookie("PurpleSite",JSON.stringify(a),{expires:31,path:"/"})},getCookieValue:function(b){var c=$.cookie("PurpleSite");var a=$.parseJSON(c);if(a[b]){return a[b]}return false}};$(document).ready(function(){Utilities.initListeners()});
