/* Merged Plone Javascript file
 * This file is dynamically assembled from separate parts.
 * Some of these parts have 3rd party licenses or copyright information attached
 * Such information is valid for that section,
 * not for the entire composite file
 * originating files are separated by - filename.js -
 */

/* - gb_plone.js - */
// http://java.bibop.ch/portal_javascripts/gb_plone.js?original=1
var GB_ROOT_DIR='http://java.bibop.ch/++resource++greybox/';

/* - ++resource++greybox/AJS.js - */
// http://java.bibop.ch/portal_javascripts/++resource++greybox/AJS.js?original=1
AJS={BASE_URL:"",drag_obj:null,drag_elm:null,_drop_zones:[],_cur_pos:null,getScrollTop:function(){var t;if(document.documentElement&&document.documentElement.scrollTop){t=document.documentElement.scrollTop}else{if(document.body){t=document.body.scrollTop}}
return t},addClass:function(){var _2=AJS.forceArray(arguments);var _3=_2.pop();var _4=function(o){if(!new RegExp("(^|\\s)"+_3+"(\\s|$)").test(o.className)){o.className+=(o.className?" ":"")+_3}};AJS.map(_2,function(_6){_4(_6)})},setStyle:function(){var _7=AJS.forceArray(arguments);var _8=_7.pop();var _9=_7.pop();AJS.map(_7,function(_a){_a.style[_9]=AJS.getCssDim(_8)})},extend:function(_b){var _c=new this("no_init");for(k in _b){var _d=_c[k];var _e=_b[k];if(_d&&_d!=_e&&typeof _e=="function"){_e=this._parentize(_e,_d)}
_c[k]=_e}
return new AJS.Class(_c)},log:function(o){if(window.console){console.log(o)}else{var div=AJS.$("ajs_logger");if(!div){div=AJS.DIV({id:"ajs_logger","style":"color: green; position: absolute; left: 0"});div.style.top=AJS.getScrollTop()+"px";AJS.ACN(AJS.getBody(),div)}
AJS.setHTML(div,""+o)}},setHeight:function(){var _11=AJS.forceArray(arguments);_11.splice(_11.length-1,0,"height");AJS.setStyle.apply(null,_11)},_getRealScope:function(fn,_13){_13=AJS.$A(_13);var _14=fn._cscope||window;return function(){var _15=AJS.$FA(arguments).concat(_13);return fn.apply(_14,_15)}},documentInsert:function(elm){if(typeof(elm)=="string"){elm=AJS.HTML2DOM(elm)}
document.write("<span id=\"dummy_holder\"></span>");AJS.swapDOM(AJS.$("dummy_holder"),elm)},getWindowSize:function(doc){doc=doc||document;var _18,_19;if(self.innerHeight){_18=self.innerWidth;_19=self.innerHeight}else{if(doc.documentElement&&doc.documentElement.clientHeight){_18=doc.documentElement.clientWidth;_19=doc.documentElement.clientHeight}else{if(doc.body){_18=doc.body.clientWidth;_19=doc.body.clientHeight}}}
return{"w":_18,"h":_19}},flattenList:function(_1a){var r=[];var _1c=function(r,l){AJS.map(l,function(o){if(o==null){}else{if(AJS.isArray(o)){_1c(r,o)}else{r.push(o)}}})};_1c(r,_1a);return r},isFunction:function(obj){return(typeof obj=="function")},setEventKey:function(e){e.key=e.keyCode?e.keyCode:e.charCode;if(window.event){e.ctrl=window.event.ctrlKey;e.shift=window.event.shiftKey}else{e.ctrl=e.ctrlKey;e.shift=e.shiftKey}
switch(e.key){case 63232:e.key=38;break;case 63233:e.key=40;break;case 63235:e.key=39;break;case 63234:e.key=37;break}},removeElement:function(){var _22=AJS.forceArray(arguments);AJS.map(_22,function(elm){AJS.swapDOM(elm,null)})},_unloadListeners:function(){if(AJS.listeners){AJS.map(AJS.listeners,function(elm,_25,fn){AJS.REV(elm,_25,fn)})}
AJS.listeners=[]},join:function(_27,_28){try{return _28.join(_27)}
catch(e){var r=_28[0]||"";AJS.map(_28,function(elm){r+=_27+elm},1);return r+""}},getIndex:function(elm,_2c,_2d){for(var i=0;i<_2c.length;i++){if(_2d&&_2d(_2c[i])||elm==_2c[i]){return i}}
return-1},isIn:function(elm,_30){var i=AJS.getIndex(elm,_30);if(i!=-1){return true}else{return false}},isArray:function(obj){return obj instanceof Array},setLeft:function(){var _33=AJS.forceArray(arguments);_33.splice(_33.length-1,0,"left");AJS.setStyle.apply(null,_33)},appendChildNodes:function(elm){if(arguments.length>=2){AJS.map(arguments,function(n){if(AJS.isString(n)){n=AJS.TN(n)}
if(AJS.isDefined(n)){elm.appendChild(n)}},1)}
return elm},getElementsByTagAndClassName:function(_36,_37,_38,_39){var _3a=[];if(!AJS.isDefined(_38)){_38=document}
if(!AJS.isDefined(_36)){_36="*"}
var els=_38.getElementsByTagName(_36);var _3c=els.length;var _3d=new RegExp("(^|\\s)"+_37+"(\\s|$)");for(i=0,j=0;i<_3c;i++){if(_3d.test(els[i].className)||_37==null){_3a[j]=els[i];j++}}
if(_39){return _3a[0]}else{return _3a}},isOpera:function(){return(navigator.userAgent.toLowerCase().indexOf("opera")!=-1)},isString:function(obj){return(typeof obj=="string")},hideElement:function(elm){var _40=AJS.forceArray(arguments);AJS.map(_40,function(elm){elm.style.display="none"})},setOpacity:function(elm,p){elm.style.opacity=p;elm.style.filter="alpha(opacity="+p*100+")"},insertBefore:function(elm,_45){_45.parentNode.insertBefore(elm,_45);return elm},setWidth:function(){var _46=AJS.forceArray(arguments);_46.splice(_46.length-1,0,"width");AJS.setStyle.apply(null,_46)},createArray:function(v){if(AJS.isArray(v)&&!AJS.isString(v)){return v}else{if(!v){return []}else{return [v]}}},isDict:function(o){var _49=String(o);return _49.indexOf(" Object")!=-1},isMozilla:function(){return(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1&&navigator.productSub>=20030210)},removeEventListener:function(elm,_4b,fn,_4d){var _4e="ajsl_"+_4b+fn;if(!_4d){_4d=false}
fn=elm[_4e]||fn;if(elm["on"+_4b]==fn){elm["on"+_4b]=elm[_4e+"old"]}
if(elm.removeEventListener){elm.removeEventListener(_4b,fn,_4d);if(AJS.isOpera()){elm.removeEventListener(_4b,fn,!_4d)}}else{if(elm.detachEvent){elm.detachEvent("on"+_4b,fn)}}},callLater:function(fn,_50){var _51=function(){fn()};window.setTimeout(_51,_50)},setTop:function(){var _52=AJS.forceArray(arguments);_52.splice(_52.length-1,0,"top");AJS.setStyle.apply(null,_52)},_createDomShortcuts:function(){var _53=["ul","li","td","tr","th","tbody","table","input","span","b","a","div","img","button","h1","h2","h3","h4","h5","h6","br","textarea","form","p","select","option","optgroup","iframe","script","center","dl","dt","dd","small","pre","i"];var _54=function(elm){AJS[elm.toUpperCase()]=function(){return AJS.createDOM.apply(null,[elm,arguments])}};AJS.map(_53,_54);AJS.TN=function(_56){return document.createTextNode(_56)}},addCallback:function(fn){this.callbacks.unshift(fn)},bindMethods:function(_58){for(var k in _58){var _5a=_58[k];if(typeof(_5a)=="function"){_58[k]=AJS.$b(_5a,_58)}}},partial:function(fn){var _5c=AJS.$FA(arguments);_5c.shift();return function(){_5c=_5c.concat(AJS.$FA(arguments));return fn.apply(window,_5c)}},isNumber:function(obj){return(typeof obj=="number")},getCssDim:function(dim){if(AJS.isString(dim)){return dim}else{return dim+"px"}},isIe:function(){return(navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1)},removeClass:function(){var _5f=AJS.forceArray(arguments);var cls=_5f.pop();var _61=function(o){o.className=o.className.replace(new RegExp("\\s?"+cls,"g"),"")};AJS.map(_5f,function(elm){_61(elm)})},setHTML:function(elm,_65){elm.innerHTML=_65;return elm},map:function(_66,fn,_68,_69){var i=0,l=_66.length;if(_68){i=_68}
if(_69){l=_69}
for(i;i<l;i++){var val=fn(_66[i],i);if(val!=undefined){return val}}},addEventListener:function(elm,_6e,fn,_70,_71){var _72="ajsl_"+_6e+fn;if(!_71){_71=false}
AJS.listeners=AJS.$A(AJS.listeners);if(AJS.isIn(_6e,["keypress","keydown","keyup","click"])){var _73=fn;fn=function(e){AJS.setEventKey(e);return _73.apply(window,arguments)}}
var _75=AJS.isIn(_6e,["submit","load","scroll","resize"]);var _76=AJS.$A(elm);AJS.map(_76,function(_77){if(_70){var _78=fn;fn=function(e){AJS.REV(_77,_6e,fn);return _78.apply(window,arguments)}}
if(_75){var _7a=_77["on"+_6e];var _7b=function(){if(_7a){fn(arguments);return _7a(arguments)}else{return fn(arguments)}};_77[_72]=_7b;_77[_72+"old"]=_7a;elm["on"+_6e]=_7b}else{_77[_72]=fn;if(_77.attachEvent){_77.attachEvent("on"+_6e,fn)}else{if(_77.addEventListener){_77.addEventListener(_6e,fn,_71)}}
AJS.listeners.push([_77,_6e,fn])}})},preloadImages:function(){AJS.AEV(window,"load",AJS.$p(function(_7c){AJS.map(_7c,function(src){var pic=new Image();pic.src=src})},arguments))},forceArray:function(_7f){var r=[];AJS.map(_7f,function(elm){r.push(elm)});return r},update:function(l1,l2){for(var i in l2){l1[i]=l2[i]}
return l1},getBody:function(){return AJS.$bytc("body")[0]},HTML2DOM:function(_85,_86){var d=AJS.DIV();d.innerHTML=_85;if(_86){return d.childNodes[0]}else{return d}},getElement:function(id){if(AJS.isString(id)||AJS.isNumber(id)){return document.getElementById(id)}else{return id}},showElement:function(){var _89=AJS.forceArray(arguments);AJS.map(_89,function(elm){elm.style.display=""})},bind:function(fn,_8c,_8d){fn._cscope=_8c;return AJS._getRealScope(fn,_8d)},createDOM:function(_8e,_8f){var i=0,_91;var elm=document.createElement(_8e);var _93=_8f[0];if(AJS.isDict(_8f[i])){for(k in _93){_91=_93[k];if(k=="style"||k=="s"){elm.style.cssText=_91}else{if(k=="c"||k=="class"||k=="className"){elm.className=_91}else{elm.setAttribute(k,_91)}}}
i++}
if(_93==null){i=1}
for(var j=i;j<_8f.length;j++){var _91=_8f[j];if(_91){var _95=typeof(_91);if(_95=="string"||_95=="number"){_91=AJS.TN(_91)}
elm.appendChild(_91)}}
return elm},swapDOM:function(_96,src){_96=AJS.getElement(_96);var _98=_96.parentNode;if(src){src=AJS.getElement(src);_98.replaceChild(src,_96)}else{_98.removeChild(_96)}
return src},isDefined:function(o){return(o!="undefined"&&o!=null)}};AJS.$=AJS.getElement;AJS.$$=AJS.getElements;AJS.$f=AJS.getFormElement;AJS.$p=AJS.partial;AJS.$b=AJS.bind;AJS.$A=AJS.createArray;AJS.DI=AJS.documentInsert;AJS.ACN=AJS.appendChildNodes;AJS.RCN=AJS.replaceChildNodes;AJS.AEV=AJS.addEventListener;AJS.REV=AJS.removeEventListener;AJS.$bytc=AJS.getElementsByTagAndClassName;AJS.$AP=AJS.absolutePosition;AJS.$FA=AJS.forceArray;AJS.addEventListener(window,"unload",AJS._unloadListeners);AJS._createDomShortcuts();AJS.Class=function(_9a){var fn=function(){if(arguments[0]!="no_init"){return this.init.apply(this,arguments)}};fn.prototype=_9a;AJS.update(fn,AJS.Class.prototype);return fn};AJS.Class.prototype={extend:function(_9c){var _9d=new this("no_init");for(k in _9c){var _9e=_9d[k];var cur=_9c[k];if(_9e&&_9e!=cur&&typeof cur=="function"){cur=this._parentize(cur,_9e)}
_9d[k]=cur}
return new AJS.Class(_9d)},implement:function(_a0){AJS.update(this.prototype,_a0)},_parentize:function(cur,_a2){return function(){this.parent=_a2;return cur.apply(this,arguments)}}};script_loaded=true;script_loaded=true;

