var DOKU_BASE='/';var DOKU_TPL='/lib/tpl/arctic/';var DOKU_UHN=0;var DOKU_UHC=0;LANG={"searchmedia":"Buscar ficheiros","keepopen":"Manter a xanela aberta na selecci\u00f3n","hidedetails":"Ocultar os detalles","nosmblinks":"A ligaz\u00f3n aos compartidos do Windows s\u00f3 funciona co Microsoft Internet Explorer.\nSempre podes copiar e colar a ligaz\u00f3n.","linkwiz":"Asistente de ligaz\u00f3ns","linkto":"Ligaz\u00f3n a:","del_confirm":"Quere eliminar os elementos seleccionados?","mu_btn":"Subir varios ficheiros dunha vez","plugins":[]};var toolbar=[{"type":"format","title":"Texto en negra","icon":"bold.png","key":"b","open":"**","close":"**"},{"type":"format","title":"Texto en cursiva","icon":"italic.png","key":"i","open":"\/\/","close":"\/\/"},{"type":"format","title":"Texto subli\u00f1ado","icon":"underline.png","key":"u","open":"__","close":"__"},{"type":"format","title":"Texto de c\u00f3digo","icon":"mono.png","key":"c","open":"''","close":"''"},{"type":"format","title":"Texto riscado","icon":"strike.png","key":"d","open":"","close":"<\/del>"},{"type":"autohead","title":"Same Level Headline","icon":"hequal.png","key":"8","text":"Headline","mod":0},{"type":"autohead","title":"Lower Headline","icon":"hminus.png","key":"9","text":"Headline","mod":1},{"type":"autohead","title":"Higher Headline","icon":"hplus.png","key":"0","text":"Headline","mod":-1},{"type":"picker","title":"Select Headline","icon":"h.png","class":"pk_hl","list":[{"type":"format","title":"T\u00edtulo de nivel 1","icon":"h1.png","key":"1","open":"====== ","close":" ======\\n"},{"type":"format","title":"T\u00edtulo de nivel 2","icon":"h2.png","key":"2","open":"===== ","close":" =====\\n"},{"type":"format","title":"T\u00edtulo de nivel 3","icon":"h3.png","key":"3","open":"==== ","close":" ====\\n"},{"type":"format","title":"T\u00edtulo de nivel 4","icon":"h4.png","key":"4","open":"=== ","close":" ===\\n"},{"type":"format","title":"T\u00edtulo de nivel 5","icon":"h5.png","key":"5","open":"== ","close":" ==\\n"}]},{"type":"linkwiz","title":"Ligaz\u00f3n interna","icon":"link.png","key":"l","open":"[[","close":"]]"},{"type":"format","title":"Ligaz\u00f3n externa","icon":"linkextern.png","open":"[[","close":"]]","sample":"http:\/\/example.com|Ligaz\u00f3n externa"},{"type":"formatln","title":"Elemento de lista ordenada","icon":"ol.png","open":" - ","close":"","key":"-"},{"type":"formatln","title":"Elemento de lista desordenada","icon":"ul.png","open":" * ","close":"","key":"."},{"type":"insert","title":"Li\u00f1a horizontal","icon":"hr.png","insert":"\\n----\\n"},{"type":"mediapopup","title":"Engadir imaxes e outros ficheiros","icon":"image.png","url":"lib\/exe\/mediamanager.php?ns=","name":"mediaselect","options":"width=750,height=500,left=20,top=20,scrollbars=yes,resizable=yes"},{"type":"picker","title":"Emoticonas","icon":"smiley.png","list":{"8-)":"icon_cool.gif","8-O":"icon_eek.gif","8-o":"icon_eek.gif",":-(":"icon_sad.gif",":-)":"icon_smile.gif","=)":"icon_smile2.gif",":-\/":"icon_doubt.gif",":-\\":"icon_doubt2.gif",":-?":"icon_confused.gif",":-D":"icon_biggrin.gif",":-P":"icon_razz.gif",":-o":"icon_surprised.gif",":-O":"icon_surprised.gif",":-x":"icon_silenced.gif",":-X":"icon_silenced.gif",":-|":"icon_neutral.gif",";-)":"icon_wink.gif","^_^":"icon_fun.gif",":?:":"icon_question.gif",":!:":"icon_exclaim.gif","LOL":"icon_lol.gif","FIXME":"fixme.gif","DELETEME":"delete.gif"},"icobase":"smileys"},{"type":"picker","title":"Caracteres especiais","icon":"chars.png","list":["\u00c0","\u00e0","\u00c1","\u00e1","\u00c2","\u00e2","\u00c3","\u00e3","\u00c4","\u00e4","\u01cd","\u01ce","\u0102","\u0103","\u00c5","\u00e5","\u0100","\u0101","\u0104","\u0105","\u00c6","\u00e6","\u0106","\u0107","\u00c7","\u00e7","\u010c","\u010d","\u0108","\u0109","\u010a","\u010b","\u00d0","\u0111","\u00f0","\u010e","\u010f","\u00c8","\u00e8","\u00c9","\u00e9","\u00ca","\u00ea","\u00cb","\u00eb","\u011a","\u011b","\u0112","\u0113","\u0116","\u0117","\u0118","\u0119","\u0122","\u0123","\u011c","\u011d","\u011e","\u011f","\u0120","\u0121","\u0124","\u0125","\u00cc","\u00ec","\u00cd","\u00ed","\u00ce","\u00ee","\u00cf","\u00ef","\u01cf","\u01d0","\u012a","\u012b","\u0130","\u0131","\u012e","\u012f","\u0134","\u0135","\u0136","\u0137","\u0139","\u013a","\u013b","\u013c","\u013d","\u013e","\u0141","\u0142","\u013f","\u0140","\u0143","\u0144","\u00d1","\u00f1","\u0145","\u0146","\u0147","\u0148","\u00d2","\u00f2","\u00d3","\u00f3","\u00d4","\u00f4","\u00d5","\u00f5","\u00d6","\u00f6","\u01d1","\u01d2","\u014c","\u014d","\u0150","\u0151","\u0152","\u0153","\u00d8","\u00f8","\u0154","\u0155","\u0156","\u0157","\u0158","\u0159","\u015a","\u015b","\u015e","\u015f","\u0160","\u0161","\u015c","\u015d","\u0162","\u0163","\u0164","\u0165","\u00d9","\u00f9","\u00da","\u00fa","\u00db","\u00fb","\u00dc","\u00fc","\u01d3","\u01d4","\u016c","\u016d","\u016a","\u016b","\u016e","\u016f","\u01d6","\u01d8","\u01da","\u01dc","\u0172","\u0173","\u0170","\u0171","\u0174","\u0175","\u00dd","\u00fd","\u0178","\u00ff","\u0176","\u0177","\u0179","\u017a","\u017d","\u017e","\u017b","\u017c","\u00de","\u00fe","\u00df","\u0126","\u0127","\u00bf","\u00a1","\u00a2","\u00a3","\u00a4","\u00a5","\u20ac","\u00a6","\u00a7","\u00aa","\u00ac","\u00af","\u00b0","\u00b1","\u00f7","\u2030","\u00bc","\u00bd","\u00be","\u00b9","\u00b2","\u00b3","\u00b5","\u00b6","\u2020","\u2021","\u00b7","\u2022","\u00ba","\u2200","\u2202","\u2203","\u018f","\u0259","\u2205","\u2207","\u2208","\u2209","\u220b","\u220f","\u2211","\u203e","\u2212","\u2217","\u221a","\u221d","\u221e","\u2220","\u2227","\u2228","\u2229","\u222a","\u222b","\u2234","\u223c","\u2245","\u2248","\u2260","\u2261","\u2264","\u2265","\u2282","\u2283","\u2284","\u2286","\u2287","\u2295","\u2297","\u22a5","\u22c5","\u25ca","\u2118","\u2111","\u211c","\u2135","\u2660","\u2663","\u2665","\u2666","\u03b1","\u03b2","\u0393","\u03b3","\u0394","\u03b4","\u03b5","\u03b6","\u03b7","\u0398","\u03b8","\u03b9","\u03ba","\u039b","\u03bb","\u03bc","\u039e","\u03be","\u03a0","\u03c0","\u03c1","\u03a3","\u03c3","\u03a4","\u03c4","\u03c5","\u03a6","\u03c6","\u03c7","\u03a8","\u03c8","\u03a9","\u03c9","\u2605","\u2606","\u260e","\u261a","\u261b","\u261c","\u261d","\u261e","\u261f","\u2639","\u263a","\u2714","\u2718","\u00d7","\u201e","\u201c","\u201d","\u201a","\u2018","\u2019","\u00ab","\u00bb","\u2039","\u203a","\u2014","\u2013","\u2026","\u2190","\u2191","\u2192","\u2193","\u2194","\u21d0","\u21d1","\u21d2","\u21d3","\u21d4","\u00a9","\u2122","\u00ae","\u2032","\u2033","[","]","{","}","~","(",")","%","\u00a7","$","#","|","@"]},{"type":"signature","title":"Inserir unha sinatura","icon":"sig.png","key":"y"}];function isUndefined(prop){return(typeof prop=='undefined');}function isFunction(prop){return(typeof prop=='function');}function isString(prop){return(typeof prop=='string');}function isNumber(prop){return(typeof prop=='number');}function isNumeric(prop){return isNumber(prop)&&!isNaN(prop)&&isFinite(prop);}function isArray(prop){return(prop instanceof Array);}function isRegExp(prop){return(prop instanceof RegExp);}function isBoolean(prop){return('boolean'==typeof prop);}function isScalar(prop){return isNumeric(prop)||isString(prop);}function isEmpty(prop){if(isBoolean(prop))return false;if(isRegExp(prop)&&new RegExp("").toString()==prop.toString())return true;if(isString(prop)||isNumber(prop))return!prop;if(Boolean(prop)&&false!=prop){for(var i in prop)if(prop.hasOwnProperty(i))return false}return true;}if('undefined'==typeof Object.hasOwnProperty){Object.prototype.hasOwnProperty=function(prop){return!('undefined'==typeof this[prop]||this.constructor&&this.constructor.prototype[prop]&&this[prop]===this.constructor.prototype[prop]);}}function hasFlash(version){var ver=0;try{if(navigator.plugins!=null&&navigator.plugins.length>0){ver=navigator.plugins["Shockwave Flash"].description.split(' ')[2].split('.')[0];}else{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");ver=axo.GetVariable("$version").split(' ')[1].split(',')[0];}}catch(e){}if(ver>=version)return true;return false;}function addEvent(element,type,handler){if(!handler.$$guid)handler.$$guid=addEvent.guid++;if(!element.events)element.events={};var handlers=element.events[type];if(!handlers){handlers=element.events[type]={};if(element["on"+type]){handlers[0]=element["on"+type];}}handlers[handler.$$guid]=handler;element["on"+type]=handleEvent;};addEvent.guid=1;function removeEvent(element,type,handler){if(element.events&&element.events[type]){delete element.events[type][handler.$$guid];}};function handleEvent(event){var returnValue=true;event=event||fixEvent(window.event);var handlers=this.events[event.type];for(var i in handlers){if(!handlers.hasOwnProperty(i))continue;this.$$handleEvent=handlers[i];if(this.$$handleEvent(event)===false){returnValue=false;}}return returnValue;};function fixEvent(event){event.preventDefault=fixEvent.preventDefault;event.stopPropagation=fixEvent.stopPropagation;event.target=event.srcElement;return event;};fixEvent.preventDefault=function(){this.returnValue=false;};fixEvent.stopPropagation=function(){this.cancelBubble=true;};window.fireoninit=function(){if(arguments.callee.done)return;arguments.callee.done=true;if(_timer){clearInterval(_timer);_timer=null;}if(typeof window.oninit=='function'){window.oninit();}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",window.fireoninit,null);}/*@cc_on @*//*@if(@_win32)document.write("<\/script>");var script=document.getElementById("__ie_init");script.onreadystatechange=function(){if(this.readyState=="complete"){window.fireoninit();}};/*@end @*/if(/WebKit/i.test(navigator.userAgent)){var _timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){window.fireoninit();}},10);}window.onload=window.fireoninit;window.oninit=function(){};function addInitEvent(func){var oldoninit=window.oninit;if(typeof window.oninit!='function'){window.oninit=func;}else{window.oninit=function(){oldoninit();func();};}}function bind(fnc){var args=Array.prototype.slice.call(arguments,1);return function(){return fnc.apply(this,args);}}DokuCookie={data:Array(),name:'DOKU_PREFS',setValue:function(key,val){DokuCookie.init();DokuCookie.data[key]=val;var now=new Date();DokuCookie.fixDate(now);now.setTime(now.getTime()+365*24*60*60*1000);var text='';for(var key in DokuCookie.data){if(!DokuCookie.data.hasOwnProperty(key))continue;text+='#'+escape(key)+'#'+DokuCookie.data[key];}DokuCookie.setCookie(DokuCookie.name,text.substr(1),now,DOKU_BASE);},getValue:function(key){DokuCookie.init();return DokuCookie.data[key];},init:function(){if(DokuCookie.data.length)return;var text=DokuCookie.getCookie(DokuCookie.name);if(text){var parts=text.split('#');for(var i=0;i0){date.setTime(date.getTime()-skew);}}};var clientPC=navigator.userAgent.toLowerCase();var is_macos=navigator.appVersion.indexOf('Mac')!=-1;var is_gecko=((clientPC.indexOf('gecko')!=-1)&&(clientPC.indexOf('spoofer')==-1)&&(clientPC.indexOf('khtml')==-1)&&(clientPC.indexOf('netscape/7.0')==-1));var is_safari=((clientPC.indexOf('AppleWebKit')!=-1)&&(clientPC.indexOf('spoofer')==-1));var is_khtml=(navigator.vendor=='KDE'||(document.childNodes&&!document.all&&!navigator.taintEnabled));if(clientPC.indexOf('opera')!=-1){var is_opera=true;var is_opera_preseven=(window.opera&&!document.childNodes);var is_opera_seven=(window.opera&&document.childNodes);}function $(){var elements=new Array();for(var i=0;i');}function hideLoadBar(id){obj=$(id);if(obj)obj.style.display="none";}function addTocToggle(){if(!document.getElementById)return;var header=$('toc__header');if(!header)return;var toc=$('toc__inside');var obj=document.createElement('span');obj.id='toc__toggle';obj.style.cursor='pointer';if(toc&&toc.style.display=='none'){obj.innerHTML='+';obj.className='toc_open';}else{obj.innerHTML='';obj.className='toc_close';}prependChild(header,obj);obj.parentNode.onclick=toggleToc;try{obj.parentNode.style.cursor='pointer';obj.parentNode.style.cursor='hand';}catch(e){}}function toggleToc(){var toc=$('toc__inside');var obj=$('toc__toggle');if(toc.style.display=='none'){toc.style.display='';obj.innerHTML='';obj.className='toc_close';}else{toc.style.display='none';obj.innerHTML='+';obj.className='toc_open';}}function footnote(e){var obj=e.target;var id=obj.id.substr(5);var fndiv=$('insitu__fn');if(!fndiv){fndiv=document.createElement('div');fndiv.id='insitu__fn';fndiv.className='insitu-footnote JSpopup dokuwiki';addEvent(fndiv,'mouseout',function(e){if(e.target!=fndiv){e.stopPropagation();return;}if(e.pageX){var bx1=findPosX(fndiv);var bx2=bx1+fndiv.offsetWidth;var by1=findPosY(fndiv);var by2=by1+fndiv.offsetHeight;var x=e.pageX;var y=e.pageY;if(x>bx1&&xby1&&y0&&e.offsetX0&&e.offsetY.*<\/sup>/gi,'');content=content.replace(/^\s+(,\s+)+/,'');content=content.replace(/\bid=\"(.*?)\"/gi,'id="insitu__$1');fndiv.innerHTML=content;var x;var y;if(e.pageX){x=e.pageX;y=e.pageY;}else{x=e.offsetX;y=e.offsetY;}fndiv.style.position='absolute';fndiv.style.left=(x+2)+'px';fndiv.style.top=(y+2)+'px';fndiv.style.display='';}addInitEvent(function(){var elems=getElementsByClass('fn_top',null,'a');for(var i=0;i=2)input2.disabled=(input2.type=='checkbox'&&!input2.checked);else input2.disabled=(input2.type!='checkbox');}});input1.checked=false;}else if(input1.type=='submit'){input1.disabled=true;}}});addInitEvent(function(){var selector=$('action__selector');if(!selector)return;addEvent(selector,'change',function(e){this.form.submit();});$('action__selectorbtn').style.display='none';});function checkWindowsShares(){if(!LANG['nosmblinks'])return true;var elems=getElementsByClass('windows',document,'a');if(elems){for(var i=0;iloading...';listitem.appendChild(ul);listitem.className='open';}},this.throbber_delay);ajax.elementObj=ul;ajax.afterCompletion=function(){window.clearTimeout(timeout);index.treeattach(ul);if(listitem.className!='open'){if(!listitem.open){ul.style.display='none';}listitem.appendChild(ul);if(listitem.open){listitem.className='open';}}};ajax.runAJAX(clicky.search.substr(1)+'&call=index');e.preventDefault();return false;}};addInitEvent(function(){index.treeattach($('index__tree'));});var drag={obj:null,handle:null,oX:0,oY:0,eX:0,eY:0,attach:function(obj,handle){if(handle){handle.dragobject=obj;addEvent($(handle),'mousedown',drag.start);}else{addEvent($(obj),'mousedown',drag.start);}},start:function(e){drag.handle=e.target;if(drag.handle.dragobject){drag.obj=drag.handle.dragobject;}else{drag.obj=drag.handle;}drag.handle.className+=' ondrag';drag.obj.className+=' ondrag';drag.oX=parseInt(drag.obj.style.left);drag.oY=parseInt(drag.obj.style.top);drag.eX=drag.evX(e);drag.eY=drag.evY(e);addEvent(document,'mousemove',drag.drag);addEvent(document,'mouseup',drag.stop);e.preventDefault();e.stopPropagation();return false;},stop:function(){drag.handle.className=drag.handle.className.replace(/ ?ondrag/,'');drag.obj.className=drag.obj.className.replace(/ ?ondrag/,'');removeEvent(document,'mousemove',drag.drag);removeEvent(document,'mouseup',drag.stop);drag.obj=null;drag.handle=null;},drag:function(e){if(drag.obj){drag.obj.style.top=(drag.evY(e)+drag.oY-drag.eY+'px');drag.obj.style.left=(drag.evX(e)+drag.oX-drag.eX+'px');}},evX:function(e){return(e.pageX)?e.pageX:e.clientX+document.body.scrollTop;},evY:function(e){return(e.pageY)?e.pageY:e.clientY+document.body.scrollTop;}};function selection_class(){this.start=0;this.end=0;this.obj=null;this.rangeCopy=null;this.scroll=0;this.fix=0;this.getLength=function(){return this.end-this.start;};this.getText=function(){if(!this.obj)return'';return this.obj.value.substring(this.start,this.end);}}function getSelection(textArea){var sel=new selection_class();sel.obj=textArea;sel.start=textArea.value.length;sel.end=textArea.value.length;textArea.focus();if(document.getSelection){sel.start=textArea.selectionStart;sel.end=textArea.selectionEnd;sel.scroll=textArea.scrollTop;}else if(document.selection){sel.rangeCopy=document.selection.createRange().duplicate();var before_range=document.body.createTextRange();before_range.moveToElementText(textArea);before_range.setEndPoint("EndToStart",sel.rangeCopy);var before_finished=false,selection_finished=false;var before_text,selection_text;before_text=before_range.text;selection_text=sel.rangeCopy.text;sel.start=before_text.length;sel.end=sel.start+selection_text.length;do{if(!before_finished){if(before_range.compareEndPoints("StartToEnd",before_range)==0){before_finished=true;}else{before_range.moveEnd("character",-1);if(before_range.text==before_text){sel.start+=2;sel.end+=2;}else{before_finished=true;}}}if(!selection_finished){if(sel.rangeCopy.compareEndPoints("StartToEnd",sel.rangeCopy)==0){selection_finished=true;}else{sel.rangeCopy.moveEnd("character",-1);if(sel.rangeCopy.text==selection_text){sel.end+=2;}else{selection_finished=true;}}}}while((!before_finished||!selection_finished));var countNL=function(str){var m=str.split("\r\n");if(!m||!m.length)return 0;return m.length-1;};sel.fix=countNL(sel.obj.value.substring(0,sel.start));}return sel;}function setSelection(selection){if(document.getSelection){selection.obj.setSelectionRange(selection.start,selection.end);if(selection.scroll)selection.obj.scrollTop=selection.scroll;}else if(document.selection){selection.rangeCopy.collapse(true);selection.rangeCopy.moveStart('character',selection.start-selection.fix);selection.rangeCopy.moveEnd('character',selection.end-selection.start);selection.rangeCopy.select();}}function pasteText(selection,text,opts){if(!opts)opts={};selection.obj.value=selection.obj.value.substring(0,selection.start)+text+selection.obj.value.substring(selection.end,selection.obj.value.length);selection.end=selection.start+text.length;if(opts.startofs)selection.start+=opts.startofs;if(opts.endofs)selection.end-=opts.endofs;if(opts.nosel)selection.start=selection.end;setSelection(selection);}function insertTags(textAreaID,tagOpen,tagClose,sampleText){var txtarea=$(textAreaID);var selection=getSelection(txtarea);var text=selection.getText();var opts;if(text.charAt(text.length-1)==' '){selection.end--;text=selection.getText();}if(!text){text=sampleText;opts={startofs:tagOpen.length,endofs:tagClose.length};}else{opts={nosel:true};}text=tagOpen+text+tagClose;pasteText(selection,text,opts);}function insertAtCarret(textAreaID,text){var txtarea=$(textAreaID);var selection=getSelection(txtarea);pasteText(selection,text,{nosel:true});}var pickercounter=0;function initToolbar(tbid,edid,tb){var toolbar=$(tbid);if(!toolbar)return;var edit=$(edid);if(!edit)return;if(edit.readOnly)return;toolbar.innerHTML='';var cnt=tb.length;for(var i=0;i5)lvl=5;var tags='=';for(var i=0;i<=5-lvl;i++)tags+='=';insertTags(edid,tags+' ',' '+tags+"\n",props['text']);pickerClose();return false;}function addBtnActionPicker(btn,props,edid){var pickerid='picker'+(pickercounter++);createPicker(pickerid,props,edid);addEvent(btn,'click',function(){pickerToggle(pickerid,btn);return false;});return true;}function addBtnActionLinkwiz(btn,props,edid){linkwiz.init($(edid));addEvent(btn,'click',function(){linkwiz.toggle();return false;});return true;}function pickerToggle(pickerid,btn){var picker=$(pickerid);if(picker.style.marginLeft=='-10000px'){var x=findPosX(btn);var y=findPosY(btn);picker.style.left=(x+3)+'px';picker.style.top=(y+btn.offsetHeight+3)+'px';picker.style.marginLeft='0px';}else{picker.style.marginLeft='-10000px';}}function pickerClose(){var pobjs=getElementsByClass('picker');for(var i=0;i3){field.value=field.value.substr(0,linestart)+field.value.substr(linestart+2);selection.start=selection.start-2;selection.end=selection.start;}else{field.value=field.value.substr(0,linestart)+field.value.substr(selection.start);selection.start=linestart;selection.end=linestart;}setSelection(selection);e.preventDefault();return false;}}else if(e.keyCode==32){var match=search.match(/(\n +)([*-] )$/);if(match){field.value=field.value.substr(0,linestart)+' '+field.value.substr(linestart);selection.start=selection.start+2;selection.end=selection.start;setSelection(selection);e.preventDefault();return false;}}}addInitEvent(function(){var field=$('wiki__text');if(!field)return;addEvent(field,'keydown',keyHandler);});function currentHeadlineLevel(textboxId){var field=$(textboxId);var selection=getSelection(field);var search="\n"+field.value.substr(0,selection.start);var lasthl=search.lastIndexOf("\n==");if(lasthl==-1&&field.form.prefix){search=field.form.prefix.value;lasthl=search.lastIndexOf("\n==");}search=search.substr(lasthl+1,6);if(search=='======')return 1;if(search.substr(0,5)=='=====')return 2;if(search.substr(0,4)=='====')return 3;if(search.substr(0,3)=='===')return 4;if(search.substr(0,2)=='==')return 5;return 0;}var textChanged=false;function changeCheck(msg){if(textChanged){var ok=confirm(msg);if(ok){var dwform=$('dw__editform');if(dwform){var params='call=draftdel';params+='&id='+encodeURIComponent(dwform.elements.id.value);var sackobj=new sack(DOKU_BASE+'lib/exe/ajax.php');sackobj.AjaxFailedAlert='';sackobj.encodeURIString=false;sackobj.runAJAX(params);}}return ok;}else{return true;}}function initChangeCheck(msg){var edit_text=document.getElementById('wiki__text');if(!edit_text)return;if(edit_text.readOnly)return;if(!$('dw__editform'))return;var links=document.getElementsByTagName('a');for(var i=0;i30*1000){var params='call=lock&id='+encodeURIComponent(locktimer.pageid);if(locktimer.draft){var dwform=$('dw__editform');params+='&prefix='+encodeURIComponent(dwform.elements.prefix.value);params+='&wikitext='+encodeURIComponent(dwform.elements.wikitext.value);params+='&suffix='+encodeURIComponent(dwform.elements.suffix.value);params+='&date='+encodeURIComponent(dwform.elements.date.value);}locktimer.sack.runAJAX(params);locktimer.lasttime=now;}};locktimer.refreshed=function(){var data=this.response;var error=data.charAt(0);data=data.substring(1);$('draft__status').innerHTML=data;if(error!='1')return;locktimer.reset();};var linkwiz={wiz:null,entry:null,result:null,timer:null,sack:null,textArea:null,selected:-1,selection:null,init:function(textArea){linkwiz.sack=new sack(DOKU_BASE+'lib/exe/ajax.php');linkwiz.sack.AjaxFailedAlert='';linkwiz.sack.encodeURIString=false;linkwiz.wiz=document.createElement('div');linkwiz.wiz.id='link__wiz';linkwiz.wiz.className='picker';linkwiz.wiz.style.top=(findPosY(textArea)+20)+'px';linkwiz.wiz.style.left=(findPosX(textArea)+80)+'px';linkwiz.wiz.style.marginLeft='-10000px';linkwiz.wiz.innerHTML=''+'
'+LANG['linkto']+'
'+'';textArea.form.parentNode.appendChild(linkwiz.wiz);linkwiz.textArea=textArea;linkwiz.result=$('link__wiz_result');linkwiz.entry=$('link__wiz_entry');var obj;obj=$('link__wiz_close');obj.onclick=linkwiz.hide;linkwiz.sack.elementObj=linkwiz.result;addEvent(linkwiz.entry,'keyup',linkwiz.onEntry);addEvent(linkwiz.result,'click',linkwiz.onResultClick);drag.attach(linkwiz.wiz,$('link__wiz_header'));},onEntry:function(e){if(e.keyCode==37||e.keyCode==39){return true;}if(e.keyCode==27){linkwiz.hide();e.preventDefault();e.stopPropagation();return false;}if(e.keyCode==38){linkwiz.select(linkwiz.selected-1);e.preventDefault();e.stopPropagation();return false;}if(e.keyCode==40){linkwiz.select(linkwiz.selected+1);e.preventDefault();e.stopPropagation();return false;}if(e.keyCode==13){if(linkwiz.selected>-1){var obj=linkwiz.getResult(linkwiz.selected);if(obj){var a=obj.getElementsByTagName('A')[0];linkwiz.resultClick(a);}}else if(linkwiz.entry.value){linkwiz.insertLink(linkwiz.entry.value);}e.preventDefault();e.stopPropagation();return false;}linkwiz.autocomplete();},getResult:function(num){var obj;var childs=linkwiz.result.getElementsByTagName('DIV');obj=childs[num];if(obj){return obj;}else{return null;}},select:function(num){if(num<0){linkwiz.deselect();return;}var obj=linkwiz.getResult(num);if(obj){linkwiz.deselect();obj.className+=' selected';if(obj.offsetTop>linkwiz.result.scrollTop+linkwiz.result.clientHeight){linkwiz.result.scrollTop+=obj.clientHeight;}else if(obj.offsetTop-linkwiz.result.clientHeightlinkwiz.result.scrollTop+linkwiz.result.clientHeight)||(obj.offsetTop-1){var obj=linkwiz.getResult(linkwiz.selected);if(obj){obj.className=obj.className.replace(/ ?selected/,'');}}linkwiz.selected=-1;},onResultClick:function(e){if(e.target.tagName!='A')return;e.stopPropagation();e.preventDefault();linkwiz.resultClick(e.target);return false;},resultClick:function(a){var id=a.title;if(id==''||id.substr(id.length-1)==':'){linkwiz.entry.value=id;linkwiz.autocomplete_exec();}else{linkwiz.entry.value=id;if(a.nextSibling&&a.nextSibling.tagName=='SPAN'){linkwiz.insertLink(a.nextSibling.innerHTML);}else{linkwiz.insertLink('');}}},insertLink:function(title){if(!linkwiz.entry.value)return;var sel=getSelection(linkwiz.textArea);if(sel.start==0&&sel.end==0)sel=linkwiz.selection;var stxt=sel.getText();if(!stxt&&!DOKU_UHC)stxt=title;if(linkwiz.textArea.form['id'].value.indexOf(':')!=-1&&linkwiz.entry.value.indexOf(':')==-1){linkwiz.entry.value=':'+linkwiz.entry.value;}var link='[['+linkwiz.entry.value+'|';if(stxt)link+=stxt;link+=']]';var so=linkwiz.entry.value.length+3;var eo=2;pasteText(sel,link,{startofs:so,endofs:eo});linkwiz.hide();},autocomplete:function(){if(linkwiz.timer!==null){window.clearTimeout(linkwiz.timer);linkwiz.timer=null;}linkwiz.timer=window.setTimeout(linkwiz.autocomplete_exec,350);},autocomplete_exec:function(){linkwiz.deselect();linkwiz.result.innerHTML='';linkwiz.sack.runAJAX('call=linkwiz&q='+encodeURI(linkwiz.entry.value));},clear:function(){linkwiz.result.innerHTML='Search for a matching page name above, or browse through the pages on the right';linkwiz.entry.value='';},show:function(){linkwiz.selection=getSelection(linkwiz.textArea);linkwiz.wiz.style.marginLeft='0px';linkwiz.entry.focus();linkwiz.autocomplete();},hide:function(){linkwiz.wiz.style.marginLeft='-10000px';linkwiz.textArea.focus();},toggle:function(){if(linkwiz.wiz.style.marginLeft=='-10000px'){linkwiz.show();}else{linkwiz.hide();}}};var media_manager={keepopen:false,hide:false,treeattach:function(obj){if(!obj)return;var items=obj.getElementsByTagName('li');for(var i=0;i';ajax.elementObj=content;ajax.afterCompletion=function(){media_manager.selectorattach(content);media_manager.confirmattach(content);media_manager.updatehide();};ajax.runAJAX(link.search.substr(1)+'&call=mediasearchlist');return false;},togglekeepopen:function(event,cb){if(cb.checked){DokuCookie.setValue('keepopen',1);media_manager.keepopen=true;}else{DokuCookie.setValue('keepopen','');media_manager.keepopen=false;}},togglehide:function(event,cb){if(cb.checked){DokuCookie.setValue('hide',1);media_manager.hide=true;}else{DokuCookie.setValue('hide','');media_manager.hide=false;}media_manager.updatehide();},updatehide:function(){var obj=$('media__content');if(!obj)return;var details=getElementsByClass('detail',obj,'div');for(var i=0;i';ajax.elementObj=content;ajax.afterCompletion=function(){media_manager.selectorattach(content);media_manager.confirmattach(content);media_manager.updatehide();media_manager.initFlashUpload();};ajax.runAJAX(link.search.substr(1)+'&call=medialist');return false;},toggle:function(event,clicky){var listitem=clicky.parentNode;var sublists=listitem.getElementsByTagName('ul');if(sublists.length){listitem.removeChild(sublists[0]);clicky.src=DOKU_BASE+'lib/images/plus.gif';return false;}var link=listitem.getElementsByTagName('a')[0];var ajax=new sack(DOKU_BASE+'lib/exe/ajax.php');ajax.AjaxFailedAlert='';ajax.encodeURIString=false;if(ajax.failed)return true;var ul=document.createElement('ul');listitem.appendChild(ul);ajax.elementObj=ul;ajax.afterCompletion=function(){media_manager.treeattach(ul);};ajax.runAJAX(link.search.substr(1)+'&call=medians');clicky.src=DOKU_BASE+'lib/images/minus.gif';return false;},suggest:function(){var file=$('upload__file');var name=$('upload__name');if(!file||!name)return;var text=file.value;text=text.substr(text.lastIndexOf('/')+1);text=text.substr(text.lastIndexOf('\\')+1);name.value=text;},initFlashUpload:function(){if(!hasFlash(8))return;var oform=$('dw__upload');var oflash=$('dw__flashupload');if(!oform||!oflash)return;var clicky=document.createElement('img');clicky.src=DOKU_BASE+'lib/images/multiupload.png';clicky.title=LANG['mu_btn'];clicky.alt=LANG['mu_btn'];clicky.style.cursor='pointer';clicky.onclick=function(){oform.style.display='none';oflash.style.display='';};oform.appendChild(clicky);}};addInitEvent(function(){media_manager.treeattach($('media__tree'));media_manager.selectorattach($('media__content'));media_manager.confirmattach($('media__content'));media_manager.attachoptions($('media__opts'));media_manager.initFlashUpload();});function addSbLeftTocToggle(){if(!document.getElementById)return;var header=$('sb__left__toc__header');if(!header)return;var obj=document.createElement('span');obj.id='sb__left__toc__toggle';obj.innerHTML='';obj.className='toc_close';obj.style.cursor='pointer';prependChild(header,obj);obj.parentNode.onclick=toggleSbLeftToc;try{obj.parentNode.style.cursor='pointer';obj.parentNode.style.cursor='hand';}catch(e){}}function toggleSbLeftToc(){var toc=$('sb__left__toc__inside');var obj=$('sb__left__toc__toggle');if(toc.style.display=='none'){toc.style.display='';obj.innerHTML='';obj.className='toc_close';}else{toc.style.display='none';obj.innerHTML='+';obj.className='toc_open';}}function addSbRightTocToggle(){if(!document.getElementById)return;var header=$('sb__right__toc__header');if(!header)return;var obj=document.createElement('span');obj.id='sb__right__toc__toggle';obj.innerHTML='';obj.className='toc_close';obj.style.cursor='pointer';prependChild(header,obj);obj.parentNode.onclick=toggleSbRightToc;try{obj.parentNode.style.cursor='pointer';obj.parentNode.style.cursor='hand';}catch(e){}}function toggleSbRightToc(){var toc=$('sb__right__toc__inside');var obj=$('sb__right__toc__toggle');if(toc.style.display=='none'){toc.style.display='';obj.innerHTML='';obj.className='toc_close';}else{toc.style.display='none';obj.innerHTML='+';obj.className='toc_open';}}addInitEvent(addSbLeftTocToggle);addInitEvent(addSbRightTocToggle);addInitEvent(function(){index.treeattach($('left__index__tree'));index.treeattach($('right__index__tree'));});var lightboxForEveryImg=0;function WindowSize(){this.w=0;this.h=0;return this.update();}WindowSize.prototype.update=function(){var d=document;this.w=(window.innerWidth)?window.innerWidth:(d.documentElement&&d.documentElement.clientWidth)?d.documentElement.clientWidth:d.body.clientWidth;this.h=(window.innerHeight)?window.innerHeight:(d.documentElement&&d.documentElement.clientHeight)?d.documentElement.clientHeight:d.body.clientHeight;return this;};function PageSize(){this.win=new WindowSize();this.w=0;this.h=0;return this.update();}PageSize.prototype.update=function(){var d=document;this.w=(window.innerWidth&&window.scrollMaxX)?window.innerWidth+window.scrollMaxX:(d.body.scrollWidth>d.body.offsetWidth)?d.body.scrollWidth:d.body.offsetWidt;this.h=(window.innerHeight&&window.scrollMaxY)?window.innerHeight+window.scrollMaxY:(d.body.scrollHeight>d.body.offsetHeight)?d.body.scrollHeight:d.body.offsetHeight;this.win.update();if(this.w=targ.w||orig.h>=targ.h)&&orig.h&&orig.w)ratio=((targ.w/orig.w)<(targ.h/orig.h))?targ.w/orig.w:targ.h/orig.h;imag.width=Math.floor(orig.w*ratio);imag.height=Math.floor(orig.h*ratio);self._expandable=(ratio<1.0)?true:false;if(self._ua.isWinIE)self._box.style.display="block";self._box.style.top=[self._pos.y+(self._page.win.h-imag.height-33)/2,'px'].join('');self._box.style.left=[((self._page.win.w-imag.width-30)/2),'px'].join('');self._show_caption(true);},_set_size:function(onResize){var self=this;if(self._open==-1)return;self._page.update();self._pos.update();var spin=self._wrap.firstChild;if(spin){var top=(self._page.win.h-spin.height)/2;if(self._wrap.style.position=='absolute')top+=self._pos.y;spin.style.top=[top,'px'].join('');spin.style.left=[(self._page.win.w-spin.width-30)/2,'px'].join('');}if(self._ua.isWinIE){self._wrap.style.width=[self._page.win.w,'px'].join('');self._wrap.style.height=[self._page.h,'px'].join('');}if(onResize)self._set_photo_size();},_show_action:function(){var self=this;if(self._open==-1||!self._expandable)return;var obj=document.getElementById('gallery__actionImage');if(!obj)return;obj.src=(self._expanded)?self._shrink:self._expand;obj.style.display='inline';},_hide_action:function(){var self=this;var obj=document.getElementById('gallery__actionImage');if(obj)obj.style.display='none';},_zoom:function(){var self=this;if(self._expanded){self._set_photo_size();self._expanded=false;}else if(self._open>-1){var imag=self._box.firstChild;self._box.style.top=[self._pos.y,'px'].join('');self._box.style.left='0px';imag.width=self._imgs[self._open].w;imag.height=self._imgs[self._open].h;self._show_caption(false);self._expanded=true;}self._show_action();},_show_caption:function(enable){var self=this;var caption=document.getElementById('gallery__lightboxCaption');if(!caption)return;if(caption.innerHTML.length==0||!enable){caption.style.display='none';}else{var imag=self._box.firstChild;with(caption.style){top=[imag.height+10,'px'].join('');left='0px';width=[imag.width+20,'px'].join('');height='';paddingBottom='3px';display='block';}}},_move:function(by){var self=this;var num=self._open+by;if(num<0)num=self._imgs.length-1;if(num>=self._imgs.length)num=0;self._disable_keyboard();self._hide_action();self._box.style.display="none";self._show(num);},_show:function(num){var self=this;var imag=new Image;if(num<0||num>=self._imgs.length)return;var loading=document.getElementById('gallery__loadingImage');var caption=document.getElementById('gallery__lightboxCaption');self._open=num;self._set_size(false);self._wrap.style.display="block";if(loading)loading.style.display='inline';imag.onload=function(){if(self._imgs[self._open].w==-1){self._imgs[self._open].w=imag.width;self._imgs[self._open].h=imag.height;}if(caption)caption.innerHTML=''+self._imgs[self._open].title+'
'+self._imgs[self._open].caption;self._set_photo_size();self._hide_action();self._box.style.display="block";self._box.firstChild.src=imag.src;self._box.firstChild.setAttribute('title',self._imgs[self._open].title);if(loading)loading.style.display='none';};self._expandable=false;self._expanded=false;self._enable_keyboard();imag.src=self._imgs[self._open].src;self._preload_neighbors(num);},_preload_neighbors:function(num){var self=this;if((self._imgs.length-1)>num){var preloadNextImage=new Image();preloadNextImage.src=self._imgs[num+1].src;}if(num>0){var preloadPrevImage=new Image();preloadPrevImage.src=self._imgs[num-1].src;}},_set_cursor:function(obj){var self=this;if(self._ua.isWinIE&&!self._ua.isNewIE)return;obj.style.cursor='pointer';},_close:function(){var self=this;self._open=-1;self._disable_keyboard();self._hide_action();self._wrap.style.display="none";self._box.style.display="none";},_enable_keyboard:function(){__lightbox=this;addEvent(document,'keydown',this._keyboard_action);},_disable_keyboard:function(){delete __lightbox;removeEvent(document,'keydown',this._keyboard_action);},_keyboard_action:function(e){var self=__lightbox;var keycode=0;if(e.which){keycode=e.which;}else{keycode=event.keyCode;}var key=String.fromCharCode(keycode).toLowerCase();if((key=='x')||(key=='c')||(keycode==27)){self._close();}else if((key=='p')||(keycode==37)){self._move(-1);}else if(key=='n'||(keycode==39)){self._move(+1);}}};function gallery_plugin(){var opts=$('media__opts');if(!opts)return;if(!window.opener)return;var glbl=document.createElement('label');var glnk=document.createElement('a');var gbrk=document.createElement('br');glnk.name='gallery_plugin';glnk.innerHTML='Add namespace as gallery';glnk.style.cursor='pointer';glnk.onclick=function(){var h1=$('media__ns');if(!h1)return;var ns=h1.innerHTML;opener.insertAtCarret('wiki__text','{{gallery>'+ns+'}}');if(!media.keepopen)window.close();};opts.appendChild(glbl);glbl.appendChild(glnk);opts.appendChild(gbrk);}addInitEvent(function(){var lightbox=new LightBox({loadingimg:DOKU_BASE+'lib/plugins/gallery/images/loading.gif',expandimg:DOKU_BASE+'lib/plugins/gallery/images/expand.gif',shrinkimg:DOKU_BASE+'lib/plugins/gallery/images/shrink.gif',closeimg:DOKU_BASE+'lib/plugins/gallery/images/close.gif',nextimg:DOKU_BASE+'lib/plugins/gallery/images/next.gif',previmg:DOKU_BASE+'lib/plugins/gallery/images/prev.gif'});gallery_plugin();});function plugin_tagindex_class(){this.pages=null;this.page=null;this.sack=null;this.done=1;this.count=0;}var pl_si=new plugin_tagindex_class();pl_si.sack=new sack(DOKU_BASE+'lib/plugins/tag/ajax.php');pl_si.sack.AjaxFailedAlert='';pl_si.sack.encodeURIString=false;function plugin_tagindex_throbber(on){obj=document.getElementById('pl_si_throbber');if(on){obj.style.visibility='visible';}else{obj.style.visibility='hidden';}}function plugin_tagindex_status(text){obj=document.getElementById('pl_si_out');obj.innerHTML=text;}function plugin_tagindex_cb_clear(){ok=this.response;if(ok==1){window.setTimeout("plugin_tagindex_index()",1000);}else{plugin_tagindex_status(ok);window.setTimeout("plugin_tagindex_clear()",5000);}}function plugin_tagindex_cb_pages(){data=this.response;pl_si.pages=data.split("\n");pl_si.count=pl_si.pages.length;plugin_tagindex_status(pl_si.pages.length+" pages found");pl_si.page=pl_si.pages.shift();window.setTimeout("plugin_tagindex_clear()",1000);}function plugin_tagindex_cb_index(){ok=this.response;if(ok==1){pl_si.page=pl_si.pages.shift();pl_si.done++;window.setTimeout("plugin_tagindex_index()",1000);}else{plugin_tagindex_status(ok);window.setTimeout("plugin_tagindex_index()",5000);}}function plugin_tagindex_index(){if(pl_si.page){plugin_tagindex_status('indexing
'+pl_si.page+'
('+pl_si.done+'/'+pl_si.count+')
');pl_si.sack.onCompletion=plugin_tagindex_cb_index;pl_si.sack.URLString='';pl_si.sack.runAJAX('call=indexpage&page='+encodeURI(pl_si.page));}else{plugin_tagindex_status('finished');plugin_tagindex_throbber(false);}}function plugin_tagindex_clear(){plugin_tagindex_status('clearing index...');pl_si.sack.onCompletion=plugin_tagindex_cb_clear;pl_si.sack.URLString='';pl_si.sack.runAJAX('call=clearindex');}function plugin_tagindex_go(){document.getElementById('pl_si_gobtn').style.display='none';plugin_tagindex_throbber(true);plugin_tagindex_status('Finding all pages');pl_si.sack.onCompletion=plugin_tagindex_cb_pages;pl_si.sack.URLString='';pl_si.sack.runAJAX('call=pagelist');}acl={init:function(){this.ctl=$('acl_manager');if(!this.ctl)return;var sel=$('acl__user').getElementsByTagName('select')[0];addEvent(sel,'change',acl.userselhandler);addEvent($('acl__tree'),'click',acl.treehandler);addEvent($('acl__user').getElementsByTagName('input')[1],'click',acl.loadinfo);},userselhandler:function(e){if(this.value=='__g__'||this.value=='__u__'){$('acl__user').getElementsByTagName('input')[0].style.display='';$('acl__user').getElementsByTagName('input')[1].style.display='';}else{$('acl__user').getElementsByTagName('input')[0].style.display='none';$('acl__user').getElementsByTagName('input')[1].style.display='none';}acl.loadinfo();},loadinfo:function(){var frm=$('acl__detail').getElementsByTagName('form')[0];var ajax=new sack(DOKU_BASE+'lib/plugins/acl/ajax.php');ajax.AjaxFailedAlert='';ajax.encodeURIString=false;if(ajax.failed)return true;var data=Array();data[0]=ajax.encVar('ns',frm.elements['ns'].value);data[1]=ajax.encVar('id',frm.elements['id'].value);data[2]=ajax.encVar('acl_t',frm.elements['acl_t'].value);data[3]=ajax.encVar('acl_w',frm.elements['acl_w'].value);data[4]=ajax.encVar('sectok',frm.elements['sectok'].value);data[5]=ajax.encVar('ajax','info');ajax.elementObj=$('acl__info');ajax.runAJAX(data.join('&'));return false;},parseatt:function(str){if(str[0]=='?')str=str.substr(1);var attributes={};var all=str.split('&');for(var i=0;i/g,">");return str;},treetoggle:function(clicky){var listitem=clicky.parentNode.parentNode;var sublists=listitem.getElementsByTagName('ul');if(sublists.length){listitem.removeChild(sublists[0]);clicky.src=DOKU_BASE+'lib/images/plus.gif';clicky.alt='+';return false;}var link=listitem.getElementsByTagName('a')[0];var ajax=new sack(DOKU_BASE+'lib/plugins/acl/ajax.php');ajax.AjaxFailedAlert='';ajax.encodeURIString=false;if(ajax.failed)return true;var ul=document.createElement('ul');listitem.appendChild(ul);ajax.elementObj=ul;ajax.runAJAX(link.search.substr(1)+'&ajax=tree');clicky.src=DOKU_BASE+'lib/images/minus.gif';return false;},treehandler:function(e){if(e.target.src){acl.treetoggle(e.target);}else if(e.target.href){var obj=getElementsByClass('cur',$('acl__tree'),'a');for(var i=0;i-1){frm.elements['ns'].value='';frm.elements['id'].value=acl.hsc(acl.parseatt(e.target.search)['id']);}else if(e.target.className.search(/idx_dir/)>-1){frm.elements['ns'].value=acl.hsc(acl.parseatt(e.target.search)['ns']);frm.elements['id'].value='';}acl.loadinfo();}e.stopPropagation();e.preventDefault();return false;}};addInitEvent(acl.init);function usrmgr_delconfirm(){if($('usrmgr__del')){addEvent($('usrmgr__del'),'click',function(){return confirm(reallyDel);});}};addInitEvent(usrmgr_delconfirm);function isBlank(s){if((s===null)||(s.length===0)){return true;}for(var i=0;i';var ajax=new sack(DOKU_BASE+'lib/exe/ajax.php');ajax.AjaxFailedAlert='';ajax.encodeURIString=false;ajax.setVar('call','discussion_preview');ajax.setVar('comment',comment);ajax.onCompletion=function(){var data=this.response;if(data===''){return;}preview.style.visibility='hidden';preview.innerHTML=data;preview.style.visibility='visible';};ajax.runAJAX();}addInitEvent(function(){if(typeof window.initToolbar=='function'){initToolbar("discussion__comment_toolbar","discussion__comment_text",toolbar)}});addInitEvent(function(){var btn=$('discussion__btn_preview');if(!btn)return;addEvent(btn,'click',discussion_ajax_preview);});addInitEvent(function(){var form=$('discussion__comment_form');if(!form)return;addEvent(form,'submit',function(){return validate(form);});});addInitEvent(function(){ajax_qsearch.init('qsearch__in','qsearch__out');});addInitEvent(function(){addEvent(document,'click',closePopups);});addInitEvent(function(){addTocToggle();});addInitEvent(function(){initSizeCtl('size__ctl','wiki__text');});addInitEvent(function(){initToolbar('tool__bar','wiki__text',toolbar);});addInitEvent(function(){initChangeCheck('Perderanse os cambios non gardados.\nEstá segura/o de que quere continuar?');});addInitEvent(function(){locktimer.init(840,'O seu bloqueo para editar esta páxina vai caducar nun minuto.\nPara de evitar conflitos, use o botón de previsualización para reiniciar o contador do tempo de bloqueo.',1);});addInitEvent(function(){scrollToMarker();});addInitEvent(function(){focusMarker();});