
var Drupal=Drupal||{'settings':{},'behaviors':{},'themes':{},'locale':{}};Drupal.jsEnabled=document.getElementsByTagName&&document.createElement&&document.createTextNode&&document.documentElement&&document.getElementById;Drupal.attachBehaviors=function(context){context=context||document;if(Drupal.jsEnabled){jQuery.each(Drupal.behaviors,function(){this(context);});}};Drupal.checkPlain=function(str){str=String(str);var replace={'&':'&amp;','"':'&quot;','<':'&lt;','>':'&gt;'};for(var character in replace){var regex=new RegExp(character,'g');str=str.replace(regex,replace[character]);}
return str;};Drupal.t=function(str,args){if(Drupal.locale.strings&&Drupal.locale.strings[str]){str=Drupal.locale.strings[str];}
if(args){for(var key in args){switch(key.charAt(0)){case'@':args[key]=Drupal.checkPlain(args[key]);break;case'!':break;case'%':default:args[key]=Drupal.theme('placeholder',args[key]);break;}
str=str.replace(key,args[key]);}}
return str;};Drupal.formatPlural=function(count,singular,plural,args){var args=args||{};args['@count']=count;var index=Drupal.locale.pluralFormula?Drupal.locale.pluralFormula(args['@count']):((args['@count']==1)?0:1);if(index==0){return Drupal.t(singular,args);}
else if(index==1){return Drupal.t(plural,args);}
else{args['@count['+index+']']=args['@count'];delete args['@count'];return Drupal.t(plural.replace('@count','@count['+index+']'),args);}};Drupal.theme=function(func){for(var i=1,args=[];i<arguments.length;i++){args.push(arguments[i]);}
return(Drupal.theme[func]||Drupal.theme.prototype[func]).apply(this,args);};Drupal.parseJson=function(data){if((data.substring(0,1)!='{')&&(data.substring(0,1)!='[')){return{status:0,data:data.length?data:Drupal.t('Unspecified error')};}
return eval('('+data+');');};Drupal.freezeHeight=function(){Drupal.unfreezeHeight();var div=document.createElement('div');$(div).css({position:'absolute',top:'0px',left:'0px',width:'1px',height:$('body').css('height')}).attr('id','freeze-height');$('body').append(div);};Drupal.unfreezeHeight=function(){$('#freeze-height').remove();};Drupal.encodeURIComponent=function(item,uri){uri=uri||location.href;item=encodeURIComponent(item).replace(/%2F/g,'/');return(uri.indexOf('?q=')!=-1)?item:item.replace(/%26/g,'%2526').replace(/%23/g,'%2523').replace(/\/\//g,'/%252F');};Drupal.getSelection=function(element){if(typeof(element.selectionStart)!='number'&&document.selection){var range1=document.selection.createRange();var range2=range1.duplicate();range2.moveToElementText(element);range2.setEndPoint('EndToEnd',range1);var start=range2.text.length-range1.text.length;var end=start+range1.text.length;return{'start':start,'end':end};}
return{'start':element.selectionStart,'end':element.selectionEnd};};Drupal.ahahError=function(xmlhttp,uri){if(xmlhttp.status==200){if(jQuery.trim($(xmlhttp.responseText).text())){var message=Drupal.t("An error occurred. \n@uri\n@text",{'@uri':uri,'@text':xmlhttp.responseText});}
else{var message=Drupal.t("An error occurred. \n@uri\n(no information available).",{'@uri':uri,'@text':xmlhttp.responseText});}}
else{var message=Drupal.t("An HTTP error @status occurred. \n@uri",{'@uri':uri,'@status':xmlhttp.status});}
return message;}
if(Drupal.jsEnabled){$(document.documentElement).addClass('js');document.cookie='has_js=1; path=/';$(document).ready(function(){Drupal.attachBehaviors(this);});}
Drupal.theme.prototype={placeholder:function(str){return'<em>'+Drupal.checkPlain(str)+'</em>';}};;$(document).ready(function(){$(document.body).click(function(event){$(event.target).parents("a:first,area:first").andSelf().filter("a,area").each(function(){var ga=Drupal.settings.googleanalytics;var isInternal=new RegExp("^(https?):\/\/"+window.location.host,"i");var isInternalSpecial=new RegExp("(\/go\/.*)$","i");var isDownload=new RegExp("\\.("+ga.trackDownloadExtensions+")$","i");if(isInternal.test(this.href)){if(ga.trackDownload&&isDownload.test(this.href)){var extension=isDownload.exec(this.href);_gaq.push(["_trackEvent","Downloads",extension[1].toUpperCase(),this.href.replace(isInternal,'')]);}
else if(isInternalSpecial.test(this.href)){_gaq.push(["_trackPageview",this.href.replace(isInternal,'')]);}}
else{if(ga.trackMailto&&$(this).is("a[href^=mailto:],area[href^=mailto:]")){_gaq.push(["_trackEvent","Mails","Click",this.href.substring(7)]);}
else if(ga.trackOutgoing&&this.href){if(ga.trackOutboundAsPageview){_gaq.push(["_trackPageview",'/outbound/'+this.href.replace(/^(https?|ftp|news|nntp|telnet|irc|ssh|sftp|webcal):\/\//i,'').split('/').join('--')]);}
else{_gaq.push(["_trackEvent","Outbound links","Click",this.href]);}}}});});});;(function($){Drupal.behaviors.mollomPrivacy=function(context){$('.mollom-privacy a',context).click(function(){this.target='_blank';});};Drupal.behaviors.mollomCaptcha=function(context){$('a.mollom-switch-captcha',context).click(getMollomCaptcha);};function getMollomCaptcha(){var newCaptchaType=$(this).hasClass('mollom-audio-captcha')?'audio':'image';var context=$(this).parents('form');var mollomSessionId=$('input.mollom-session-id',context).val();$.getJSON(Drupal.settings.basePath+'mollom/captcha/'+newCaptchaType+'/'+mollomSessionId,function(data){if(!(data&&data.content)){return;}
$('.mollom-captcha-content',context).parent().html(data.content);$('input.mollom-session-id',context).val(data.session_id);Drupal.attachBehaviors(context);$('input[name="mollom[captcha]"]',context).focus();});return false;}})(jQuery);;(function($){function extlinkAttach(context){var pattern=/^(([^\/:]+?\.)*)([^\.:]{4,})((\.[a-z]{1,4})*)(:[0-9]{1,5})?$/;var host=window.location.host.replace(pattern,'$3$4');var subdomain=window.location.host.replace(pattern,'$1');if(Drupal.settings.extlink.extSubdomains){var subdomains="([^/]*\\.)?";}
else if(subdomain=='www.'||subdomain==''){var subdomains="(www\\.)?";}
else{var subdomains=subdomain.replace(".","\\.");}
var internal_link=new RegExp("^https?://"+subdomains+host,"i");var extInclude=false;if(Drupal.settings.extlink.extInclude){extInclude=new RegExp(Drupal.settings.extlink.extInclude.replace(/\\/,'\\'));}
var extExclude=false;if(Drupal.settings.extlink.extExclude){extExclude=new RegExp(Drupal.settings.extlink.extExclude.replace(/\\/,'\\'));}
var external_links=new Array();var mailto_links=new Array();$("a:not(."+Drupal.settings.extlink.extClass+", ."+Drupal.settings.extlink.mailtoClass+")",context).each(function(el){try{var url=this.href.toLowerCase();if(url.indexOf('http')==0&&(!url.match(internal_link)||(extInclude&&url.match(extInclude)))&&!(extExclude&&url.match(extExclude))){external_links.push(this);}
else if(url.indexOf('mailto:')==0){mailto_links.push(this);}}
catch(error){return false;}});if(Drupal.settings.extlink.extClass){if(parseFloat($().jquery)<1.2){$(external_links).not('[img]').addClass(Drupal.settings.extlink.extClass).each(function(){if($(this).css('display')=='inline')$(this).after('<span class='+Drupal.settings.extlink.extClass+'></span>');});}
else{$(external_links).not($(external_links).find('img').parents('a')).addClass(Drupal.settings.extlink.extClass).each(function(){if($(this).css('display')=='inline')$(this).after('<span class='+Drupal.settings.extlink.extClass+'></span>');});}}
if(Drupal.settings.extlink.mailtoClass){if(parseFloat($().jquery)<1.2){$(mailto_links).not('[img]').addClass(Drupal.settings.extlink.mailtoClass).each(function(){if($(this).css('display')=='inline')$(this).after('<span class='+Drupal.settings.extlink.mailtoClass+'></span>');});}
else{$(mailto_links).not($(mailto_links).find('img').parents('a')).addClass(Drupal.settings.extlink.mailtoClass).each(function(){if($(this).css('display')=='inline')$(this).after('<span class='+Drupal.settings.extlink.mailtoClass+'></span>');});}}
if(Drupal.settings.extlink.extTarget){$(external_links).attr('target',Drupal.settings.extlink.extTarget);}
if(Drupal.settings.extlink.extAlert){$(external_links).click(function(e){return confirm(Drupal.settings.extlink.extAlertText);});}
if(($.support&&!($.support.boxModel===undefined)&&!$.support.boxModel)||($.browser.msie&&parseInt($.browser.version)<=7)){$('span.ext, span.mailto').css('display','inline-block');}}
Drupal.behaviors.extlink=function(context){extlinkAttach(context);}})(jQuery);;Drupal.behaviors.onBeforeUnload=function(context){var self=Drupal.onBeforeUnload;if(!self.processed){self.processed=true;if(typeof window.onbeforeunload=='function'){self._previousWindowHandler=window.onbeforeunload;}
window.onbeforeunload=self._windowHandler;self.enable();}};Drupal.onBeforeUnload=Drupal.onBeforeUnload||{processed:false,_previousWindowHandler:null,_enabled:false,_callbacks:{}};Drupal.onBeforeUnload._windowHandler=function(event){var module,callback,result,results=[];var self=Drupal.onBeforeUnload;if(typeof self._previousWindowHandler=='function'){result=self._previousWindowHandler(event);if(typeof result=='string'){results.push(result);}}
if(self._enabled){for(module in self._callbacks){result=(self._callbacks[module])();if(typeof result=='string'){results.push(result);}}}
if(results.length>0){return results.join('\n');}};Drupal.onBeforeUnload.addCallback=function(module,callback){if(typeof module=='string'&&typeof callback=='function'){this._callbacks[module]=callback;return true;}
return false;};Drupal.onBeforeUnload.removeCallback=function(module){if(typeof this._callbacks[module]=='function'){delete this._callbacks[module];return true;}
return false;};Drupal.onBeforeUnload.callbackExists=function(module){return(typeof this._callbacks[module]=='function');};Drupal.onBeforeUnload.disable=function(){this._enabled=false;};Drupal.onBeforeUnload.enable=function(){this._enabled=true;};;Drupal.behaviors.dirtyForms=function(context){if(!Drupal.onBeforeUnload.callbackExists('dirtyforms')){Drupal.onBeforeUnload.addCallback('dirtyforms',Drupal.dirtyForms._onBeforeUnload);if(Drupal.settings.dirtyForms.troubleshooting.alerts){Drupal.dirtyForms._alert=function(message){alert(message)};}
Drupal.dirtyForms.saveState(context);}};Drupal.dirtyForms=Drupal.dirtyForms||{warning:Drupal.t('Your changes will be lost if you leave this page now.'),isSubmitted:false,_alert:null,_excludedElementTypes:['submit','button','reset','image','file'],_savedElements:{},_wysiwyg:{}};Drupal.dirtyForms.isDirty=function(){var currentForms=this._getForms();for(var formId in currentForms){if(this._savedElements[formId]==undefined){if(typeof this._alert=='function'){this._alert('The form "'+formId+'" was not processed initially.');}
return true;}}
for(var formId in this._savedElements){if(currentForms[formId]==undefined){if(typeof this._alert=='function'){this._alert('Could not find processed form "'+formId+'"');}
return true;}
var currentElements=this._getElements(currentForms[formId]);var savedElements=this._savedElements[formId];for(var elementId in savedElements){if(!currentElements.hasOwnProperty(elementId)){if(typeof this._alert=='function'){this._alert('Could not find the element "'+elementId+'" in the form "'+formId+'"');}
return true;}
if(this._isElementChanged(currentElements[elementId],savedElements[elementId])){if(typeof this._alert=='function'){this._alert('The element "'+elementId+'" in the form "'+formId+'" has been changed.\n\nSaved value: '+savedElements[elementId].value+'\n\nCurrent value: '+currentElements[elementId].value);}
return true;}}
for(var elementId in currentElements){if(!savedElements.hasOwnProperty(elementId)){if(typeof this._alert=='function'){this._alert('The element "'+elementId+'" in the form "'+formId+'" was not processed initially.');}
return true;}}}
return false;};Drupal.dirtyForms.saveState=function(context){var forms=this._getForms(context);for(var formId in forms){this.addForm(forms[formId]);}};Drupal.dirtyForms.clearState=function(context){var forms=this._getForms(context);for(var formId in forms){this.removeForm(forms[formId]);}
this._savedElements={};};Drupal.dirtyForms.addForm=function(form){var formId=form.id;if(form._dirtyForms==undefined){form._dirtyForms={previousOnSubmit:form.onsubmit,formId:formId};form.onsubmit=Drupal.dirtyForms._onSubmit;}
this._savedElements[formId]=this._getElements(form);};Drupal.dirtyForms.removeForm=function(form){if(typeof form._dirtyForms=='object'){var formId=form._dirtyForms.formId;if(typeof this._savedElements[formId]=='object'){delete this._savedElements[formId];form.onsubmit=form._dirtyForms.previousOnSubmit;delete form._dirtyForms;}}};Drupal.dirtyForms._onBeforeUnload=function(){var self=Drupal.dirtyForms;if(!self.isSubmitted&&self.isDirty()){return self.warning;}};Drupal.dirtyForms._onSubmit=function(event){Drupal.dirtyForms.isSubmitted=true;if(typeof this._dirtyForms.previousOnSubmit=='function'){return this._dirtyForms.previousOnSubmit(event);}
return true;};Drupal.dirtyForms._getForms=function(context){var forms={};context=context||document;$('form:not(.dirtyforms-exclude)',context).each(function(){var form=this;if(typeof form.id=='string'&&form.id.length>0){forms[form.id]=form;}});return forms;};Drupal.dirtyForms._getElements=function(form){var elements={};for(var i=0;i<form.elements.length;i++){var element=form.elements[i];if(typeof element.name!='string'||element.name.length<=0){continue;}
if(typeof element.id!='string'||element.id.length<=0){continue;}
if($.inArray(element.type,this._excludedElementTypes)>=0){continue;}
if($(element).hasClass('dirtyforms-exclude')){continue;}
elements[element.id]={id:element.id,name:element.name,type:element.type,value:this._getElementValue(element)};}
return elements;};Drupal.dirtyForms._getElementValue=function(element){switch(element.type){case'checkbox':return(element.checked?element.value:null);case'radio':var radio=element.form.elements[element.name];for(var i=0;i<radio.length;i++){if(radio[i].checked){return radio[i].value;}}
return null;case'textarea':var wysiwygInfo=this._wysiwyg.isEditor(element);return(wysiwygInfo?this._wysiwyg.getContents(wysiwygInfo):element.value);}
return element.value;};Drupal.dirtyForms._isElementChanged=function(currentElement,savedElement){return(currentElement.value!=savedElement.value);};Drupal.dirtyForms._wysiwyg.isEditor=function(element){var editor;if(typeof tinyMCE=='object'&&typeof tinyMCE.get=='function'){if((editor=tinyMCE.get(element.id))&&typeof editor.getContent=='function'){return{type:'TinyMCE',editor:editor,element:element};}}
if(typeof CKEDITOR=='object'&&typeof CKEDITOR.editor=='function'){if((editor=CKEDITOR.instances[element.id])){return{type:'CKEDITOR',editor:editor,element:element};}}
if(typeof FCKeditorAPI=='object'&&typeof FCKeditorAPI.GetInstance=='function'){if((editor=FCKeditorAPI.GetInstance(element.id))&&typeof editor.GetData=='function'){return{type:'FCKeditor',editor:editor,element:element};}}
if(typeof YAHOO=='object'&&typeof YAHOO.widget=='object'&&typeof YAHOO.widget.EditorInfo=='object'&&typeof YAHOO.widget.EditorInfo.getEditorById=='function'){if((editor=YAHOO.widget.EditorInfo.getEditorById(element.id))&&typeof editor.saveHTML=='function'){return{type:'yui',editor:editor,element:element};}}
return false;};Drupal.dirtyForms._wysiwyg.getContents=function(wysiwygInfo){if(wysiwygInfo.type=='TinyMCE'){return wysiwygInfo.editor.getContent();}
else if(wysiwygInfo.type=='CKEDITOR'){return wysiwygInfo.editor.getData();}
else if(wysiwygInfo.type=='FCKeditor'){return wysiwygInfo.editor.GetData();}
else if(wysiwygInfo.type=='yui'){wysiwygInfo.editor.saveHTML();}
return wysiwygInfo.element.value;};;Drupal.behaviors.LoginToboggan=function(context){$("#toboggan-login:not(.toboggan-login-processed)",context).each(function(){$(this).addClass('toboggan-login-processed').hide();Drupal.logintoboggan_toggleboggan();});};Drupal.logintoboggan_toggleboggan=function(){$("#toboggan-login-link").click(function(){$("#toboggan-login").slideToggle("fast");this.blur();return false;});};;