/* - ++resource++greybox/AJS_fx.js - */
// http://java.bibop.ch/portal_javascripts/++resource++greybox/AJS_fx.js?original=1
AJS.fx={_shades:{0:"ffffff",1:"ffffee",2:"ffffdd",3:"ffffcc",4:"ffffbb",5:"ffffaa",6:"ffff99"},highlight:function(_1,_2){var _3=new AJS.fx.Base();_3.elm=AJS.$(_1);_3.options.duration=600;_3.setOptions(_2);AJS.update(_3,{increase:function(){if(this.now==7){_1.style.backgroundColor="#fff"}else{_1.style.backgroundColor="#"+AJS.fx._shades[Math.floor(this.now)]}}});return _3.custom(6,0)},fadeIn:function(_4,_5){_5=_5||{};if(!_5.from){_5.from=0;AJS.setOpacity(_4,0)}
if(!_5.to){_5.to=1}
var s=new AJS.fx.Style(_4,"opacity",_5);return s.custom(_5.from,_5.to)},fadeOut:function(_7,_8){_8=_8||{};if(!_8.from){_8.from=1}
if(!_8.to){_8.to=0}
_8.duration=300;var s=new AJS.fx.Style(_7,"opacity",_8);return s.custom(_8.from,_8.to)},setWidth:function(_a,_b){var s=new AJS.fx.Style(_a,"width",_b);return s.custom(_b.from,_b.to)},setHeight:function(_d,_e){var s=new AJS.fx.Style(_d,"height",_e);return s.custom(_e.from,_e.to)}};AJS.fx.Base=new AJS.Class({init:function(_10){this.options={onStart:function(){},onComplete:function(){},transition:AJS.fx.Transitions.sineInOut,duration:500,wait:true,fps:50};AJS.update(this.options,_10);AJS.bindMethods(this)},setOptions:function(_11){AJS.update(this.options,_11)},step:function(){var _12=new Date().getTime();if(_12<this.time+this.options.duration){this.cTime=_12-this.time;this.setNow()}else{setTimeout(AJS.$b(this.options.onComplete,this,[this.elm]),10);this.clearTimer();this.now=this.to}
this.increase()},setNow:function(){this.now=this.compute(this.from,this.to)},compute:function(_13,to){var _15=to-_13;return this.options.transition(this.cTime,_13,_15,this.options.duration)},clearTimer:function(){clearInterval(this.timer);this.timer=null;return this},_start:function(_16,to){if(!this.options.wait){this.clearTimer()}
if(this.timer){return}
setTimeout(AJS.$p(this.options.onStart,this.elm),10);this.from=_16;this.to=to;this.time=new Date().getTime();this.timer=setInterval(this.step,Math.round(1000/this.options.fps));return this},custom:function(_18,to){return this._start(_18,to)},set:function(to){this.now=to;this.increase();return this},setStyle:function(elm,_1c,val){if(this.property=="opacity"){AJS.setOpacity(elm,val)}else{AJS.setStyle(elm,_1c,val)}}});AJS.fx.Style=AJS.fx.Base.extend({init:function(elm,_1f,_20){this.parent();this.elm=elm;this.setOptions(_20);this.property=_1f},increase:function(){this.setStyle(this.elm,this.property,this.now)}});AJS.fx.Styles=AJS.fx.Base.extend({init:function(elm,_22){this.parent();this.elm=AJS.$(elm);this.setOptions(_22);this.now={}},setNow:function(){for(p in this.from){this.now[p]=this.compute(this.from[p],this.to[p])}},custom:function(obj){if(this.timer&&this.options.wait){return}
var _24={};var to={};for(p in obj){_24[p]=obj[p][0];to[p]=obj[p][1]}
return this._start(_24,to)},increase:function(){for(var p in this.now){this.setStyle(this.elm,p,this.now[p])}}});AJS.fx.Transitions={linear:function(t,b,c,d){return c*t/d+b},sineInOut:function(t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b}};script_loaded=true;script_loaded=true;

