You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
15 KiB
Plaintext
1 line
15 KiB
Plaintext
11 months ago
|
var dbx;function dbxManager(a){dbx=this;if(!/^[-_a-z0-9]+$/i.test(a)){alert('Error from dbxManager:\n"'+a+'" is an invalid session ID');return}this.supported=!(document.getElementsByTagName("*").length==0||(navigator.vendor=="KDE"&&typeof window.sidebar=="undefined"));if(!this.supported){return}this.etype=typeof document.addEventListener!="undefined"?"addEventListener":typeof document.attachEvent!="undefined"?"attachEvent":"none";this.eprefix=(this.etype=="attachEvent"?"on":"");if(typeof window.opera!="undefined"&&parseFloat(navigator.userAgent.toLowerCase().split(/opera[\/ ]/)[1].split(" ")[0],10)<7.5){this.etype="none"}if(this.etype=="none"){this.supported=false;return}this.running=0;this.sid=a;this.savedata={};this.cookiestate=this.getCookieState()}dbxManager.prototype.setCookieState=function(){var a=new Date();a.setTime(a.getTime()+(365*24*60*60*1000));var b="";for(j in this.savedata){if(typeof this.savedata[j]!="function"){b+=j+"="+this.savedata[j]+"&"}}this.state=b.replace(/^(.+)&$/,"$1");this.cookiestring=this.state.replace(/,/g,"|");this.cookiestring=this.cookiestring.replace(/=/g,":");if(typeof this.onstatechange=="undefined"||this.onstatechange()){document.cookie="dbx-"+this.sid+"="+this.cookiestring+"; expires="+a.toGMTString()+"; path=/"}};dbxManager.prototype.getCookieState=function(){this.cookiestate=null;if(document.cookie){if(document.cookie.indexOf("dbx-"+this.sid)!=-1){this.cookie=document.cookie.split("dbx-"+this.sid+"=")[1].split(";")[0].split("&");for(var a in this.cookie){if(typeof this.cookie[a]!="function"){this.cookie[a]=this.cookie[a].replace(/\|/g,",");this.cookie[a]=this.cookie[a].replace(/:/g,"=");this.cookie[a]=this.cookie[a].split("=");this.cookie[a][1]=this.cookie[a][1].split(",")}}this.cookiestate={};for(a in this.cookie){if(typeof this.cookie[a]!="function"){this.cookiestate[this.cookie[a][0]]=this.cookie[a][1]}}}}return this.cookiestate};dbxManager.prototype.addDataMember=function(b,a){this.savedata[b]=a};dbxManager.prototype.createElement=function(a){return typeof document.createElementNS!="undefined"?document.createElementNS("http://www.w3.org/1999/xhtml",a):document.createElement(a)};dbxManager.prototype.getTarget=function(f,c,b){if(typeof b!="undefined"){var d=b}else{d=typeof f.target!="undefined"?f.target:f.srcElement}var a=new RegExp(c,"");while(!a.test(d.className)){d=d.parentNode}return d};function dbxGroup(k,m,a,l,u,b,f,e,g,n,p,o,s,t){if(!/^[-_a-z0-9]+$/i.test(k)){alert('Error from dbxGroup:\n"'+k+'" is an invalid container ID');return}this.container=document.getElementById(k);if(this.container==null||!dbx.supported){return}var h=this;this.gid=k;this.dragok=false;this.box=null;this.vertical=m=="vertical";this.threshold=parseInt(a,10);this.restrict=l=="yes";this.resolution=parseInt(u,10);this.toggles=b=="yes";this.defopen=f!="closed";this.vocab={open:e,close:g,move:n,toggle:p,kmove:o,ktoggle:s,syntax:t};this.container.style.position="relative";this.container.style.display="block";if(typeof window.opera!="undefined"){this.container.style.display="run-in"}this.boxes=[];this.buttons=[];this.order=[];this.eles=this.container.getElementsByTagName("*");for(var q=0;q<this.eles.length;q++){if(/dbx\-box/i.test(this.eles[q].className)&&!/dbx\-dummy/i.test(this.eles[q].className)){this.eles[q].style.position="relative";this.eles[q].style.display="block";this.boxes.push(this.eles[q]);this.eles[q].className+=" dbx-box-open";this.eles[q].className+=" dbxid"+this.order.length;this.order.push(this.order.length.toString()+"+");this.eles[q][dbx.etype](dbx.eprefix+"mousedown",function(i){if(!i){i=window.event}h.mousedown(i,dbx.getTarget(i,"dbx-box"))},false)}if(/dbx\-handle/i.test(this.eles[q].className)){this.eles[q].style.position="relative";this.eles[q].style.display="block";this.eles[q].className+=" dbx-handle-cursor";this.eles[q].setAttribute("title",this.eles[q].getAttribute("title")==null||this.eles[q].title==""?this.vocab.move:this.vocab.syntax.replace("%mytitle%",this.eles[q].title).replace("%dbxtitle%",this.vocab.move));if(this.toggles){this.buttons.push(this.addToggleBehavior(this.eles
|