function Stub(){this.version="1.10";this.f_a=function(filename){document.write('<script charset="UTF-8" type="text/javascript" src="'+relativeConSensePath+filename+'"></script>');}
this.includeExternalJavaScriptFile=function(URI){document.write('<script charset="UTF-8" type="text/javascript" src="'+URI+'"></script>');}
this.includeCSSFile=function(filename){document.write('<link href="'+relativeConSensePath+filename+'" rel="stylesheet" type="text/css">');}
this.isDefined=function(variable){return (typeof(window[variable])=="undefined")?false:true;}}var stub=new Stub();if(stub.isDefined("relativeConSensePath")){if(relativeConSensePath.substr(-1) !="/"){relativeConSensePath+="/";}}else{var relativeConSensePath="./";}stub.includeCSSFile("css/conSense.css");var Drag={obj:null,init:function(o,oRoot,minX,maxX,minY,maxY,bSwapHorzRef,bSwapVertRef,fXMapper,fYMapper){o.onmousedown=Drag.start;o.hmode=bSwapHorzRef?false:true ;o.vmode=bSwapVertRef?false:true ;o.root=oRoot && oRoot !=null?oRoot:o ;if(o.hmode&& isNaN(parseInt(o.root.style.left))) o.root.style.left="0px";if(o.vmode&& isNaN(parseInt(o.root.style.top))) o.root.style.top="0px";if(!o.hmode && isNaN(parseInt(o.root.style.right))) o.root.style.right="0px";if(!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom="0px";o.minX=typeof minX !='undefined'?minX:null;o.minY=typeof minY !='undefined'?minY:null;o.maxX=typeof maxX !='undefined'?maxX:null;o.maxY=typeof maxY !='undefined'?maxY:null;o.xMapper=fXMapper?fXMapper:null;o.yMapper=fYMapper?fYMapper:null;o.root.onDragStart=new Function();o.root.onDragEnd=new Function();o.root.onDrag=new Function();},start:function(e){var o=Drag.obj=this;e=Drag.fixE(e);var y=parseInt(o.vmode?o.root.style.top: o.root.style.bottom);var x=parseInt(o.hmode?o.root.style.left:o.root.style.right);o.root.onDragStart(x,y);o.lastMouseX=e.clientX;o.lastMouseY=e.clientY;if(o.hmode){if(o.minX !=null) o.minMouseX=e.clientX-x+o.minX;if(o.maxX !=null) o.maxMouseX=o.minMouseX+o.maxX-o.minX;}else{if(o.minX !=null) o.maxMouseX=-o.minX+e.clientX+x;if(o.maxX !=null) o.minMouseX=-o.maxX+e.clientX+x;}if(o.vmode){if(o.minY !=null) o.minMouseY=e.clientY-y+o.minY;if(o.maxY !=null) o.maxMouseY=o.minMouseY+o.maxY-o.minY;}else{if(o.minY !=null) o.maxMouseY=-o.minY+e.clientY+y;if(o.maxY !=null) o.minMouseY=-o.maxY+e.clientY+y;}document.onmousemove=Drag.drag;document.onmouseup=Drag.end;return false;},drag:function(e){e=Drag.fixE(e);var o=Drag.obj;var ey=e.clientY;var ex=e.clientX;var y=parseInt(o.vmode?o.root.style.top: o.root.style.bottom);var x=parseInt(o.hmode?o.root.style.left:o.root.style.right);var nx,ny;if(o.minX !=null) ex=o.hmode?Math.max(ex,o.minMouseX):Math.min(ex,o.maxMouseX);if(o.maxX !=null) ex=o.hmode?Math.min(ex,o.maxMouseX):Math.max(ex,o.minMouseX);if(o.minY !=null) ey=o.vmode?Math.max(ey,o.minMouseY):Math.min(ey,o.maxMouseY);if(o.maxY !=null) ey=o.vmode?Math.min(ey,o.maxMouseY):Math.max(ey,o.minMouseY);nx=x+((ex-o.lastMouseX) * (o.hmode?1 :-1));ny=y+((ey-o.lastMouseY) * (o.vmode?1 :-1));if(o.xMapper){nx=o.xMapper(y)}
else if(o.yMapper){ny=o.yMapper(x);}Drag.obj.root.style[o.hmode?"left":"right"]=nx+"px";Drag.obj.root.style[o.vmode?"top":"bottom"]=ny+"px";Drag.obj.lastMouseX=ex;Drag.obj.lastMouseY=ey;Drag.obj.root.onDrag(nx,ny);return false;},end:function(){document.onmousemove=null;document.onmouseup=null;Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style[Drag.obj.hmode?"left":"right"]),parseInt(Drag.obj.root.style[Drag.obj.vmode?"top":"bottom"]));Drag.obj=null;},fixE:function(e){if(typeof e=='undefined') e=window.event;if(typeof e.layerX=='undefined') e.layerX=e.offsetX;if(typeof e.layerY=='undefined') e.layerY=e.offsetY;return e;}};var simpleClassesVersion="1.13";function SimpleDebug(){this.version=simpleClassesVersion;this.messages="";this.add=function(description,value){this.messages+=description+": "+value+"\n";}
this.print=function(){alert(this.messages);this.messages="";}
this.alert=function(description,value){alert(description+": "+value);}}function SimpleUtilities(){this.version=simpleClassesVersion;this.DOM_ELEMENT_NODE=1
this.DOM_ATTRIBUTE_NODE=2;this.DOM_TEXT_NODE=3;this.DOM_CDATA_SECTION_NODE=4;this.DOM_ENTITY_REFERENCE_NODE=5;this.DOM_ENTITY_NODE=6;this.DOM_PROCESSING_INSTRUCTION_NODE=7;this.DOM_COMMENT_NODE=8;this.DOM_DOCUMENT_NODE=9;this.DOM_DOCUMENT_TYPE_NODE=10;this.DOM_DOCUMENT_FRAGMENT_NODE=11;this.DOM_NOTATION_NODE=12;this.linkTo=function(dest){document.location.href=dest;}
this.checkBrowser=function(){if(!(document.all||document.getElementById)){alert("SimpleUtilities.checkBrowser() error: Please upgrade to a more modern browser. This interactive webpage will not operate properly.");return;}}
this.getDOMElement=function(elemId){var result=document.all?document.all[elemId]:document.getElementById(elemId);return result;}
this.getKeyName=function(keyEvent){if(!keyEvent){keyEvent=window.event;}var keyCode=keyEvent.keyCode;var keyName="Unknown";switch(keyCode){case 13:keyName="Enter";break;case 16:keyName="Shift";break;case 17:keyName="Ctrl";break;case 18:keyName="Alt";break;case 19:keyName="Pause";break;case 32:keyName="Space";break;case 8:keyName="Backspace";break;case 9:keyName="Tab";break;case 37:keyName="Arrow Left";break;case 38:keyName="Arrow Up";break;case 39:keyName="Arrow Right";break;case 40:keyName="Arrow Down";break;case 33:keyName="Page Up";break;case 34:keyName="Page Down";break;case 36:keyName="Home";break;case 35:keyName="End";break;case 45:keyName="Insert";break;case 46:keyName="Delete";break;case 92:keyName="Win";break;case 93:keyName="Select";break;case 123:keyName="Fxx";break;case 144:keyName="Num Lock";break;case 145:keyName="Scroll Lock";break;case 20:keyName="Caps Lock";break;case 27:keyName="Esc";break;}return keyName;}
this.trimString=function(str){return (str+"").replace(/^\s*|\s*$/g,"");}
this.HTML2Source=function(str){return (str+"").replace(/</g,"&lt;").replace(/>/g,"&gt;");}
this.f_a=function(filename){document.write('<script charset="UTF-8" type="text/javascript" src="'+filename+'"></script>');}
this.isDefined=function(variable){return (typeof(window[variable])=="undefined")?false:true;}
this.regexpResultLength=function(regexp,text){var len=text.length-text.replace(regexp,"").length;return len;}
this.liteDown=function(text,patternList){var regexp;var replacement;var text2;if(!patternList){return text;}else{for(var i in patternList){text2=text;do{text=text2;text2=text.replace(patternList[i].regexp,patternList[i].replacement);}while (text2 !=text);}}return text;}
this.toObject=function(obj){if(typeof(obj)=="string"){obj=this.getDOMElement(obj);}return obj;}
this.attachEvent=function(element,eventName,callback,capturing){if(element.addEventListener){element.addEventListener(eventName,callback,capturing);}else if(element.attachEvent){element.attachEvent("on"+eventName,callback);}}
this.objectArray2objectHashTable=function(array,indexName){var hashTable=new Array();for(var i in array){hashTable[array[i][indexName]]=array[i];}return hashTable;}}function SimpleCryptography(){this.version=simpleClassesVersion;this.base64KeyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";this.base64Encode=function(input){var output="";var chr1,chr2,chr3="";var enc1,enc2,enc3,enc4="";var i=0;do{chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1 >> 2;enc2=((chr1 & 3) << 4) | (chr2 >> 4);enc3=((chr2 & 15) << 2) | (chr3 >> 6);enc4=chr3 & 63;if(isNaN(chr2)){enc3=enc4=64;}else if(isNaN(chr3)){enc4=64;}output=output+this.base64KeyStr.charAt(enc1)+this.base64KeyStr.charAt(enc2)+this.base64KeyStr.charAt(enc3)+this.base64KeyStr.charAt(enc4);chr1=chr2=chr3="";enc1=enc2=enc3=enc4="";}while (i<input.length);return output;}
this.generateRandomString=function(len){var charBuffer="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var result="";for(var i=0;i<len;i++){result+=charBuffer[Math.floor(Math.random() * charBuffer.length)];}return result;}}function rem(str){}var simpleDebug=new SimpleDebug();var simpleUtils=new SimpleUtilities();var simpleCrypto=new SimpleCryptography();var redSandVersion="0.34";var redSandId=0;function RedSandUtilities(){this.version=redSandVersion;this.generateCredentials=function(encodePassword,packetPassword){if(packetPassword==undefined){packetPassword=encodePassword;}var encodePasswordHash=simpleCrypto.SHA1(encodePassword);var packetPasswordHash=simpleCrypto.SHA1(packetPassword);var thisDate=new Date().format("YYYY-MM-DD HH:mm:ss");var randomString=simpleCrypto.generateRandomString(16);var credentialsPackage=escape(simpleCrypto.RC4Encrypt(encodePasswordHash,packetPasswordHash+thisDate+randomString));return credentialsPackage;}}function RedSandGenericLoader(){this.version=redSandVersion;this.containers=new Array();this.frameNames=new Array();this.callbacks=new Array();this.lastProcess=0;this.oldContainerPool=new Array();this.indicate=true;this.loadsInProgress=0;this.showIndicator=function(){if(!redSandGenericLoader.indicate){return;}redSandGenericLoader.loadsInProgress++;if(redSandGenericLoader.loadsInProgress==1){simpleUtils.getDOMElement("loadIndicator").style.display="block";}}
this.hideIndicator=function(){if(!redSandGenericLoader.indicate){return;}redSandGenericLoader.loadsInProgress--;if(redSandGenericLoader.loadsInProgress==0){simpleUtils.getDOMElement("loadIndicator").style.display="none";}}
this.load=function(uri,callback){this.showIndicator();if(callback==undefined){callback=redSandGenericLoader.JavaScriptEvaluatorCallback;}
this.callbacks.push(callback);if(this.oldContainerPool.length){this.containers.push(this.oldContainerPool.pop());}else{var newContainer=document.createElement('div');newContainer.setAttribute("id","RedSandLoaderContainer"+this.lastProcess);newContainer.style.display="none";conSense.conSenseContainer.appendChild(newContainer);this.containers.push(newContainer);}
this.frameNames.push("RedSandLoader"+this.lastProcess);this.containers[this.lastProcess].innerHTML="<iframe name='"+this.frameNames[this.lastProcess]+"' id='"+this.frameNames[this.lastProcess]+"' onLoad='parent.redSandGenericLoader.loadedCallback("+this.lastProcess+")' src='' style='width: 0px;height: 0px;border: 0px;'></iframe>";window.frames[this.frameNames[this.lastProcess]].document.location=uri;this.lastProcess++;}
this.loadedCallback=function(processNum){var content="deadbeef";if(window.frames[this.frameNames[processNum]].document.body.innerText==undefined){if(window.frames[this.frameNames[processNum]].document.body.textContent==undefined){content=window.frames[this.frameNames[processNum]].document.body.innerHTML;}else{content=window.frames[this.frameNames[processNum]].document.body.textContent;}}else{content=window.frames[this.frameNames[processNum]].document.body.innerText;}var callback=this.callbacks[processNum];this.callbacks[processNum]=undefined;this.oldContainerPool.push(this.containers[processNum]);this.containers[processNum]=undefined;this.frameNames[processNum]=undefined;conSense.scrollToBottomFocusInput();callback(content);this.hideIndicator();conSense.separator();conSense.scrollToBottomFocusInput();}
this.JavaScriptEvaluatorCallback=function(content){try{eval(content);}catch(ex){conSense.writeLn(">>> JavaScript exception: "+ex);conSense.listObject(ex);}conSense.separator();conSense.scrollToBottomFocusInput();}}function RedSandHashHandler(){this.version=redSandVersion;this.hashSeparator="#";this.paramSeparator=";";this.equalsString="=";this.onHashChanged=function (){}
this.lastHash="deadbeef";this.lastSelectedNodes=new Array();this.defaultHash="deadbeef";window.setInterval(function (){if(redSandHashHandler.changed()) redSandHashHandler.onHashChanged();},100);this.changed=function(){if(window.location.hash !=this.lastHash){this.lastHash=window.location.hash;return true;}else{return false;}}
this.setDefaultHash=function(hash){this.defaultHash=hash;if(window.location.hash==""){window.location.hash=hash;}}
this.array2Hash=function(params){var hash=this.hashSeparator;for(var i in params){hash+=""+i+this.equalsString+params[i]+this.paramSeparator;}if(hash.length>2){hash=hash.substr(0,hash.length-this.paramSeparator.length);}return hash;}
this.hash2Array=function(hash){if(hash.substr(hash.length-this.paramSeparator.length)==this.paramSeparator){hash=hash.substr(0,hash.length-this.paramSeparator.length);}var params=new Array();var paramsTemp=hash.substr(this.hashSeparator.length).split(this.paramSeparator);for(var i=0;i<paramsTemp.length;i++){var splitInTwo=paramsTemp[i].split(this.equalsString);params[splitInTwo[0]]=splitInTwo[1];}return params;}
this.getDocumentAnchors=function(){var anchors=new Array();for(var i=0;i<document.anchors.length;i++){anchors[this.hashSeparator+document.anchors[i].name]=true;}return anchors;}
this.processCurrentURIHash=function(){var anchors=this.getDocumentAnchors();if(anchors[window.location.hash]==undefined){return this.hash2Array(window.location.hash);}return undefined;}
this.updateNodeStyles=function(){for(var i=0;i<this.lastSelectedNodes.length;i++){var elem=simpleUtils.getDOMElement(this.lastSelectedNodes[i].id);elem.className=this.lastSelectedNodes[i].className;}
this.lastSelectedNodes=new Array();var nodes=redSandLoader.findNodesByLink(window.location.hash);for(var i=0;i<nodes.length;i++){var elem=simpleUtils.getDOMElement(nodes[i].id);elem.className=nodes[i].selectedClassName;this.lastSelectedNodes.push(nodes[i]);}}
this.loadHashContent=function(callback,paramProcessor){if(window.location.hash==""){window.location.hash=this.defaultHash;}var params=this.processCurrentURIHash();var sourceURI=paramProcessor(params);if(sourceURI==undefined){return;}
this.updateNodeStyles();redSandGenericLoader.load(sourceURI,callback);}
this.updateHashContent=function(hash,callback,paramProcessor){window.location.hash=hash;this.loadHashContent(callback,paramProcessor);}}function RedSandLoader(){this.version=redSandVersion;this.menus=new Array();this.findNodesByLink=function(link){var nodes=new Array();for(var i in this.menus){var menu=this.menus[i];if(!menu.items) continue;for(var j in menu.items){var item=menu.items[j];if(!item.link) continue;if(item.link==link){nodes.push(item);}}}return nodes;}
this.addMenu=function(obj){this.menus[obj.name]=obj;}
this.loadMenuContent=function(name,index){if(this.menus[name].items.length<index){return;}redSandHashHandler.updateHashContent(this.menus[name].items[index].link,this.menus[name].callback,this.menus[name].paramProcessor);}}function RedSandNode(name,className,selectedClassName,link,custom){this.version=redSandVersion;this.id=name;this.name=name;this.label=name;this.className=className;this.selectedClassName=selectedClassName;this.link=link;this.custom=custom;this.callback=undefined;this.paramProcessor=undefined;this.renderString=function(){var result="<a "+"id='"+this.id+"' class='"+this.className+"' href='"+this.link+"'>"+this.label+"</a>";return result;}}function RedSandMenu(name,items,menuContainer,contentContainer){this.version=redSandVersion;this.name=name;this.items=items;this.menuContainer=simpleUtils.getDOMElement(menuContainer);this.contentContainer=simpleUtils.getDOMElement(contentContainer);this.defaultCallback=new Function("content","simpleUtils.getDOMElement('"+contentContainer+"').innerHTML=simpleUtils.liteDown(content);");this.callback=this.defaultCallback;this.defaultParamProcessor=new Function("params","return \"articles/\"+params.lang+\"/\"+params.article+\".txt\";");this.paramProcessor=this.defaultParamProcessor;this.render=function(){if(!this.items.length) return "";for(var i=0;i<this.items.length;i++){this.menuContainer.innerHTML+=this.items[i].renderString();}}
this.updateNodeStyles=function(){}}function RedSandTree(nodes,DOMContainer,CSSClassNamePrefix){this.version=redSandVersion;this.nodes=nodes;this.DOMContainer=DOMContainer;if(!CSSClassNamePrefix){CSSClassNamePrefix="redSandTree";}
this.CSSClassNamePrefix=CSSClassNamePrefix;this.render=function(level){this.DOMContainer.innerHTML=this.renderString();}
this.renderString=function(level){var innerString="";if(level==undefined){level=0;}innerString+="<ul class='"+this.CSSClassNamePrefix+"UlLevel"+level+"'>";for(var i=0;i<this.nodes.length;i++){if(this.nodes[i] instanceof Array){var oldnodes=this.nodes;this.nodes=this.nodes[i];innerString+=this.renderString(level+1);this.nodes=oldnodes;}else{if(this.nodes[i]){innerString+="<li class='"+this.CSSClassNamePrefix+"LiLevel"+level+"'>"+this.nodes[i].renderString()+"</li>";}}}innerString+="</ul>";return innerString;}}function RedSandLabelCollection(labels){this.version=redSandVersion;this.labels=labels;this.addLabel=function(name){if(!this.hasLabel(name)){this.labels.push(new RedSandLabel(name));}}
this.addLabelObject=function(labelObj){if(!this.hasLabel(labelObj.name)){this.labels.push(labelObj);}}
this.deleteLabel=function(name){var newLabels=new Array();for(var i in this.labels){if(this.labels[i].name !=name){newLabels.push(this.labels[i]);}}this.labels=newLabels;}
this.hasLabel=function(name){var result=false;for(var i in this.labels){if(this.labels[i].name==name){result=true;break;}}return result;}}function RedSandWindowlet(left,top,width,height,background,border,draggable){this.version=redSandVersion;if(background==undefined){background="white";}if(border==undefined){border="1px solid gray";}if(draggable==undefined){draggable=true;}
this.left=left;this.top=top;this.width=width;this.height=height;this.background=background;this.border=border;this.draggable=draggable;this.DOMContainer=undefined;this.DOMContainer=document.createElement('div');this.DOMContainer.style.display="block";this.DOMContainer.style.position="absolute";this.DOMContainer.style.overflow="auto";this.DOMContainer.style.width=this.width;this.DOMContainer.style.height=this.height;this.DOMContainer.style.left=this.left;this.DOMContainer.style.top=this.top;this.DOMContainer.style.background=background;this.DOMContainer.style.border=this.border;redSandWindowletManager.initZIndex(this);document.body.appendChild(this.DOMContainer);if(this.draggable){Drag.init(this.DOMContainer,null,0,1000000000,0,1000000000);var windowlet=this;this.DOMContainer.onDragStart=function(x,y){redSandWindowletManager.updateZIndex(windowlet);}}
this.show=function(){this.DOMContainer.style.display="block";}
this.hide=function(){this.DOMContainer.style.display="none";}}function RedSandWindowletManager(){this.version=redSandVersion;this.topmostWindowlet=undefined;this.highestZIndex=1000000;this.initZIndex=function(windowlet){windowlet.DOMContainer.style.zIndex=this.highestZIndex++;this.topmostWindowlet=windowlet;}
this.updateZIndex=function(windowlet){var windowletZIndex=windowlet.DOMContainer.style.zIndex;windowlet.DOMContainer.style.zIndex=this.topmostWindowlet.DOMContainer.style.zIndex;this.topmostWindowlet.DOMContainer.style.zIndex=windowletZIndex;this.topmostWindowlet=windowlet;}}var redSandUtils=new RedSandUtilities();var redSandGenericLoader=new RedSandGenericLoader();var redSandLoader=new RedSandLoader();var redSandWindowletManager=new RedSandWindowletManager();var redSandHashHandler=new RedSandHashHandler();function ConSense(){this.version="1.6";this.debug=true;this.echo=true;this.verbose=true;this.commandLine="";this.oldCommandLine="";this.conSenseContainer;this.conSenseInnerContainer;this.conSenseHeader;this.conSenseHeaderSwitch;this.conSenseOut;this.conSenseIn;this.conSenseCounter;this.containerHeight;this.containerScrollTop;this.zTop=1000000000;this.scrollInfinite=1000000000;this.visible=this.show;this.globalVisible=this.show;this.show=true;this.hide=false;this.toggle="toggle";this.interfaceText={showConsoleButton: "Show",hideConsoleButton: "Hide"}
this.outlineColor="red";this.lastKeyEventType="deadbeef";this.commandHistory=new Array();this.commandHistoryPosition=0;this.currentlyTypedCommand="";this.tabPixelSize=20;this.mapResultBuffer;this.mapTempObjects;this.mapTempObjectCounter=0;this.mapExcerptSize=40;this.mapShowConSense=false;this.mapShowEmptyTexts=false;this.lastWriteLn="";this.separatorString="===============================";this.writeTitle=function(){this.writeLn("Type "+conSense.highlightAppendLink("help()")+"+Enter for usage information.");}
this.clearScreen=function(){this.conSenseOut.innerHTML="";this.writeTitle();}
this.write=function(str){this.conSenseOut.innerHTML+=str;}
this.writeLn=function(str){this.lastWriteLn=str;this.conSenseOut.innerHTML+=str+"<br />";}
this.writeManualEntry=function(name,str){if(name !=""){this.conSenseOut.innerHTML+="<div class='conSenseManualEntry'>"+"<span class='conSenseManualEntryHead'>"+conSense.highlightAppendLink(name)+"</span> "+str+"</div>";}else{this.conSenseOut.innerHTML+="<div class='conSenseManualEntry'>"+"<span class='conSenseManualEntryHead'>"+"</span> "+str+"</div>";}}
this.separator=function(){if(this.lastWriteLn !=this.separatorString){this.writeLn(this.separatorString);}}
this.debugLn=function(value0,value1){if(this.debug){var now=new Date();if(value0==undefined){value0="";}if(value1==undefined){value1="";}
this.writeLn("("+now.format("HH:mm:ss")+") *"+value0+"* *"+value1+"*");}}
this.echoLn=function(str){if(this.echo){this.writeLn("[echo: "+this.highlightAppendLink(str)+"]");}}
this.verboseLn=function(str){if(this.verbose && str !=undefined){this.writeLn("[result: "+str+"]");}}
this.getInput=function(){return simpleUtils.trimString(this.conSenseIn.value);}
this.setInput=function(str){this.conSenseIn.value=str;}
this.appendInput=function(str){if(this.conSenseIn.value.length==0){this.conSenseIn.value+=str;}else{this.conSenseIn.value+=" "+str;}this.scrollToBottomFocusInput();}
this.highlight=function(str){return "<span class='conSenseHighlight'>&nbsp;"+str+"&nbsp;</span>";}
this.highlightAppendLink=function(str){return "<a class='conSenseHighlightAppendLink' href='javascript:conSense.appendInput(\""+str.replace(/"/g,"\\\"")+"\")'>"+ "<img src='"+relativeConSensePath+"images/conSense/orangeArrow.png' style='border: 0;'>"+ simpleUtils.HTML2Source(str)+"</a>";}
this.highlightLabelledAppendLink=function(label,str){return "<a class='conSenseHighlightAppendLink' href='javascript:conSense.appendInput(\""+ str.replace(/"/g,"\\\"")+"\")'>"+label+"</a>";}
this.init=function(show,startXPos,startYPos){simpleUtils.checkBrowser();document.body.innerHTML+='<!-- RedSand--><div id="loadIndicator" class="loadIndicator"><img src="'+relativeConSensePath+'images/conSense/loader.gif" style="border: 0;"></div><!-- End of RedSand-->';if(startXPos==undefined){startXPos="20px";}if(startYPos==undefined){startYPos="20px";}document.body.innerHTML+='<!-- ConSense--><div id="conSenseContainer" class="conSenseContainer"><div id="conSenseHeader" class="conSenseHeader">Loading ConSense...</div><div id="conSenseHeaderSwitch" class="conSenseHeaderSwitch"onClick="conSense.showConsole(conSense.toggle)">&nbsp;</div><div id="conSenseInnerContainer" class="conSenseInnerContainer" onScroll="conSense.containerScrollTop=conSense.conSenseInnerContainer.scrollTop"><form><div id="conSenseOut" class="conSenseOut"onDblClick="conSense.scrollToBottomFocusInput()"></div><input id="conSenseIn" class="conSenseIn" onKeyDown="conSense.handleInput(event,\'down\')" onKeyPress="conSense.handleInput(event,\'press\')" onKeyUp="conSense.handleInput(event,\'up\')" type="text" maxlength="1000" size="1000" /><input id="conSenseCounter" class="conSenseCounter" type="text" maxlength="4" size="4" readonly /></form></div></div><!-- End of ConSense-->';this.conSenseContainer=simpleUtils.getDOMElement("conSenseContainer");this.conSenseInnerContainer=simpleUtils.getDOMElement("conSenseInnerContainer");this.conSenseHeader=simpleUtils.getDOMElement("conSenseHeader");this.conSenseHeaderSwitch=simpleUtils.getDOMElement("conSenseHeaderSwitch");this.conSenseOut=simpleUtils.getDOMElement("conSenseOut");this.conSenseIn=simpleUtils.getDOMElement("conSenseIn");this.conSenseCounter=simpleUtils.getDOMElement("conSenseCounter");this.containerHeight=this.conSenseInnerContainer.style.height;this.innerContainerHeight=this.conSenseInnerContainer.style.height;this.conSenseHeader.innerHTML="ConSense v"+this.version;this.showConsole(show);this.globalShowConsole(show);this.writeTitle();this.separator();this.updateCounter();this.scrollToBottomFocusInput();this.conSenseContainer.style.zIndex=this.zTop;this.conSenseContainer.style.left=startXPos;this.conSenseContainer.style.top=startYPos;Drag.init(this.conSenseHeader,this.conSenseContainer,0,1000000000,0,1000000000);}
this.updateCounter=function(){this.conSenseCounter.value=this.conSenseIn.value.length;}
this.handleInput=function(event,type){var thisEvent=(simpleUtils.getKeyName(event));if(thisEvent=="Enter"&& this.lastKeyEventType=="press"){this.handleCommand();}else if(thisEvent=="Arrow Up"&& this.lastKeyEventType=="down"){if(this.commandHistoryPosition==this.commandHistory.length){this.currentlyTypedCommand=this.getInput();}if(this.commandHistoryPosition>0){this.commandHistoryPosition--;this.setInput(this.commandHistory[this.commandHistoryPosition]);}}else if(thisEvent=="Arrow Down"&& this.lastKeyEventType=="down"){if(this.commandHistoryPosition==this.commandHistory.length-1){this.commandHistoryPosition++;this.setInput(this.currentlyTypedCommand);}else if(this.commandHistoryPosition<this.commandHistory.length-1){this.commandHistoryPosition++;this.setInput(this.commandHistory[this.commandHistoryPosition]);}}else if(this.getInput() !=this.oldCommandLine){this.commandHistoryPosition=this.commandHistory.length;}this.updateCounter();this.lastKeyEventType=type;this.oldCommandLine=this.getInput();}
this.handleCommand=function(){this.commandLine=this.getInput();this.commandHistory.push(this.commandLine);this.commandHistoryPosition=this.commandHistory.length;this.setInput("");this.updateCounter();this.echoLn(this.commandLine);try{var result=eval(this.commandLine);this.verboseLn(result);}catch(ex){this.writeLn(">>> JavaScript exception: "+ex);this.listObject(ex);}this.separator();this.scrollToBottomFocusInput();}
this.showConsole=function(show){if(show==conSense.toggle){if(this.visible){this.showConsole(this.hide);}else{this.showConsole(this.show);}}else if(show){this.visible=show;this.conSenseHeaderSwitch.innerHTML=this.interfaceText.hideConsoleButton;this.conSenseContainer.style.height=this.containerHeight;this.conSenseInnerContainer.style.display="block";this.conSenseInnerContainer.scrollTop=this.containerScrollTop;}else{this.visible=show;this.conSenseHeaderSwitch.innerHTML=this.interfaceText.showConsoleButton;this.conSenseInnerContainer.style.display="none";this.conSenseContainer.style.height="21px";}}
this.scrollToBottomFocusInput=function(){this.updateCounter();this.conSenseInnerContainer.scrollTop=this.scrollInfinite;if(this.visible && this.globalVisible){this.conSenseIn.focus();this.conSenseInnerContainer.scrollTop=this.scrollInfinite;}}
this.globalShowConsole=function(show){if(show==conSense.toggle){if(this.globalVisible){this.globalShowConsole(this.hide);}else{this.globalShowConsole(this.show);}}else if(show){this.globalVisible=show;this.conSenseContainer.style.display="block";this.conSenseInnerContainer.scrollTop=this.containerScrollTop;}else{this.globalVisible=show;this.containerScrollTop=this.conSenseInnerContainer.scrollTop;this.conSenseContainer.style.display="none";}}
this.listObject=function(obj){obj=simpleUtils.toObject(obj);for(var i in obj){try{this.writeLn(this.highlight(i)+"-"+simpleUtils.HTML2Source(obj[i]));}catch(ex){}}}
this.listObjectStyle=function(obj){obj=simpleUtils.toObject(obj);this.listObject(obj.style);}
this.outlineDOMElement=function(obj){obj=simpleUtils.toObject(obj);obj.style.border="1px solid "+this.outlineColor;}
this.outlineDOMElementsByTag=function(tagName){var elements=document.getElementsByTagName(tagName);for(var i=0;i<elements.length;i++){elements[i].style.border="1px solid "+this.outlineColor;}}
this.outlineDOMSubtree=function(obj,level){obj=simpleUtils.toObject(obj);if(level==undefined){level=0;}if(level==0){obj.style.border="1px solid "+this.outlineColor;}for(var i=0;i<obj.childNodes.length;i++){var childNode=obj.childNodes[i];if(childNode.nodeType==simpleUtils.DOM_ELEMENT_NODE){childNode.style.border="1px solid "+this.outlineColor;}this.outlineDOMSubtree(childNode,level+1);}}
this.tabulator=function(times){return "<span style='margin-left: "+times * this.tabPixelSize+"px'></span>";}
this.mapAppendObjectLink=function(childNode,level,i){var index="l"+level+"n"+i+"_"+this.mapTempObjectCounter++;this.mapTempObjects[index]=childNode;this.mapResultBuffer+=this.tabulator(level)+this.highlightLabelledAppendLink("(o)","conSense.mapTempObjects[\""+index+"\"]")+(" ");}
this.mapDOMSubtree=function(obj,level){obj=simpleUtils.toObject(obj);if(level==undefined){level=0;this.mapResultBuffer="";this.mapTempObjects=new Array();this.mapTempObjectCounter=0;}for(var i=0;i<obj.childNodes.length;i++){var childNode=obj.childNodes[i];this.mapTempObjectCounter++;if(childNode.nodeType==simpleUtils.DOM_ELEMENT_NODE){var id="";var className="";this.mapAppendObjectLink(childNode,level,i);if(childNode.id){id=" id: "+this.highlightAppendLink(childNode.id);}if(childNode.className){className=" class: "+childNode.className;}this.mapResultBuffer+=this.highlight(childNode.nodeName)+id+className+"<br />";if(childNode.id=="conSenseContainer"&& !this.mapShowConSense){this.mapResultBuffer+=this.tabulator(level)+"(...)<br />";continue;}if(childNode.attributes){for(var j=0;j<childNode.attributes.length;j++){if(childNode.attributes[j].specified){if(childNode.attributes[j].nodeName !="id"&& childNode.attributes[j].nodeName !="class"){this.mapResultBuffer+=this.tabulator(level)+childNode.attributes[j].nodeName+": "+simpleUtils.HTML2Source(childNode.attributes[j].nodeValue)+"<br />";}}}}}if(childNode.nodeType==simpleUtils.DOM_TEXT_NODE){var excerpt="";if(!this.mapShowEmptyTexts){var hide=true;for(var j=0;j<childNode.nodeValue.length;j++){if(childNode.nodeValue.charAt(j) !="\n"&& childNode.nodeValue.charAt(j) !="\t"&& childNode.nodeValue.charAt(j) !=" "){hide=false;break;}}if(hide) continue;}this.mapAppendObjectLink(childNode,level,i);this.mapResultBuffer+=this.highlight("text");if(childNode.nodeValue.length>this.mapExcerptSize){excerpt=childNode.nodeValue.substring(0,this.mapExcerptSize)+" (...)";}else{excerpt=childNode.nodeValue;}this.mapResultBuffer+=" \""+excerpt+"\"<br />";}if(childNode.nodeType==simpleUtils.DOM_COMMENT_NODE){var excerpt="";this.mapAppendObjectLink(childNode,level,i);this.mapResultBuffer+=this.highlight("comment");if(childNode.nodeValue.length>this.mapExcerptSize){excerpt=childNode.nodeValue.substring(0,this.mapExcerptSize)+" (...)";}else{excerpt=childNode.nodeValue;}this.mapResultBuffer+=" \""+excerpt+"\"<br />";}if(childNode.nodeType==simpleUtils.DOM_DOCUMENT_TYPE_NODE){this.mapAppendObjectLink(childNode,level,i);this.mapResultBuffer+=this.highlight("DOCTYPE")+" "+childNode.nodeName+" PUBLIC \""+childNode.publicId+"\"<br />";}this.mapDOMSubtree(childNode,level+1);}if(level==0){this.write(this.mapResultBuffer);}}
this.mapDynamicCSS=function(obj,level){obj=simpleUtils.toObject(obj);var id="";var className="";var cssTextRows;if(level==undefined){level=0;}if(obj !=document.body&& obj.parentNode){this.mapDynamicCSS(obj.parentNode,level+1);}else{deepestLevel=level;}if(obj.nodeName.toUpperCase()=="#TEXT"){this.writeLn(this.tabulator(deepestLevel-level)+this.highlight(obj.nodeName));return;}
this.write(this.tabulator(deepestLevel-level)+this.highlight(obj.nodeName));if(obj.id){id=" id: "+this.highlightAppendLink(obj.id);}if(obj.className){className=" class: "+obj.className;}
this.writeLn(id+className);if(obj.style.cssText){cssTextRows=obj.style.cssText.split(";");for(var i=0;i<cssTextRows.length;i++){if(cssTextRows[i].length){this.writeLn(this.tabulator(deepestLevel-level)+cssTextRows[i]+";");}}}}
this.listCSS=function(){var headNode=false;for(var i=0;i<document.childNodes.length;i++){var childNode=document.childNodes[i];if(childNode.nodeType==simpleUtils.DOM_ELEMENT_NODE&& childNode.nodeName.toUpperCase()=="HTML"){var foundNode=childNode;for(var j=0;j<foundNode.childNodes.length;j++){var childNode=foundNode.childNodes[j];if(childNode.nodeType==simpleUtils.DOM_ELEMENT_NODE&& childNode.nodeName.toUpperCase()=="HEAD"){headNode=childNode;}}}}if(headNode){for(var i=0;i<headNode.childNodes.length;i++){var childNode=headNode.childNodes[i];if(childNode.nodeType==simpleUtils.DOM_ELEMENT_NODE){if(childNode.nodeName.toUpperCase()=="STYLE"){this.listCSS_HandleStyleNode(childNode);}if(childNode.nodeName.toUpperCase()=="LINK"){this.listCSS_HandleLinkNode(childNode);}}}}}
this.listCSS_getFormattedRule=function(ruleString){var lines=new Array();if(simpleUtils.trimString(ruleString).search("\n")>0){lines=simpleUtils.trimString(ruleString).split(/\n/);}else{lines=simpleUtils.trimString(ruleString).split(/;/);}for(var i=0;i<lines.length;i++){var tab="";if(lines[i].search(/{/)>0){}else if(simpleUtils.trimString(lines[i])=="}"){}else{tab=this.tabulator(1);}lines[i]=tab+lines[i];}return lines;}
this.listCSS_HandleStyleNode=function(node){if(node.textContent){var lines=this.listCSS_getFormattedRule(node.textContent);}else if(node.innerHTML){var lines=this.listCSS_getFormattedRule(node.innerHTML);}else{return;}
this.writeLn("/* STYLE node */");for(var i=0;i<lines.length;i++){this.writeLn(lines[i]);}};this.listCSS_HandleLinkNode=function(node){if(node.rel.toUpperCase()=="STYLESHEET"||node.type.toUpperCase()=="TEXT/CSS"){this.writeLn("/* LINK node: "+node.href+" */");if(node.sheet){for(var i=0;i<node.sheet.cssRules.length;i++){var lines=this.listCSS_getFormattedRule(node.sheet.cssRules[i].cssText);for(var j=0;j<lines.length;j++){if(lines[j].search("{")>0){var sublines=lines[j].split(/{/);if(sublines.length !=2){this.writeLn(lines[j]+";");};this.writeLn(sublines[0]+" {");this.writeLn(this.tabulator(1)+simpleUtils.trimString(sublines[1])+";");}else{if(simpleUtils.trimString(lines[j])=="}"){this.writeLn(lines[j]);}else{this.writeLn(lines[j]+";");}}}}}else if(node.styleSheet){var lines=this.listCSS_getFormattedRule(node.styleSheet.cssText);for(var i=0;i<lines.length;i++){if(lines[i].search("{")>0){var sublines=lines[i].split(/{/);this.writeLn(sublines[0]+" {");}else{if(simpleUtils.trimString(lines[i])=="}"){this.writeLn(lines[i]);}else{var sublines=simpleUtils.trimString(lines[i]).split(/;/);for(j=0;j<sublines.length;j++){var tab="";if(j>0){tab=this.tabulator(1);};this.writeLn(tab+sublines[j]+";");}}}}}}};this.license=function(){this.writeLn("---license---");this.writeLn("This License Agreement covers all the ConSense project and its RedSand and SimpleClasses subprojects.<br />");this.writeLn("Copyright (c) 2005-2007 Bal&aacute;zs T&oacute;th<br />");this.writeLn("Permission is hereby granted,free of charge,to any person obtaining a copy of this software and associated documentation files (the \"Software\"),to deal in the Software without restriction,including without limitation the rights to use,copy,modify,merge,publish,distribute,sublicense,and/or sell copies of the Software,and to permit persons to whom the Software is furnished to do so,subject to the following conditions:<br />");this.writeLn("The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.<br />");this.writeLn("THE SOFTWARE IS PROVIDED \"AS IS\",WITHOUT WARRANTY OF ANY KIND,EXPRESS OR IMPLIED,INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER LIABILITY,WHETHER IN AN ACTION OF CONTRACT,TORT OR OTHERWISE,ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.");this.writeLn("---end of license---<br />");this.writeLn("Included SHA1 and MD5 libraries are (c) 1999-2002 Paul Johnston,covered by the BSD license.");this.writeLn("Uses DOM-Drag by www.youngpup.net.");this.writeLn("DateFormat.js (c) 2001 David A. Lindquist (http://www.gazingus.org)");this.writeLn("Prototype JavaScript framework (c) 2005 Sam Stephenson (http://prototype.conio.net/)");this.writeLn("moo.fx (c) 2006 Valerio Proietti (http://www.mad4milk.net)");};this.help=function(){this.writeLn("Command shorthands:");this.writeManualEntry("","All obj parameters may be JavaScript/DOM object references or DOM id strings (eg. conSenseIn or \"conSenseIn\").");this.writeManualEntry("clear()","clears screen");this.writeManualEntry("debug(value0,value1)","shorthand for conSense.debugLn(value0,value1),writes a minimal,timestamped debug message. "+this.highlightAppendLink("conSense.debug")+" toggles output.");this.writeManualEntry("help()","");this.writeManualEntry("list(obj)"," or "+this.highlightAppendLink("inspect(obj)")+" shorthand for conSense.listObject(obj),lists object members");this.writeManualEntry("listCSS()","shorthand for conSense.listCSS(),lists full static CSS info of the page");this.writeManualEntry("listStyle(obj)","shorthand for conSense.listObjectStyle(obj),lists the style member of an object");this.writeManualEntry("load(uri,callback)","shorthand for redSandGenericLoader.load(uri,callback),loads external content identified by uri. If no callback is defined,redSandGenericLoader.JavaScriptEvaluatorCallback() is invoked. Asynchronous operation,execution takes place on finished loading. Use \"browsable\" file extensions,eg. .txt for your external files.");this.writeManualEntry("map(obj)","shorthand for conSense.mapDOMSubtree(obj),maps the subtree of a DOM element. Set "+conSense.highlightAppendLink("conSense.mapShowEmptyTexts")+" to display empty text nodes. Set "+conSense.highlightAppendLink("conSense.mapShowConSense")+" to expand conSenseContainer in higher level perspectives. Click (o) for a temporary representation of an object valid until next mapping. map() defaults to document if no parameter is passed.");this.writeManualEntry("mapCSS(obj)","shorthand for conSense.mapDynamicCSS(obj),lists the element's and its predecessors' inline and dynamic style info up to the root");this.writeManualEntry("outline(obj)","shorthand for conSense.outlineDOMElement(obj),draws with "+this.highlightAppendLink("conSense.outlineColor"));this.writeManualEntry("outlineAll(tagName)","shorthand for conSense.outlineDOMElementsByTag(tagName),draws with "+this.highlightAppendLink("conSense.outlineColor")+",tagName stands for an HTML tag");this.writeManualEntry("outlineSub(obj)","shorthand for conSense.outlineDOMSubtree(obj),outlines a subtree of the DOM rooting out of the parameter element. Draws with "+this.highlightAppendLink("conSense.outlineColor")+".");this.writeManualEntry("write(value)","");this.writeLn("To enumerate ConSense functions call "+this.highlightAppendLink("list(conSense)")+".");this.writeLn("To enumerate SimpleDebug functions call "+this.highlightAppendLink("list(simpleDebug)")+".");this.writeLn("To enumerate SimpleUtilities functions call "+this.highlightAppendLink("list(simpleUtils)")+".");this.writeLn("To enumerate SimpleCryptography functions call "+this.highlightAppendLink("list(simpleCrypto)")+".");this.writeLn("Otherwise all JavaScript expressions are accepted.");this.writeLn(this.highlight("This")+" style is used for simple highlighting and "+this.highlightAppendLink("this")+" is a clickable autoappend input string.");this.writeLn("Doubleclicking the output area focuses the input line. Up/down arrow keys control command history.");this.writeLn("Works best with Firefox 1.5+ and IE 6.0+.");this.writeLn("ConSense is (c) 2005-2007 Bal&aacute;zs T&oacute;th. See "+this.highlightAppendLink("license()")+" for details.");}}var conSense=new ConSense();function clear(){conSense.clearScreen();}function debug(value0,value1){conSense.debugLn(value0,value1);}function help(){conSense.help();}function license(){conSense.license();}function list(obj){conSense.listObject(obj);}function inspect(obj){conSense.listObject(obj);}function listCSS(){conSense.listCSS();}function listStyle(obj){conSense.listObjectStyle(obj);}function load(uri,callback){redSandGenericLoader.load(uri,callback);}function map(obj){if(obj==undefined){obj=document;}conSense.mapDOMSubtree(obj);}function mapCSS(obj){conSense.mapDynamicCSS(obj);}function outline(obj){conSense.outlineDOMElement(obj);}function outlineAll(tagName){conSense.outlineDOMElementsByTag(tagName);}function outlineSub(obj){conSense.outlineDOMSubtree(obj);}function write(value){conSense.writeLn(value);}var gaJsHost=(("https:"==document.location.protocol)?"https://ssl.":"http://www.");stub.includeExternalJavaScriptFile(gaJsHost+"google-analytics.com/ga.js");var globals={siteLanguage: undefined,contentLanguage: undefined,loadedContent: "#updates=show;",scrollValue: 0,imageHashPattern: new RegExp("image=[^;]+(;|$)",""),languageHashPattern: new RegExp("lang=[^;]{2}(;|$)","")};var patternListContent=[ {"regexp": new RegExp('==R>',""),"replacement":'<p style="text-align:right">'},{"regexp": new RegExp('==C>',""),"replacement":'<p style="text-align:center">'},{"regexp": new RegExp('==L>',""),"replacement":'<p style="text-align:left">'},{"regexp": new RegExp('==>',""),"replacement":'<p>'},{"regexp": new RegExp('FN<p>',""),"replacement":'<p class="footnote">'},{"regexp": new RegExp('<==',""),"replacement":'</p>'},{"regexp": new RegExp("~",""),"replacement":"&shy;"},{"regexp": new RegExp("__",""),"replacement":"<br/>"},{"regexp": new RegExp('(>|\\s|^)\\*([^\\*]+)\\*(<|\\s|$)',""),"replacement":'$1<em>$2</em>$3'},{"regexp": new RegExp("(>|\\s|^)_([^_]+)_(<|\\s|$)",""),"replacement":"$1<cite>$2</cite>$3"},{"regexp": new RegExp('\\(image_?([^\\s_]*)\\)\\(([^\\s\\)]*)\\)',""),"replacement":'<img class="$1" src="$2" />'},{"regexp": new RegExp('\\(labelled_image_?([^\\s]*)\\)\\(([^\\s\\)]*)\\)\\(([^\\)]*)\\)',""),"replacement":'<div class="labelled $1"><img class="labelled_$1" src="$2" />$3</div>'},{"regexp": new RegExp('\\((<div class=\"labelled.*)(<img.*>)(.*)(</div>)\\)\\->\\(([^\\s\\(\\)]+)\\)',""),"replacement":'$1<a href="$5">$2$3</a>$4'},{"regexp": new RegExp("\\(flag_(.{2})\\)\\->\\(([^\\s\\(\\)]+)\\)",""),"replacement":'<a href="$2"><img src="images/flag_$1_small.gif" /></a>'},{"regexp": new RegExp("\\(photo\\)\\->\\(([^\\s\\(\\)]+)\\)",""),"replacement":'<a href="$1"><img src="images/camera.gif" /></a>'},{"regexp": new RegExp("\\(([^\\(\\)]+)\\)\\->\\(([^\\s\\(\\)]+)\\)",""),"replacement":'<a href="$2">$1</a>'},{"regexp": new RegExp("\\(([^\\(\\)]+)\\)\\^\\(([^\\s\\(\\)]+)\\)",""),"replacement":'<a href="$2" target="_blank">$1</a>'},{"regexp": new RegExp("^(\\s*)(=){1}([^=].*[^=])(=){1}(\\s*)$","m"),"replacement":"<h1>$3</h1>"},{"regexp": new RegExp("^(\\s*)(=){2}([^=].*[^=])(=){2}(\\s*)$","m"),"replacement":"<h2>$3</h2>"},{"regexp": new RegExp("^(\\s*)(=){3}([^=].*[^=])(=){3}(\\s*)$","m"),"replacement":"<h3>$3</h3>"},{"regexp": new RegExp("^(\\s*)(=){4}([^=].*[^=])(=){4}(\\s*)$","m"),"replacement":"<h4>$3</h4>"},{"regexp": new RegExp("\\(!(.*)!\\)",""),"replacement":'<span class="newIcon">$1!</span>'},];var patternListLabels=[ {"regexp": new RegExp('\\(image_?([^\\s]*)\\)\\(([^\\s\\)]*)\\)',""),"replacement":'<img class="$1" src="$2" />'},{"regexp": new RegExp("\\(([^\\(\\)]+)\\)\\->\\(([^\\s\\(\\)]+)\\)",""),"replacement":'<a href="$2">$1</a>'},{"regexp": new RegExp("\\(([^\\(\\)]+)\\)\\^\\(([^\\s\\(\\)]+)\\)",""),"replacement":'<a href="$2" target="_blank">$1</a>'}];var UIReg={"back_to_the_top;innerHTML": "back_to_the_top"};function init(){conSense.init(conSense.hide,20,20);globals.loadedContent="#updates=show;";load("js/blueprint.js.txt");}function getRegNodes(){var nodes=new Array();for(var i in redSandLoader.menus){var menu=redSandLoader.menus[i];if(!menu.items) continue;for(var j in menu.items){var item=menu.items[j];if(item.label){nodes[item.id]=item.label;}}}return nodes;}function setUIText(DOMid,field,textId){if(textId !=""){simpleUtils.getDOMElement(DOMid)[field]=rsuitexts[textId]["text"];}UIReg[DOMid+";"+field]=textId;}function updateLabels(content){eval(content);for(var i in labels){if(labels[i]){labels[i]=simpleUtils.liteDown(labels[i],patternListLabels);}}for(var i in UIReg){if(UIReg[i]==""){continue;};var elem=i;elem=elem.split(";");elem[0]=simpleUtils.trimString(elem[0]);elem[1]=simpleUtils.trimString(elem[1]);simpleUtils.getDOMElement(elem[0])[elem[1]]=labels[UIReg[i]];};var UIRegNodes=getRegNodes();for(var elem in UIRegNodes){if(UIRegNodes[elem]==""){continue;}labelName=UIRegNodes[elem];if(element=simpleUtils.getDOMElement(elem)){element.innerHTML=labels[labelName]?labels[labelName]:labelName;}}}function setSiteLanguage(language){var languages=new Array("en","de","hu","es","ru");var regexp=new RegExp("(=en;)|(=de;)|(=hu;)|(=es;)|(=ru;)","");globals.siteLanguage=language;globals.contentLanguage=language;var replacement="="+language+";";globals.loadedContent=globals.loadedContent.replace(regexp,replacement);load("labels/labels_"+language+".js.txt",updateLabels);for(var i=0;i<languages.length;i++){simpleUtils.getDOMElement("IMG_flag_"+languages[i]).className="languageFlag";}simpleUtils.getDOMElement("IMG_flag_"+globals.siteLanguage).className="languageFlagActive";}function setContentLanguage(language){var languages=new Array("en","de","hu","es","ru");var regexp=new RegExp("(=en;)|(=de;)|(=hu;)|(=es;)|(=ru;)","");globals.contentLanguage=language;var replacement="="+language+";";globals.loadedContent=globals.loadedContent.replace(regexp,replacement);}function activateMainMenu(DOMid){for(var i=0;i<redSandLoader.menus['mainMenu'].items.length;i++){var nodeName=redSandLoader.menus['mainMenu'].items[i].name;simpleUtils.getDOMElement(nodeName).className="mainMenuItem";}var mainMenuItem=simpleUtils.getDOMElement(DOMid);if(!mainMenuItem){mainMenuItem=simpleUtils.getDOMElement("articles");}mainMenuItem.className="mainMenuActive";}function clearContent(DOMid){simpleUtils.getDOMElement(DOMid).innerHTML="";}function showOverflowGallery(image){simpleUtils.getDOMElement("overflowGalleryBackground").style.display="block";var galleryFrame='<!-- ImageGallery--><div class="imageWrapper1" id="imageWrapper1"><div class="imageWrapper2" id="imageWrapper2"><img id="overflowImage" alt="click_to_close" class="overflowImage" src="'+image+'" onClick="removeImageFromHash();"></div></div><!-- End of ImageGallery-->';globals.scrollValue=document.body.scrollTop;document.body.style.overflow="hidden";var gallery=simpleUtils.getDOMElement("overflowGallery");gallery.innerHTML=galleryFrame;gallery.style.top=document.body.scrollTop;gallery.style.display="block";}function addLanguageToHash(){if(!location.hash.match(".*;$")){location.hash=location.hash+";";}if(!location.hash.match(globals.languageHashPattern)){location.hash=location.hash+"lang="+globals.contentLanguage+";";}}function removeImageFromHash(){location.hash=location.hash.replace(globals.imageHashPattern,"");}function closeOverflowGallery(){simpleUtils.getDOMElement("overflowGallery").innerHTML='';simpleUtils.getDOMElement("overflowGallery").style.display="none";simpleUtils.getDOMElement("overflowGalleryBackground").style.display="none";document.body.style.overflow="auto";window.scroll(0,globals.scrollValue);globals.scrollValue=0;}