/* - ++resource++greybox/gb_scripts.js - */
// http://java.bibop.ch/portal_javascripts/++resource++greybox/gb_scripts.js?original=1
var GB_CURRENT=null;GB_hide=function(cb){GB_CURRENT.hide(cb)};GreyBox=new AJS.Class({init:function(_2){this.use_fx=AJS.fx;this.type="page";this.overlay_click_close=false;this.salt=0;this.root_dir=GB_ROOT_DIR;this.callback_fns=[];this.reload_on_close=false;this.src_loader=this.root_dir+"loader_frame.html";var _3=window.location.hostname.indexOf("www");var _4=this.src_loader.indexOf("www");if(_3!=-1&&_4==-1){this.src_loader=this.src_loader.replace("://","://www.")}
if(_3==-1&&_4!=-1){this.src_loader=this.src_loader.replace("://www.","://")}
this.show_loading=true;AJS.update(this,_2)},addCallback:function(fn){if(fn){this.callback_fns.push(fn)}},show:function(_6){GB_CURRENT=this;this.url=_6;var _7=[AJS.$bytc("object"),AJS.$bytc("select")];AJS.map(AJS.flattenList(_7),function(_8){_8.style.visibility="hidden"});this.createElements();return false},hide:function(cb){var me=this;AJS.callLater(function(){var _b=me.callback_fns;if(_b!=[]){AJS.map(_b,function(fn){fn()})}
me.onHide();if(me.use_fx){var _d=me.overlay;AJS.fx.fadeOut(me.overlay,{onComplete:function(){AJS.removeElement(_d);_d=null},duration:300});AJS.removeElement(me.g_window)}else{AJS.removeElement(me.g_window,me.overlay)}
me.removeFrame();AJS.REV(window,"scroll",_GB_setOverlayDimension);AJS.REV(window,"resize",_GB_update);var _e=[AJS.$bytc("object"),AJS.$bytc("select")];AJS.map(AJS.flattenList(_e),function(_f){_f.style.visibility="visible"});GB_CURRENT=null;if(me.reload_on_close){window.location.reload()}
if(AJS.isFunction(cb)){cb()}},10)},update:function(){this.setOverlayDimension();this.setFrameSize();this.setWindowPosition()},createElements:function(){this.initOverlay();this.g_window=AJS.DIV({"id":"GB_window"});AJS.hideElement(this.g_window);AJS.getBody().insertBefore(this.g_window,this.overlay.nextSibling);this.initFrame();this.initHook();this.update();var me=this;if(this.use_fx){AJS.fx.fadeIn(this.overlay,{duration:300,to:0.7,onComplete:function(){me.onShow();AJS.showElement(me.g_window);me.startLoading()}})}else{AJS.setOpacity(this.overlay,0.7);AJS.showElement(this.g_window);this.onShow();this.startLoading()}
AJS.AEV(window,"scroll",_GB_setOverlayDimension);AJS.AEV(window,"resize",_GB_update)},removeFrame:function(){try{AJS.removeElement(this.iframe)}
catch(e){}
this.iframe=null},startLoading:function(){this.iframe.src=this.src_loader+"?s="+this.salt++;AJS.showElement(this.iframe)},setOverlayDimension:function(){var _11=AJS.getWindowSize();if(AJS.isMozilla()||AJS.isOpera()){AJS.setWidth(this.overlay,"100%")}else{AJS.setWidth(this.overlay,_11.w)}
var _12=Math.max(AJS.getScrollTop()+_11.h,AJS.getScrollTop()+this.height);if(_12<AJS.getScrollTop()){AJS.setHeight(this.overlay,_12)}else{AJS.setHeight(this.overlay,AJS.getScrollTop()+_11.h)}},initOverlay:function(){this.overlay=AJS.DIV({"id":"GB_overlay"});if(this.overlay_click_close){AJS.AEV(this.overlay,"click",GB_hide)}
AJS.setOpacity(this.overlay,0);AJS.getBody().insertBefore(this.overlay,AJS.getBody().firstChild)},initFrame:function(){if(!this.iframe){var d={"name":"GB_frame","class":"GB_frame","frameBorder":0};if(AJS.isIe()){d.src="javascript:false;document.write(\"\");"}
this.iframe=AJS.IFRAME(d);this.middle_cnt=AJS.DIV({"class":"content"},this.iframe);this.top_cnt=AJS.DIV();this.bottom_cnt=AJS.DIV();AJS.ACN(this.g_window,this.top_cnt,this.middle_cnt,this.bottom_cnt)}},onHide:function(){},onShow:function(){},setFrameSize:function(){},setWindowPosition:function(){},initHook:function(){}});_GB_update=function(){if(GB_CURRENT){GB_CURRENT.update()}};_GB_setOverlayDimension=function(){if(GB_CURRENT){GB_CURRENT.setOverlayDimension()}};AJS.preloadImages(GB_ROOT_DIR+"indicator.gif");script_loaded=true;var GB_SETS={};
function decoGreyboxLinks(){var as=AJS.$bytc("a");AJS.map(as,function(a){if(a.getAttribute("href")&&a.getAttribute("rel")){var rel=a.getAttribute("rel");if(rel.indexOf("gb_")==0){var _17=rel.match(/\w+/)[0];var _18=rel.match(/\[(.*)\]/)[1];var _19=0;var _1a={"caption":a.title||"","url":a.href};if(_17=="gb_pageset"||_17=="gb_imageset"){if(!GB_SETS[_18]){GB_SETS[_18]=[]}
GB_SETS[_18].push(_1a);_19=GB_SETS[_18].length}
if(_17=="gb_pageset"){a.onclick=function(){GB_showFullScreenSet(GB_SETS[_18],_19);return false}}
if(_17=="gb_imageset"){a.onclick=function(){GB_showImageSet(GB_SETS[_18],_19);return false}}
if(_17=="gb_image"){a.onclick=function(){GB_showImage(_1a.caption,_1a.url);return false}}
if(_17=="gb_page"){a.onclick=function(){var sp=_18.split(/, ?/);GB_show(_1a.caption,_1a.url,parseInt(sp[1]),parseInt(sp[0]));return false}}
if(_17=="gb_page_fs"){a.onclick=function(){GB_showFullScreen(_1a.caption,_1a.url);return false}}
if(_17=="gb_page_center"){a.onclick=function(){var sp=_18.split(/, ?/);GB_showCenter(_1a.caption,_1a.url,parseInt(sp[1]),parseInt(sp[0]));return false}}}}})}
AJS.AEV(window,"load",decoGreyboxLinks);GB_showImage=function(_1d,url,_1f){var _20={width:300,height:300,type:"image",fullscreen:false,center_win:true,caption:_1d,callback_fn:_1f};var win=new GB_Gallery(_20);return win.show(url)};GB_showPage=function(_22,url,_24){var _25={type:"page",caption:_22,callback_fn:_24,fullscreen:true,center_win:false};var win=new GB_Gallery(_25);return win.show(url)};GB_Gallery=GreyBox.extend({init:function(_27){this.parent({});this.img_close=this.root_dir+"g_close.gif";AJS.update(this,_27);this.addCallback(this.callback_fn)},initHook:function(){AJS.addClass(this.g_window,"GB_Gallery");var _28=AJS.DIV({"class":"inner"});this.header=AJS.DIV({"class":"GB_header"},_28);AJS.setOpacity(this.header,0);AJS.getBody().insertBefore(this.header,this.overlay.nextSibling);var _29=AJS.TD({"id":"GB_caption","class":"caption","width":"40%"},this.caption);var _2a=AJS.TD({"id":"GB_middle","class":"middle","width":"20%"});var _2b=AJS.IMG({"src":this.img_close});AJS.AEV(_2b,"click",GB_hide);var _2c=AJS.TD({"class":"close","width":"40%"},_2b);var _2d=AJS.TBODY(AJS.TR(_29,_2a,_2c));var _2e=AJS.TABLE({"cellspacing":"0","cellpadding":0,"border":0},_2d);AJS.ACN(_28,_2e);if(this.fullscreen){AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this))}else{AJS.AEV(window,"scroll",AJS.$b(this._setHeaderPos,this))}},setFrameSize:function(){var _2f=this.overlay.offsetWidth;var _30=AJS.getWindowSize();if(this.fullscreen){this.width=_2f-40;this.height=_30.h-80}
AJS.setWidth(this.iframe,this.width);AJS.setHeight(this.iframe,this.height);AJS.setWidth(this.header,_2f)},_setHeaderPos:function(){AJS.setTop(this.header,AJS.getScrollTop()+10)},setWindowPosition:function(){var _31=this.overlay.offsetWidth;var _32=AJS.getWindowSize();AJS.setLeft(this.g_window,((_31-50-this.width)/2));var _33=AJS.getScrollTop()+55;if(!this.center_win){AJS.setTop(this.g_window,_33)}else{var fl=((_32.h-this.height)/2)+20+AJS.getScrollTop();if(fl<0){fl=0}
if(_33>fl){fl=_33}
AJS.setTop(this.g_window,fl)}
this._setHeaderPos()},onHide:function(){AJS.removeElement(this.header);AJS.removeClass(this.g_window,"GB_Gallery")},onShow:function(){if(this.use_fx){AJS.fx.fadeIn(this.header,{to:1})}else{AJS.setOpacity(this.header,1)}}});AJS.preloadImages(GB_ROOT_DIR+"g_close.gif");GB_showFullScreenSet=function(set,_36,_37){var _38={type:"page",fullscreen:true,center_win:false};var _39=new GB_Sets(_38,set);_39.addCallback(_37);_39.showSet(_36-1);return false};GB_showImageSet=function(set,_3b,_3c){var _3d={type:"image",fullscreen:false,center_win:true,width:300,height:300};var _3e=new GB_Sets(_3d,set);_3e.addCallback(_3c);_3e.showSet(_3b-1);return false};GB_Sets=GB_Gallery.extend({init:function(_3f,set){this.parent(_3f);if(!this.img_next){this.img_next=this.root_dir+"next.gif"}
if(!this.img_prev){this.img_prev=this.root_dir+"prev.gif"}
this.current_set=set},showSet:function(_41){this.current_index=_41;var _42=this.current_set[this.current_index];this.show(_42.url);this._setCaption(_42.caption);this.btn_prev=AJS.IMG({"class":"left",src:this.img_prev});this.btn_next=AJS.IMG({"class":"right",src:this.img_next});AJS.AEV(this.btn_prev,"click",AJS.$b(this.switchPrev,this));AJS.AEV(this.btn_next,"click",AJS.$b(this.switchNext,this));GB_STATUS=AJS.SPAN({"class":"GB_navStatus"});AJS.ACN(AJS.$("GB_middle"),this.btn_prev,GB_STATUS,this.btn_next);this.updateStatus()},updateStatus:function(){AJS.setHTML(GB_STATUS,(this.current_index+1)+" / "+this.current_set.length);if(this.current_index==0){AJS.addClass(this.btn_prev,"disabled")}else{AJS.removeClass(this.btn_prev,"disabled")}
if(this.current_index==this.current_set.length-1){AJS.addClass(this.btn_next,"disabled")}else{AJS.removeClass(this.btn_next,"disabled")}},_setCaption:function(_43){AJS.setHTML(AJS.$("GB_caption"),_43)},updateFrame:function(){var _44=this.current_set[this.current_index];this._setCaption(_44.caption);this.url=_44.url;this.startLoading()},switchPrev:function(){if(this.current_index!=0){this.current_index--;this.updateFrame();this.updateStatus()}},switchNext:function(){if(this.current_index!=this.current_set.length-1){this.current_index++;this.updateFrame();this.updateStatus()}}});AJS.AEV(window,"load",function(){AJS.preloadImages(GB_ROOT_DIR+"next.gif",GB_ROOT_DIR+"prev.gif")});GB_show=function(_45,url,_47,_48,_49){var _4a={caption:_45,height:_47||500,width:_48||500,fullscreen:false,callback_fn:_49};var win=new GB_Window(_4a);return win.show(url)};GB_showCenter=function(_4c,url,_4e,_4f,_50){var _51={caption:_4c,center_win:true,height:_4e||500,width:_4f||500,fullscreen:false,callback_fn:_50};var win=new GB_Window(_51);return win.show(url)};GB_showFullScreen=function(_53,url,_55){var _56={caption:_53,fullscreen:true,callback_fn:_55};var win=new GB_Window(_56);return win.show(url)};GB_Window=GreyBox.extend({init:function(_58){this.parent({});this.img_header=this.root_dir+"header_bg.gif";this.img_close=this.root_dir+"w_close.gif";this.show_close_img=true;AJS.update(this,_58);this.addCallback(this.callback_fn)},initHook:function(){AJS.addClass(this.g_window,"GB_Window");this.header=AJS.TABLE({"class":"header"});this.header.style.backgroundImage="url("+this.img_header+")";var _59=AJS.TD({"class":"caption"},this.caption);var _5a=AJS.TD({"class":"close"});if(this.show_close_img){var _5b=AJS.IMG({"src":this.img_close});var _5c=AJS.SPAN("Close");var btn=AJS.DIV(_5b,_5c);AJS.AEV([_5b,_5c],"mouseover",function(){AJS.addClass(_5c,"on")});AJS.AEV([_5b,_5c],"mouseout",function(){AJS.removeClass(_5c,"on")});AJS.AEV([_5b,_5c],"mousedown",function(){AJS.addClass(_5c,"click")});AJS.AEV([_5b,_5c],"mouseup",function(){AJS.removeClass(_5c,"click")});AJS.AEV([_5b,_5c],"click",GB_hide);AJS.ACN(_5a,btn)}
tbody_header=AJS.TBODY();AJS.ACN(tbody_header,AJS.TR(_59,_5a));AJS.ACN(this.header,tbody_header);AJS.ACN(this.top_cnt,this.header);if(this.fullscreen){AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this))}},setFrameSize:function(){if(this.fullscreen){var _5e=AJS.getWindowSize();overlay_h=_5e.h;this.width=Math.round(this.overlay.offsetWidth-(this.overlay.offsetWidth/100)*10);this.height=Math.round(overlay_h-(overlay_h/100)*10)}
AJS.setWidth(this.header,this.width+6);AJS.setWidth(this.iframe,this.width);AJS.setHeight(this.iframe,this.height)},setWindowPosition:function(){var _5f=AJS.getWindowSize();AJS.setLeft(this.g_window,((_5f.w-this.width)/2)-13);if(!this.center_win){AJS.setTop(this.g_window,AJS.getScrollTop())}else{var fl=((_5f.h-this.height)/2)-20+AJS.getScrollTop();if(fl<0){fl=0}
AJS.setTop(this.g_window,fl)}}});AJS.preloadImages(GB_ROOT_DIR+"w_close.gif",GB_ROOT_DIR+"header_bg.gif");script_loaded=true;

/* - ++resource++quickupload_static/swfobject.js - */
// http://java.bibop.ch/portal_javascripts/++resource++quickupload_static/swfobject.js?original=1
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();

/* - ++resource++quickupload_static/jquery.uploadify.js - */
// http://java.bibop.ch/portal_javascripts/++resource++quickupload_static/jquery.uploadify.js?original=1
if(jQuery)(
function(jQuery){jQuery.extend(jQuery.fn,{uploadify:function(options){jQuery(this).each(function(){settings=jQuery.extend({id:jQuery(this).attr('id'),uploader:'uploadify.swf',script:'uploadify.php',expressInstall:null,folder:'',height:30,width:110,cancelImg:'cancel.png',wmode:'opaque',scriptAccess:'sameDomain',fileDataName:'Filedata',method:'POST',queueSizeLimit:999,simUploadLimit:1,queueID:false,displayData:'percentage',onInit: function(){},onSelect: function(){},onQueueFull: function(){},onCheck: function(){},onCancel: function(){},onError: function(){},onProgress: function(){},onComplete: function(){},onAllComplete: function(){}},options);var pagePath=location.pathname;pagePath=pagePath.split('/');pagePath.pop();pagePath=pagePath.join('/')+'/';var data={};data.uploadifyID=settings.id;data.pagepath=pagePath;if(settings.buttonImg) data.buttonImg=escape(settings.buttonImg);if(settings.buttonText) data.buttonText=escape(settings.buttonText);if(settings.rollover) data.rollover=true;data.script=settings.script;data.folder=escape(settings.folder);if(settings.scriptData){var scriptDataString='';for(var name in settings.scriptData){scriptDataString+='&'+name+'='+settings.scriptData[name]}
data.scriptData=escape(scriptDataString.substr(1))}
data.width=settings.width;data.height=settings.height;data.wmode=settings.wmode;data.method=settings.method;data.queueSizeLimit=settings.queueSizeLimit;data.simUploadLimit=settings.simUploadLimit;if(settings.hideButton) data.hideButton=true;if(settings.fileDesc) data.fileDesc=settings.fileDesc;if(settings.fileExt) data.fileExt=settings.fileExt;if(settings.multi) data.multi=true;if(settings.auto) data.auto=true;if(settings.sizeLimit) data.sizeLimit=settings.sizeLimit;if(settings.checkScript) data.checkScript=settings.checkScript;if(settings.fileDataName) data.fileDataName=settings.fileDataName;if(settings.queueID) data.queueID=settings.queueID;if(settings.onInit()!==false){jQuery(this).css('display','none');jQuery(this).after('<div id="'+jQuery(this).attr('id')+'Uploader"></div>');swfobject.embedSWF(settings.uploader,settings.id+'Uploader',settings.width,settings.height,'9.0.24',settings.expressInstall,data,{'quality':'high','wmode':settings.wmode,'allowScriptAccess':settings.scriptAccess});if(settings.queueID==false){jQuery("#"+jQuery(this).attr('id')+"Uploader").after('<div id="'+jQuery(this).attr('id')+'Queue" class="uploadifyQueue"></div>')}}
if(typeof(settings.onOpen)=='function'){jQuery(this).bind("uploadifyOpen",settings.onOpen)}
jQuery(this).bind("uploadifySelect",{'action':settings.onSelect,'queueID':settings.queueID}, function(event,ID,fileObj){if(event.data.action(event,ID,fileObj)!==false){var byteSize=Math.round(fileObj.size/1024 * 100) *.01;var suffix='KB';if(byteSize>1000){byteSize=Math.round(byteSize *.001 * 100) *.01;suffix='MB'}
var sizeParts=byteSize.toString().split('.');if(sizeParts.length>1){byteSize=sizeParts[0]+'.'+sizeParts[1].substr(0,2)} else{byteSize=sizeParts[0]}
if(fileObj.name.length>20){fileName=fileObj.name.substr(0,20)+'...'} else{fileName=fileObj.name}
queue='#'+jQuery(this).attr('id')+'Queue';if(event.data.queueID){queue='#'+event.data.queueID}
jQuery(queue).append('<div id="'+jQuery(this).attr('id')+ID+'" class="uploadifyQueueItem">\<div class="cancel">\<a href="javascript:jQuery(\'#' + jQuery(this).attr('id') + '\').uploadifyCancel(\'' + ID + '\')"><img src="' + settings.cancelImg + '" border="0"/></a>\</div>\<span class="fileName">' + fileName + '(' + byteSize + suffix + ')</span><span class="percentage"></span>\<div class="uploadifyProgress">\<div id="' + jQuery(this).attr('id') + ID + 'ProgressBar" class="uploadifyProgressBar"><!--Progress Bar--></div>\</div>\</div>')}});if(typeof(settings.onSelectOnce)=='function'){jQuery(this).bind("uploadifySelectOnce",settings.onSelectOnce)}
jQuery(this).bind("uploadifyQueueFull",{'action':settings.onQueueFull}, function(event,queueSizeLimit){if(event.data.action(event,queueSizeLimit)!==false){alert('The queue is full.  The max size is '+queueSizeLimit+'.')}});jQuery(this).bind("uploadifyCheckExist",{'action':settings.onCheck}, function(event,checkScript,fileQueueObj,folder,single){var postData=new Object();postData=fileQueueObj;postData.folder=pagePath+folder;if(single){for(var ID in fileQueueObj){var singleFileID=ID}}
jQuery.post(checkScript,postData, function(data){for(var key in data){if(event.data.action(event,checkScript,fileQueueObj,folder,single)!==false){var replaceFile=confirm("Do you want to replace the file "+data[key]+"?");if(!replaceFile){document.getElementById(jQuery(event.target).attr('id')+'Uploader').cancelFileUpload(key,true,true)}}}
if(single){document.getElementById(jQuery(event.target).attr('id')+'Uploader').startFileUpload(singleFileID,true)} else{document.getElementById(jQuery(event.target).attr('id')+'Uploader').startFileUpload(null,true)}},"json")});jQuery(this).bind("uploadifyCancel",{'action':settings.onCancel}, function(event,ID,fileObj,data,clearFast){if(event.data.action(event,ID,fileObj,data,clearFast)!==false){var fadeSpeed=(clearFast==true)?0:250;jQuery("#"+jQuery(this).attr('id')+ID).fadeOut(fadeSpeed, function(){jQuery(this).remove()})}});if(typeof(settings.onClearQueue)=='function'){jQuery(this).bind("uploadifyClearQueue",settings.onClearQueue)}
var errorArray=[];jQuery(this).bind("uploadifyError",{'action':settings.onError}, function(event,ID,fileObj,errorObj){if(event.data.action(event,ID,fileObj,errorObj)!==false){var fileArray=new Array(ID,fileObj,errorObj);errorArray.push(fileArray);jQuery("#"+jQuery(this).attr('id')+ID+" .percentage").text(" - "+errorObj.type+" Error");jQuery("#"+jQuery(this).attr('id')+ID).addClass('uploadifyError')}});jQuery(this).bind("uploadifyProgress",{'action':settings.onProgress,'toDisplay':settings.displayData}, function(event,ID,fileObj,data){if(event.data.action(event,ID,fileObj,data)!==false){jQuery("#"+jQuery(this).attr('id')+ID+"ProgressBar").css('width',data.percentage+'%');if(event.data.toDisplay=='percentage') displayData=' - '+data.percentage+'%';if(event.data.toDisplay=='speed') displayData=' - '+data.speed+'KB/s';if(event.data.toDisplay==null) displayData=' ';jQuery("#"+jQuery(this).attr('id')+ID+" .percentage").text(displayData)}});jQuery(this).bind("uploadifyComplete",{'action':settings.onComplete}, function(event,ID,fileObj,response,data){if(event.data.action(event,ID,fileObj,unescape(response),data)!==false){jQuery("#"+jQuery(this).attr('id')+ID+" .percentage").text(' - Completed');jQuery("#"+jQuery(this).attr('id')+ID).fadeOut(250, function(){jQuery(this).remove()})}});if(typeof(settings.onAllComplete)=='function'){jQuery(this).bind("uploadifyAllComplete",{'action':settings.onAllComplete}, function(event,uploadObj){if(event.data.action(event,uploadObj)!==false){errorArray=[]}})}})},uploadifySettings:function(settingName,settingValue,resetObject){var returnValue=false;jQuery(this).each(function(){if(settingName=='scriptData'&&settingValue!=null){if(resetObject){var scriptData=settingValue} else{var scriptData=jQuery.extend(settings.scriptData,settingValue)}
var scriptDataString='';for(var name in scriptData){scriptDataString+='&'+name+'='+escape(scriptData[name])}
settingValue=scriptDataString.substr(1)}
returnValue=document.getElementById(jQuery(this).attr('id')+'Uploader').updateSettings(settingName,settingValue)});if(settingValue==null){if(settingName=='scriptData'){var returnSplit=unescape(returnValue).split('&');var returnObj=new Object();for(var i=0;i<returnSplit.length;i++){var iSplit=returnSplit[i].split('=');returnObj[iSplit[0]]=iSplit[1]}
returnValue=returnObj}
return returnValue}},uploadifyUpload:function(ID){jQuery(this).each(function(){document.getElementById(jQuery(this).attr('id')+'Uploader').startFileUpload(ID,false)})},uploadifyCancel:function(ID){jQuery(this).each(function(){document.getElementById(jQuery(this).attr('id')+'Uploader').cancelFileUpload(ID,true,false)})},uploadifyClearQueue:function(){jQuery(this).each(function(){document.getElementById(jQuery(this).attr('id')+'Uploader').clearFileUploadQueue(false)})}})})(jQuery);

/* - ++resource++quickupload_static/fileuploader.js - */
// http://java.bibop.ch/portal_javascripts/++resource++quickupload_static/fileuploader.js?original=1
var qq=qq||{};qq.FileUploader=function(o){this._options={element:null,action:'/server/upload',params:{},allowedExtensions:[],sizeLimit:0,onAfterSelect: function(id,fileName){},autoUpload:true,simUploadLimit:2,onSubmit: function(id,fileName){},onComplete: function(id,fileName,responseJSON){},template:'<div class="qq-uploader">'+'<div class="qq-upload-drop-area"><span>Drop files here to upload</span></div>'+'<div class="qq-upload-button">Browse for a file</div>'+'<ul class="qq-upload-list"></ul>'+'</div>',fileTemplate:'<li>'+'<a class="qq-upload-cancel" href="#">&nbsp;</a>'+'<div class="qq-upload-infos"><span class="qq-upload-file"></span>'+'<span class="qq-upload-spinner"></span>'+'<span class="qq-upload-failed-text">Failed</span></div>'+'<div class="qq-upload-size"></div>'+'</li>',classes:{button:'qq-upload-button',drop:'qq-upload-drop-area',dropActive:'qq-upload-drop-area-active',list:'qq-upload-list',file:'qq-upload-file',spinner:'qq-upload-spinner',size:'qq-upload-size',cancel:'qq-upload-cancel',success:'qq-upload-success',fail:'qq-upload-fail'},messages:{typeError:"{file} has invalid extension. Only {extensions} are allowed.",sizeError:"{file} is too large, maximum file size is {sizeLimit}.",emptyError:"{file} is empty, please select files again without it."},showMessage: function(message){alert(message)},debugMode:false};qq.extend(this._options,o);this._element=this._options.element;if(this._element.nodeType!=1){throw new Error('element param of FileUploader should be dom node')}
base_template=this._options.template;debug_template='<div class="qq-upload-debug">'+'  <strong>Current Uploads : </strong><span class="qq-upload-debug-curruploads"></span>'+'</div>';if(this._options.debugMode) base_template=base_template+debug_template;this._element.innerHTML=base_template;this._filesInProgress=0;this._classes=this._options.classes;this._handler=this._createUploadHandler();this._debugConsole=this.getDebugConsole();this._bindCancelEvent();var self=this;this._button=new qq.UploadButton({element:this._getElement('button'),multiple:qq.UploadHandlerXhr.isSupported(),onChange: function(input){self._onInputChange(input)}});this._setupDragDrop()};qq.FileUploader.prototype={setParams: function(params){this._options.params=params},getDebugConsole: function(){return qq.getByClass(this._element,'qq-upload-debug')[0]},logDebug: function(type,logcontent){blocdebug=qq.getByClass(this._debugConsole,'qq-upload-debug-'+type);if(blocdebug) qq.setText(blocdebug[0],logcontent)},isUploading: function(){return!!this._filesInProgress},_getElement: function(parent,type){if(typeof parent=='string'){type=parent;parent=this._element}
var element=qq.getByClass(parent,this._options.classes[type])[0];if(!element){throw new Error('element not found '+type)}
return element},_error: function(code,fileName,id){var message=this._options.messages[code];message=message.replace('{file}',this._formatFileName(fileName));message=message.replace('{extensions}',this._options.allowedExtensions.join(', '));message=message.replace('{sizeLimit}',this._formatSize(this._options.sizeLimit));if(typeof id=='undefined') this._options.showMessage(message);else{var item=this._getItemByFileId(id);var diverror=document.createElement("div");item.appendChild(diverror);eclass=document.createAttribute("class");eclass.nodeValue="server-error";diverror.setAttributeNode(eclass);diverror.innerText=message;diverror.textContent=message}},_formatFileName: function(name){if(name.length>33){name=name.slice(0,19)+'...'+name.slice(-13)}
return name},_isAllowedExtension: function(fileName){var ext=(-1!==fileName.indexOf('.'))?fileName.replace(/.*[.]/,'').toLowerCase():'';var allowed=this._options.allowedExtensions;if(!allowed.length){return true}
for(var i=0;i<allowed.length;i++){if(allowed[i].toLowerCase()==ext){return true}}
return false},_setupDragDrop: function(){
function isValidDrag(e){var dt=e.dataTransfer,isWebkit=navigator.userAgent.indexOf("AppleWebKit")>-1;return dt&&dt.effectAllowed!='none'&&(dt.files||(!isWebkit&&dt.types.contains&&dt.types.contains('Files')))}
var self=this,dropArea=this._getElement('drop');dropArea.style.display='none';var hideTimeout;qq.attach(document,'dragenter', function(e){e.preventDefault()});qq.attach(document,'dragover', function(e){if(isValidDrag(e)){if(hideTimeout){clearTimeout(hideTimeout)}
if(dropArea==e.target||qq.contains(dropArea,e.target)){var effect=e.dataTransfer.effectAllowed;if(effect=='move'||effect=='linkMove'){e.dataTransfer.dropEffect='move'} else{e.dataTransfer.dropEffect='copy'}
qq.addClass(dropArea,self._classes.dropActive);e.stopPropagation()} else{dropArea.style.display='block';e.dataTransfer.dropEffect='none'}
e.preventDefault()}});qq.attach(document,'dragleave', function(e){if(isValidDrag(e)){if(dropArea==e.target||qq.contains(dropArea,e.target)){qq.removeClass(dropArea,self._classes.dropActive);e.stopPropagation()} else{if(hideTimeout){clearTimeout(hideTimeout)}
hideTimeout=setTimeout(function(){dropArea.style.display='none'},77)}}});qq.attach(dropArea,'drop', function(e){dropArea.style.display='none';self._addSelection(e.dataTransfer.files);e.preventDefault()})},_createUploadHandler: function(){var self=this,handlerClass;if(qq.UploadHandlerXhr.isSupported()){handlerClass='UploadHandlerXhr'} else{handlerClass='UploadHandlerForm'}
var handler=new qq[handlerClass]({action:this._options.action,onProgress: function(id,fileName,loaded,total){self._updateProgress(id,loaded,total)},onComplete: function(id,fileName,result){var item=self._getItemByFileId(id);qq.remove(self._getElement(item,'spinner'));if(result.success){qq.remove(self._getElement(item,'cancel'));qq.addClass(item,self._classes.success)} else{qq.addClass(item,self._classes.fail);if(result.error){self._error(result.error,fileName,id)}}
self._filesInProgress--;self._options.onComplete(id,fileName,result)}});return handler},_onInputChange: function(input){if(this._handler instanceof qq.UploadHandlerXhr){this._addSelection(input.files)} else{if(this._validateFile(input)){this._addFile(input)}}
this._button.reset()},_addSelection: function(files){var valid=true;var i=files.length;while(i--){if(!this._validateFile(files[i])){valid=false;break}}
if(valid){var i=files.length;while(i--){this._addFile(files[i])}}},_addFile: function(file){var id=this._handler.add(file);var name=this._handler.getName(id);this._options.onSubmit(id,name);this._addToList(id,name);if(this._options.autoUpload){this._queueUpload(id,this._options.params)}
else this._options.onAfterSelect(file,id)},_uploadAll: function(){var allfiles=this._handler._files;for(var id=0;id<allfiles.length;id++){if(allfiles[id]){this._queueUpload(id,this._options.params)}}},_queueUpload: function(id,params){var simUploadLimit=this._options.simUploadLimit;if(this._options.debugMode) this.logDebug('curruploads',this._filesInProgress);if(this._filesInProgress<simUploadLimit||!simUploadLimit){this._filesInProgress++;if(this._handler instanceof qq.UploadHandlerXhr) var uid=id;else if(typeof id=='number'){var uid='qq-upload-handler-iframe'+id}
else var uid=id;var item=this._getItemByFileId(uid);var spinner=this._getElement(item,'spinner');qq.css(spinner,{'display':'inline-block'});this._handler.upload(id,params)}
else{var self=this;window.setTimeout(function(){self._queueUpload(id,params)},100)}},_cancelAll: function(){var allfiles=this._handler._files;for(var id=0;id<allfiles.length;id++){if(allfiles[id]) this._handler.cancel(id)}},_validateFile: function(file){var name,size;if(file.value){name=file.value.replace(/.*(\/|\\)/,"")} else{name=file.fileName!=null?file.fileName:file.name;size=file.fileSize!=null?file.fileSize:file.size}
if(!this._isAllowedExtension(name)){this._error('typeError',name);return false} else if(size===0){this._error('emptyError',name);return false} else if(size&&this._options.sizeLimit&&size>this._options.sizeLimit){this._error('sizeError',name);return false}
return true},_addToList: function(id,fileName){var item=qq.toElement(this._options.fileTemplate);item.qqFileId=id;var fileElement=this._getElement(item,'file');qq.setText(fileElement,this._formatFileName(fileName));this._getElement('list').appendChild(item)},_updateProgress: function(id,loaded,total){var item=this._getItemByFileId(id);var size=this._getElement(item,'size');var text1;var text2;if(loaded!=total){text1=Math.round(loaded/total * 100)} else{text1=100}
text2='&nbsp;'+this._formatSize(total);qq.setProgressBar(size,text1,text2)},_formatSize: function(bytes){var i=-1;do{bytes=bytes/1024;i++} while(bytes>99);return Math.max(bytes,0.1).toFixed(1)+['kB','MB','GB','TB','PB','EB'][i]},_getItemByFileId: function(id){var item=this._getElement('list').firstChild;while(item){if(item.qqFileId==id){return item}
item=item.nextSibling}},_bindCancelEvent: function(){var self=this,list=this._getElement('list');qq.attach(list,'click', function(e){e=e||window.event;var target=e.target||e.srcElement;if(qq.hasClass(target,self._classes.cancel)){qq.preventDefault(e);var item=target.parentNode;self._handler.cancel(item.qqFileId);qq.remove(item)}})}};qq.UploadButton=function(o){this._options={element:null,multiple:false,name:'file',onChange: function(input){},hoverClass:'qq-upload-button-hover',focusClass:'qq-upload-button-focus'};qq.extend(this._options,o);this._element=this._options.element;qq.css(this._element,{position:'relative',overflow:'hidden',direction:'ltr'});this._input=this._createInput()};qq.UploadButton.prototype={getInput: function(){return this._input},reset: function(){if(this._input.parentNode){qq.remove(this._input)}
qq.removeClass(this._element,this._options.focusClass);this._input=this._createInput()},_createInput: function(){var input=document.createElement("input");if(this._options.multiple){input.setAttribute("multiple","multiple")}
input.setAttribute("type","file");input.setAttribute("name",this._options.name);qq.css(input,{position:'absolute',right:0,top:0,fontFamily:'Arial',fontSize:'243px',margin:0,padding:0,cursor:'pointer',opacity:0});this._element.appendChild(input);var self=this;qq.attach(input,'change', function(){self._options.onChange(input)});qq.attach(input,'mouseover', function(){qq.addClass(self._element,self._options.hoverClass)});qq.attach(input,'mouseout', function(){qq.removeClass(self._element,self._options.hoverClass)});qq.attach(input,'focus', function(){qq.addClass(self._element,self._options.focusClass)});qq.attach(input,'blur', function(){qq.removeClass(self._element,self._options.focusClass)});if(window.attachEvent){input.setAttribute('tabIndex',"-1")}
return input}};qq.UploadHandlerForm=function(o){this._options={action:'/upload',onComplete: function(id,fileName,response){}};qq.extend(this._options,o);this._inputs={};this._files=[]};qq.UploadHandlerForm.prototype={add: function(fileInput){fileInput.setAttribute('name','qqfile');var uid=qq.getUniqueId();var id='qq-upload-handler-iframe'+uid;this._inputs[id]=fileInput;this._files[uid]=fileInput;if(fileInput.parentNode){qq.remove(fileInput)}
return id},upload: function(id,params){if(typeof id=='number'){var id='qq-upload-handler-iframe'+id}
var input=this._inputs[id];if(!input){throw new Error('file with passed id was not added, or already uploaded or cancelled')}
var fileName=this.getName(id);var iframe=this._createIframe(id);var form=this._createForm(iframe,params);form.appendChild(input);var self=this;this._attachLoadEvent(iframe, function(){self._options.onComplete(id,fileName,self._getIframeContentJSON(iframe));delete self._inputs[id];uid=id.replace('qq-upload-handler-iframe','');self._files[uid]=null;setTimeout(function(){qq.remove(iframe)},1)});form.submit();qq.remove(form);return id},cancel: function(id){if(id in this._inputs){delete this._inputs[id];uid=id.replace('qq-upload-handler-iframe','');this._files[uid]=null}
var iframe=document.getElementById(id);if(iframe){iframe.setAttribute('src','javascript:false;');qq.remove(iframe)}},getName: function(id){return this._inputs[id].value.replace(/.*(\/|\\)/,"")},_attachLoadEvent: function(iframe,callback){qq.attach(iframe,'load', function(){if(!iframe.parentNode){return}
if(iframe.contentDocument&&iframe.contentDocument.body&&iframe.contentDocument.body.innerHTML=="false"){return}
callback()})},_getIframeContentJSON: function(iframe){var doc=iframe.contentDocument?iframe.contentDocument:iframe.contentWindow.document,response;try{response=eval("("+doc.body.innerHTML+")")} catch(err){response={}}
return response},_createIframe: function(id){var iframe=qq.toElement('<iframe src="javascript:false;" name="'+id+'" />');iframe.setAttribute('id',id);iframe.style.display='none';document.body.appendChild(iframe);return iframe},_createForm: function(iframe,params){var form=qq.toElement('<form method="post" enctype="multipart/form-data"></form>');var queryString='?'+qq.obj2url(params);form.setAttribute('action',this._options.action+queryString);form.setAttribute('target',iframe.name);form.style.display='none';document.body.appendChild(form);return form}};qq.UploadHandlerXhr=function(o){this._options={action:'/upload',onProgress: function(id,fileName,loaded,total){},onComplete: function(id,fileName,response){}};qq.extend(this._options,o);this._files=[];this._xhrs=[]};qq.UploadHandlerXhr.isSupported=function(){var input=document.createElement('input');input.type='file';return('multiple' in input&&typeof File!="undefined"&&typeof(new XMLHttpRequest()).upload!="undefined")};qq.UploadHandlerXhr.prototype={add: function(file){return this._files.push(file)-1},upload: function(id,params){var file=this._files[id],name=this.getName(id),size=this.getSize(id);if(!file){throw new Error('file with passed id was not added, or already uploaded or cancelled')}
var xhr=this._xhrs[id]=new XMLHttpRequest();var self=this;xhr.upload.onprogress=function(e){if(e.lengthComputable){self._options.onProgress(id,name,e.loaded,e.total)}};xhr.onreadystatechange=function(){if(!self._files[id]){return}
if(xhr.readyState==4){self._options.onProgress(id,name,size,size);if(xhr.status==200){var response;try{response=eval("("+xhr.responseText+")")} catch(err){response={}}
self._options.onComplete(id,name,response)} else{self._options.onComplete(id,name,{})}
self._files[id]=null;self._xhrs[id]=null}};var queryString='?qqfile='+encodeURIComponent(name)+'&'+qq.obj2url(params);xhr.open("POST",this._options.action+queryString,true);xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("X-File-Name",encodeURIComponent(name));xhr.setRequestHeader("Content-Type",'application/octet-stream');xhr.send(file)},cancel: function(id){this._files[id]=null;if(this._xhrs[id]){this._xhrs[id].abort();this._xhrs[id]=null}},getName: function(id){var file=this._files[id];return file.fileName!=null?file.fileName:file.name},getSize: function(id){var file=this._files[id];return file.fileSize!=null?file.fileSize:file.size}};var qq=qq||{};qq.extend=function(obj1,obj2){for(var prop in obj2){obj1[prop]=obj2[prop]}};qq.getUniqueId=(function(){var id=0;return function(){return id++}})();qq.attach=function(element,type,fn){if(element.addEventListener){element.addEventListener(type,fn,false)} else if(element.attachEvent){element.attachEvent('on'+type,fn)}};qq.detach=function(element,type,fn){if(element.removeEventListener){element.removeEventListener(type,fn,false)} else if(element.attachEvent){element.detachEvent('on'+type,fn)}};qq.preventDefault=function(e){if(e.preventDefault){e.preventDefault()} else{e.returnValue=false}};qq.insertBefore=function(a,b){b.parentNode.insertBefore(a,b)};qq.remove=function(element){element.parentNode.removeChild(element)};qq.contains=function(parent,descendant){if(parent.contains){return parent.contains(descendant)} else{return!!(descendant.compareDocumentPosition(parent)&8)}};qq.toElement=(function(){var div=document.createElement('div');return function(html){div.innerHTML=html;var element=div.firstChild;div.removeChild(element);return element}})();qq.css=function(element,styles){if(styles.opacity!=null){if(typeof element.style.opacity!='string'&&typeof(element.filters)!='undefined'){styles.filter='alpha(opacity='+Math.round(100 * styles.opacity)+')'}}
qq.extend(element.style,styles)};qq.hasClass=function(element,name){var re=new RegExp('(^| )'+name+'( |$)');return re.test(element.className)};qq.addClass=function(element,name){if(!qq.hasClass(element,name)){element.className+=' '+name}};qq.removeClass=function(element,name){var re=new RegExp('(^| )'+name+'( |$)');element.className=element.className.replace(re,' ').replace(/^\s+|\s+$/g,"")};qq.setText=function(element,text){element.innerText=text;element.textContent=text};qq.setProgressBar=function(element,text1,text2){if(!element.hasChildNodes()){if(!text1) size='2px';else size=text1+'%';var progressBar='<div class="sizeContainer"><div class="sizeBar" style="width:'+size+'"></div></div>';var total='<div class="sizeTotal">'+text2+'</div>';element.innerHTML=total+progressBar}
else{var sizeBar=qq.getByClass(element,"sizeBar")[0];sizeBar.style.width=text1+'%'}};qq.children=function(element){var children=[],child=element.firstChild;while(child){if(child.nodeType==1){children.push(child)}
child=child.nextSibling}
return children};qq.getByClass=function(element,className){if(element.querySelectorAll){return element.querySelectorAll('.'+className)}
var result=[];var candidates=element.getElementsByTagName("*");var len=candidates.length;for(var i=0;i<len;i++){if(qq.hasClass(candidates[i],className)){result.push(candidates[i])}}
return result};qq.obj2url=function(obj,temp){var uristrings=[],add=function(nextObj,i){var nextTemp=temp?(/\[\]$/.test(temp)) /* prevent double-encoding */?temp:temp+'['+i+']':i;uristrings.push(typeof nextObj==='object'?qq.obj2url(nextObj,nextTemp):(Object.prototype.toString.call(nextObj)==='[object Function]')?encodeURIComponent(nextTemp)+'='+encodeURIComponent(nextObj()):encodeURIComponent(nextTemp)+'='+encodeURIComponent(nextObj))};if(Object.prototype.toString.call(obj)==='[object Array]'){for(var i=0,len=obj.length;i<len;++i){add(obj[i],i)}} else if((obj!==undefined)&&(obj!==null)&&(typeof obj==="object")){for(var i in obj){add(obj[i],i)}} else{uristrings.push(encodeURIComponent(temp)+'='+encodeURIComponent(obj))}
return uristrings.join('&').replace(/%20/g,'+')};

/* - ++resource++quickupload_static/helpers.js - */
// http://java.bibop.ch/portal_javascripts/++resource++quickupload_static/helpers.js?original=1
var PloneQuickUpload={};PloneQuickUpload.addUploadFields=function(uploader,domelement,file,id,fillTitles){if(fillTitles){var labelfiletitle=jQuery('#uploadify_label_file_title').val();var blocFile=uploader._getItemByFileId(id);if(typeof id=='string') id=parseInt(id.replace('qq-upload-handler-iframe',''));jQuery('.qq-upload-cancel',blocFile).after('\<div class="uploadField">\<label>' + labelfiletitle + '&nbsp;:&nbsp;</label>\<input type="text" \
class="file_title_field" \
id="title_' + id + '" \
name="title" \
value=""/>\</div>\
')}
PloneQuickUpload.showButtons(uploader,domelement)}
PloneQuickUpload.showButtons=function(uploader,domelement){var handler=uploader._handler;if(handler._files.length){jQuery('.uploadifybuttons',jQuery(domelement).parent()).show();return 'ok'}
return false}
PloneQuickUpload.sendDataAndUpload=function(uploader,domelement,typeupload){var handler=uploader._handler;var files=handler._files;var missing=0;for(var id=0;id<files.length;id++){if(files[id]){var fileContainer=jQuery('.qq-upload-list li',domelement)[id-missing];var file_title='';if(fillTitles){file_title=jQuery('.file_title_field',fileContainer).val()}
uploader._queueUpload(id,{'title':file_title,'typeupload':typeupload})}
else missing++}}
PloneQuickUpload.onAllUploadsComplete=function(){Browser.onUploadComplete()}
PloneQuickUpload.clearQueue=function(uploader,domelement){var handler=uploader._handler;var files=handler._files;for(var id=0;id<files.length;id++){if(files[id]){handler.cancel(id)}
jQuery('.qq-upload-list li',domelement).remove();handler._files=[];if(typeof handler._inputs!='undefined') handler._inputs={}}}
PloneQuickUpload.onUploadComplete=function(uploader,domelement,id,fileName,responseJSON){var uploadList=jQuery('.qq-upload-list',domelement);if(responseJSON.success){window.setTimeout( function(){jQuery(uploader._getItemByFileId(id)).remove();var newlist=jQuery('li',uploadList);if(!newlist.length) window.setTimeout(PloneQuickUpload.onAllUploadsComplete,5)},50)}}

