/*! This notice must be untouched at all times.

wz_dragdrop.js	v. 4.55
The latest version is available at
http://www.walterzorn.com
or http://www.devira.com
or http://www.walterzorn.de

Copyright (c) 2002-2003 Walter Zorn. All rights reserved.
Created 26. 8. 2002 by Walter Zorn (Web: http://www.walterzorn.com )
Last modified: 29. 9. 2004

This DHTML & Drag&Drop Library adds Drag&Drop functionality
to the following types of html-elements:
- images, even if not positioned via layers,
  nor via stylesheets or any other kind of "hard-coding"
- relatively and absolutely positioned layers (DIV elements).
Moreover, it provides extended DHTML abilities.

LICENSE: LGPL

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License (LGPL) as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA,
or see http://www.gnu.org/copyleft/lesser.html 
*/

for(var spacer="transparentpixel.gif",CLONE="C10nE",COPY="C0pY",DETACH_CHILDREN="d37aCH",HORIZONTAL="H0r1Z",MAXHEIGHT="m7x8I",MAXOFFBOTTOM="m7xd0wN",MAXOFFLEFT="m7x23Ft",MAXOFFRIGHT="m7x0Ff8",MAXOFFTOP="m7xu9",MAXWIDTH="m7xW1",MINWIDTH="m1nw1",MINHEIGHT="m1n8I",NO_ALT="no81T",NO_DRAG="N0d4Ag",RESET_Z="r35E7z",RESIZABLE="r5IZbl",SCALABLE="SCLbl",SCROLL="sC8lL",VERTICAL="V3Rt1C",dd_cursors="c:default,c:crosshair,c:e-resize,c:hand,c:help,c:move,c:n-resize,c:ne-resize,c:nw-resize,c:s-resize,c:se-resize,c:sw-resize,c:text,c:w-resize,c:wait".split(","),
dd_i=dd_cursors.length;dd_i--;)eval("var CURSOR_"+dd_cursors[dd_i].substring(2).toUpperCase().replace("-","_")+' = "'+dd_cursors[dd_i]+'";');
function WZDD(){this.n=navigator.userAgent.toLowerCase();this.db=document.compatMode&&document.compatMode.toLowerCase()!="backcompat"?document.documentElement:document.body||null;this.op=!(!window.opera||!document.getElementById);this.op6=!(!this.op||this.db&&this.db.innerHTML);if(this.op&&!this.op6)document.onmousedown=new Function("e",'if (((e = e || window.event).target || e.srcElement).tagName == "IMAGE") return false;');this.ie=!!(this.n.indexOf("msie")>=0&&document.all&&this.db&&!this.op);this.iemac=
!!(this.ie&&this.n.indexOf("mac")>=0);this.ie4=!(!this.ie||document.getElementById);this.n4=!!(document.layers&&typeof document.classes!="undefined");this.n6=!!(typeof window.getComputedStyle!="undefined"&&typeof document.createRange!="undefined");this.w3c=!(this.op||this.ie||this.n6||!document.getElementById);this.ce=!(!document.captureEvents||!document.releaseEvents);this.px=this.n4||this.op6?"":"px"}var dd=new WZDD;dd.Int=function(a,b){return isNaN(b=parseInt(a))?0:b};
dd.getWndW=function(){return dd.Int(dd.db&&!dd.op&&!dd.w3c&&dd.db.clientWidth?dd.db.clientWidth:window.innerWidth||0)};dd.getWndH=function(){return dd.Int(dd.db&&!dd.op&&!dd.w3c&&dd.db.clientHeight?dd.db.clientHeight:window.innerHeight||0)};dd.getScrollX=function(){return dd.Int(window.pageXOffset||(dd.db?dd.db.scrollLeft:0))};dd.getScrollY=function(){return dd.Int(window.pageYOffset||(dd.db?dd.db.scrollTop:0))};
dd.getPageXY=function(a){if(dd.n4&&a)dd.x=a.pageX||0,dd.y=a.pageY||0;else for(dd.x=dd.y=0;a;)dd.x+=dd.Int(a.offsetLeft),dd.y+=dd.Int(a.offsetTop),a=a.offsetParent||null};dd.getCssXY=function(a){a.div?dd.n4?(a.cssx=a.div.x,a.cssy=a.div.y):dd.ie4?(a.cssx=a.css.pixelLeft,a.cssy=a.css.pixelTop):(a.css.left=a.css.top=0+dd.px,dd.getPageXY(a.div),a.cssx=a.x-dd.x,a.cssy=a.y-dd.y,a.css.left=a.cssx+dd.px,a.css.top=a.cssy+dd.px):(a.cssx=0,a.cssy=0)};dd.getImgW=function(a){return a?dd.Int(a.width):0};
dd.getImgH=function(a){return a?dd.Int(a.height):0};dd.getDivW=function(a){return dd.Int(dd.n4?a.div?a.div.clip.width:0:a.div?a.div.offsetWidth||a.css.pixelWidth||a.css.width||0:0)};dd.getDivH=function(a){return dd.Int(dd.n4?a.div?a.div.clip.height:0:a.div?a.div.offsetHeight||a.css.pixelHeight||a.css.height||0:0)};
dd.getWH=function(a){a.w=dd.getDivW(a);a.h=dd.getDivH(a);a.css?(a.css.width=a.w+dd.px,a.css.height=a.h+dd.px,a.dw=dd.getDivW(a)-a.w,a.dh=dd.getDivH(a)-a.h,a.css.width=a.w-a.dw+dd.px,a.css.height=a.h-a.dh+dd.px):a.dw=a.dh=0};dd.getCssProp=function(a,b,c,d){return a&&dd.n6?""+window.getComputedStyle(a,null).getPropertyValue(b):a&&a.currentStyle?""+eval("d_o.currentStyle."+c):a&&a.style?""+eval("d_o.style."+c):a&&dd.n4?""+eval("d_o."+d):""};
dd.getDiv=function(a,b){b=b||document;if(dd.n4){if(b.layers[a])return b.layers[a];for(var c=b.layers.length;c--;){var d=dd.getDiv(a,b.layers[c].document);if(d)return d}}return dd.ie?b.all[a]||null:b.getElementById?b.getElementById(a)||null:null};
dd.getImg=function(a,b,c,d){var d=d||window,e;if((e=d.document.images[b])&&e.name==b){if(c)dd.n4?(dd.getPageXY(d),a.defx=e.x+dd.x,a.defy=e.y+dd.y):(dd.getPageXY(e),a.defx=dd.x,a.defy=dd.y);return e}if(dd.n4)for(e=d.document.layers.length;e--;){var f=dd.getImg(a,b,c,d.document.layers[e]);if(f)return f}return null};
dd.getParent=function(a){if(dd.n4)for(var b,c=dd.elements.length;c--;)!(b=dd.elements[c]).is_image&&b.div&&(b.div.document.layers[a.name]||a.oimg&&b.div.document.images[a.oimg.name])&&b.addChild(a,b.detach,1);else for(b=a.is_image?dd.getImg(a,a.oimg.name):a.div||null;b&&(b=b.offsetParent||b.parentNode||null);)if(b.ddObj){b.ddObj.addChild(a,b.ddObj.detach,1);break}};
dd.getCmd=function(a,b,c){var d=a.id.indexOf(b),e=(d>=0)*1;if(e)b=d+b.length,c&&(a.cmd+=a.id.substring(d,b)),a.id=a.id.substring(0,d)+a.id.substring(b);return e};dd.getCmdVal=function(a,b,c,d){var e=a.id.indexOf(b),f=a.id.indexOf(b)>=0?dd.Int(a.id.substring(a.id.indexOf(b)+b.length)):d?-1:0;if(!d&&f||d&&f>=0)b=e+b.length+f.toString().length,c&&(a.cmd+=a.id.substring(e,b)),a.id=a.id.substring(0,e)+a.id.substring(b);return f};
dd.addElt=function(a,b){dd.elements[dd.elements.length]=dd.elements[a.name]=a;b&&(b.copies[b.copies.length]=b.copies[a.name]=a)};dd.mkWzDom=function(){for(var a=dd.elements.length;a--;)dd.getParent(dd.elements[a]);for(a=dd.elements.length;a--;)d_o=dd.elements[a];if(d_o.children&&!d_o.parent)for(a=d_o.children.length;a--;)d_o.children[a].setZ(d_o.z+d_o.children[a].z,1)};
dd.addProps=function(a){var b,c;if(a.is_image){a.div=dd.getDiv(a.id);if(a.div&&typeof a.div.style!="undefined")a.css=a.div.style;a.nimg=dd.n4&&a.div?a.div.document.images[0]:document.images[a.id+"NImG"]||null;if(!a.noalt&&!dd.noalt&&(a.nimg.alt=a.oimg.alt||"",a.oimg.title))a.nimg.title=a.oimg.title;a.bgColor=""}else if(a.bgColor=dd.getCssProp(a.div,"background-color","backgroundColor","bgColor").toLowerCase(),dd.n6&&a.div)if((c=a.bgColor).indexOf("rgb")>=0){c=c.substring(4,c.length-1).split(",");
a.bgColor="#";for(b=0;b<c.length;b++)a.bgColor+=parseInt(c[b]).toString(16)}else a.bgColor=c;if(dd.scalable)a.scalable=a.resizable^1;else if(dd.resizable)a.resizable=a.scalable^1;a.setZ(a.defz);a.cursor=a.cursor||dd.cursor||"auto";a._setCrs(a.nodrag?"auto":a.cursor);a.visible=!0};
dd.initz=function(){if(dd&&(dd.n4||dd.n6||dd.ie||dd.op||dd.w3c)){dd.op6?WINSZ(2):(dd.n6||dd.ie||dd.op&&!dd.op6||dd.w3c)&&dd.recalc(1);var a=document.onmousemove==DRAG,b=document.onmousemove==RESIZE;dd.loadFunc&&dd.loadFunc();a&&document.onmousemove!=DRAG?dd.setEvtHdl(1,DRAG):b&&document.onmousemove!=RESIZE&&dd.setEvtHdl(1,RESIZE);(a||b)&&document.onmouseup!=DROP&&dd.setEvtHdl(2,DROP);dd.setEvtHdl(0,PICK)}};dd.finlz=function(){if(dd.ie&&dd.elements)for(var a=dd.elements.length;a--;)dd.elements[a].del()};
dd.setEvtHdl=function(a,b){if(a)if(a&1){if(document.onmousemove!=b)dd.moveFunc=document.onmousemove||null;document.onmousemove=b}else{if(document.onmouseup!=b)dd.upFunc=document.onmouseup||null;document.onmouseup=b}else{if(document.onmousedown!=b)dd.downFunc=document.onmousedown||null;document.onmousedown=b}if(dd.ce){var c=!a?Event.MOUSEDOWN:a&1?Event.MOUSEMOVE:Event.MOUSEUP;b?document.captureEvents(c):document.releaseEvents(c)}};
dd.evt=function(a){this.but=(this.e=a||window.event).which||this.e.button||0;this.button=this.e.type=="mousedown"?this.but:dd.e&&dd.e.button?dd.e.button:0;this.src=this.e.target||this.e.srcElement||null;this.src.tag=(this.src.tagName||this.src).toString().toLowerCase();this.x=dd.Int(this.e.pageX||this.e.clientX||0);this.y=dd.Int(this.e.pageY||this.e.clientY||0);dd.ie&&(this.x+=dd.getScrollX()-(dd.ie&&!dd.iemac)*1,this.y+=dd.getScrollY()-(dd.ie&&!dd.iemac)*1);this.modifKey=this.e.modifiers?this.e.modifiers&
Event.SHIFT_MASK||this.e.modifiers&Event.CONTROL_MASK:this.e.shiftKey||this.e.ctrlKey||!1};
dd.recalc=function(a){if(dd.elements)for(var b,c=dd.elements.length;c--;)if(!(b=dd.elements[c]).is_image&&b.div){if(dd.getWH(b),b.div.pos_rel){dd.getPageXY(b.div);var d=dd.x-b.x,e=dd.y-b.y;b.defx+=d;b.x+=d;b.defy+=e;b.y+=e;for(var f,g=b.children.length;g--;)if(!(f=b.children[g]).detached&&(b!=f.defparent||!f.is_image||!dd.getImg(f,f.oimg.name,1)))f.defx+=d,f.defy+=e,f.moveBy(d,e)}}else if(b.is_image&&!dd.op6&&!dd.n4){if(dd.n6&&a&&!b.defw)b.resizeTo(b.defw=dd.getImgW(b.oimg),b.defh=dd.getImgH(b.oimg));
d=b.defx;e=b.defy;!(b.parent&&b.parent!=b.defparent)&&(a||!b.detached||b.horizontal||b.vertical)&&dd.getImg(b,b.oimg.name,1)&&b.moveBy(b.defx-d,b.defy-e)}};function WINSZ(a){if(a){if(dd.n4||dd.op6&&a&2)dd.iW=innerWidth,dd.iH=innerHeight,dd.op6&&setTimeout("WINSZ()",511);window.onresize=new Function("WINSZ();")}else(dd.n4||dd.op6)&&(innerWidth!=dd.iW||innerHeight!=dd.iH)?location.reload():dd.op6?setTimeout("WINSZ()",511):dd.n4||setTimeout("dd.recalc()",10)}WINSZ(1);
function DDObj(a,b){this.id=a;this.cmd="";this.cpy_n=dd.getCmdVal(this,COPY);this.maxoffb=dd.getCmdVal(this,MAXOFFBOTTOM,0,1);this.maxoffl=dd.getCmdVal(this,MAXOFFLEFT,0,1);this.maxoffr=dd.getCmdVal(this,MAXOFFRIGHT,0,1);this.maxofft=dd.getCmdVal(this,MAXOFFTOP,0,1);for(var c=dd_cursors.length;c--;)if(dd.getCmd(this,dd_cursors[c],1))this.cursor=dd_cursors[c].substring(2);this.clone=dd.getCmd(this,CLONE,1);this.detach=dd.getCmd(this,DETACH_CHILDREN);this.scalable=dd.getCmd(this,SCALABLE,1);this.horizontal=
dd.getCmd(this,HORIZONTAL);this.noalt=dd.getCmd(this,NO_ALT,1);this.nodrag=dd.getCmd(this,NO_DRAG);this.scroll=dd.getCmd(this,SCROLL,1);this.resizable=dd.getCmd(this,RESIZABLE,1);this.re_z=dd.getCmd(this,RESET_Z,1);this.vertical=dd.getCmd(this,VERTICAL);this.maxw=dd.getCmdVal(this,MAXWIDTH,1,1);this.minw=Math.abs(dd.getCmdVal(this,MINWIDTH,1,1));this.maxh=dd.getCmdVal(this,MAXHEIGHT,1,1);this.minh=Math.abs(dd.getCmdVal(this,MINHEIGHT,1,1));this.name=this.id+(b||"");this.oimg=dd.getImg(this,this.id,
1);this.is_image=!!this.oimg;this.copies=[];this.children=[];this.parent=this.original=null;if(this.oimg)this.id+="div"+(b||""),this.w=dd.getImgW(this.oimg),this.h=dd.getImgH(this.oimg),this.dw=this.dh=0,this.defz=dd.Int(dd.getCssProp(this.oimg,"z-index","zIndex","zIndex"))||1,this.defsrc=this.src=this.oimg.src,this.htm='<img name="'+this.id+'NImG" src="'+this.oimg.src+'" width="'+this.w+'" height="'+this.h+'">',this.t_htm='<div id="'+this.id+'" style="position:absolute;left:'+(this.cssx=this.x=this.defx)+
"px;top:"+(this.cssy=this.y=this.defy)+"px;width:"+this.w+"px;height:"+this.h+'px;">'+this.htm+"</div>";else{if((this.div=dd.getDiv(this.id))&&typeof this.div.style!="undefined")this.css=this.div.style;dd.getWH(this);if(this.div)this.div.ddObj=this,this.div.pos_rel=(this.div.parentNode?this.div.parentNode.tagName:this.div.parentElement?this.div.parentElement.tagName:"").toString().toLowerCase().indexOf("body")<0;dd.getPageXY(this.div);this.defx=this.x=dd.x;this.defy=this.y=dd.y;dd.getCssXY(this);
this.defz=dd.Int(dd.getCssProp(this.div,"z-index","zIndex","zIndex"))}this.defw=this.w||0;this.defh=this.h||0}DDObj.prototype.moveBy=function(a,b,c,d){if(this.div){this.x+=a=dd.Int(a);this.y+=b=dd.Int(b);if(!c||this.is_image||this.parent!=this.defparent)(d=this.css||this.div).left=(this.cssx+=a)+dd.px,d.top=(this.cssy+=b)+dd.px;for(c=this.children.length;c--;)(d=this.children[c]).detached||d.moveBy(a,b,1),d.defx+=a,d.defy+=b}};
DDObj.prototype.moveTo=function(a,b){this.moveBy(dd.Int(a)-this.x,dd.Int(b)-this.y)};
DDObj.prototype.hide=function(a,b,c){if(this.div&&this.visible)if(c=this.css||this.div,a&&!dd.n4){this.display=dd.getCssProp(this.div,"display","display","display");if(this.oimg)this.oimg.display=dd.getCssProp(this.oimg,"display","display","display"),this.oimg.style.display="none";c.display="none";dd.recalc()}else c.visibility="hidden";this.visible=!1;for(c=this.children.length;c--;)(b=this.children[c]).detached||b.hide(a)};
DDObj.prototype.show=function(a,b){if(this.div)if(b=this.css||this.div,b.display&&b.display=="none"){b.display=this.display||"block";if(this.oimg)this.oimg.style.display=this.oimg.display||"inline";dd.recalc()}else b.visibility="visible";this.visible=!0;for(var c=this.children.length;c--;)(a=this.children[c]).detached||a.show()};
DDObj.prototype.resizeTo=function(a,b,c){if(this.div)if(a=(this.w=dd.Int(a))-this.dw,b=(this.h=dd.Int(b))-this.dh,dd.n4){if(this.div.resizeTo(a,b),this.is_image)this.write('<img src="'+this.src+'" width="'+a+'" height="'+b+'">'),(this.nimg=this.div.document.images[0]).src=this.src}else if(typeof this.css.pixelWidth!="undefined"){if(this.css.pixelWidth=a,this.css.pixelHeight=b,this.is_image)(c=this.nimg.style).pixelWidth=a,c.pixelHeight=b}else if(this.css.width=a+dd.px,this.css.height=b+dd.px,this.is_image&&
((c=this.nimg).width=a,c.height=b,!c.complete))c.src=this.src};DDObj.prototype.resizeBy=function(a,b){this.resizeTo(this.w+dd.Int(a),this.h+dd.Int(b))};DDObj.prototype.swapImage=function(a,b){if(this.nimg&&(this.nimg.src=a,this.src=this.nimg.src,b))for(var c=this.copies.length;c--;)this.copies[c].src=this.copies[c].nimg.src=this.nimg.src};DDObj.prototype.setBgColor=function(a){if(dd.n4&&this.div)this.div.bgColor=a;else if(this.css)this.css.background=a;this.bgColor=a};
DDObj.prototype.write=function(a,b){this.text=a;if(this.div)if(dd.n4)(b=this.div.document).open(),b.write(a),b.close(),dd.getWH(this);else if(!dd.op6)this.css.height="auto",this.div.innerHTML=a,dd.ie4||dd.recalc(),(dd.ie4||dd.n6)&&setTimeout("dd.recalc();",0)};
DDObj.prototype.copy=function(a,b){if(this.oimg)for(a=a||1;a--;){var c=this.copies.length,d=new DDObj(this.name+this.cmd,c+1);dd.n4?(d.id=(b=new Layer(d.w)).name,b.clip.height=d.h,b.visibility="show",(b=b.document).open(),b.write(d.htm),b.close()):dd.db.insertAdjacentHTML?dd.db.insertAdjacentHTML("AfterBegin",d.t_htm):document.createElement&&dd.db&&dd.db.appendChild?(dd.db.appendChild(b=document.createElement("div")),b.innerHTML=d.htm,b.id=d.id,b.style.position="absolute",b.style.width=d.w+"px",b.style.height=
d.h+"px"):dd.db&&dd.db.innerHTML&&(dd.db.innerHTML+=d.t_htm);d.defz=this.defz+1+c;dd.addProps(d);d.original=this;dd.addElt(d,this);if(this.parent)this.parent.addChild(d,this.detached),d.defparent=this.defparent;d.moveTo(d.defx=this.defx,d.defy=this.defy);if(dd.n4)d.defsrc=d.src=this.defsrc;d.swapImage(this.src)}};
DDObj.prototype.addChild=function(a,b,c){typeof a!="object"&&(a=dd.elements[a]);if(!(a.parent&&a.parent==this||a==this||!a.is_image&&a.defparent&&!c)){this.children[this.children.length]=this.children[a.name]=a;a.detached=b||0;c?a.defparent=this:this==a.defparent&&a.is_image&&dd.getImg(this,a.oimg.name,1);if(!a.defparent||this!=a.defparent)a.defx=a.x,a.defy=a.y;if(!b)a.defz=a.defz+this.defz-(a.parent?a.parent.defz:0)+!a.is_image*1,a.setZ(a.z+this.z-(a.parent?a.parent.z:0)+!a.is_image*1,1);a.parent&&
a.parent._removeChild(a,1);a.parent=this}};DDObj.prototype._removeChild=function(a,b){typeof a!="object"&&(a=this.children[a]);for(var c=this.children,d=[],e=0;e<c.length;e++)c[e]!=a&&(d[d.length]=c[e]);this.children=d;a.parent=null;if(!b)a.detached=a.defp=0,a.is_image&&dd.getImg(a,a.oimg.name,1)};DDObj.prototype.attachChild=function(a){(a=typeof a!="object"?this.children[a]:a).detached=0;a.setZ(a.defz+this.z-this.defz,1)};
DDObj.prototype.detachChild=function(a){(a=typeof a!="object"?this.children[a]:a).detached=1};DDObj.prototype.setZ=function(a,b){if(b)for(var c=a-this.z,d=this.children.length;d--;)(d_o=this.children[d]).detached||d_o.setZ(d_o.z+c,1);dd.z=Math.max(dd.z,this.z=this.div?(this.css||this.div).zIndex=a:0)};DDObj.prototype.maximizeZ=function(){this.setZ(dd.z+1,1)};
DDObj.prototype._resetZ=function(a){if(this.re_z||dd.re_z){this.setZ(this.defz);for(var b=this.children.length;b--;)(a=this.children[b]).detached||a.setZ(a.defz)}};DDObj.prototype.setCursor=function(a){this._setCrs(this.cursor=a.indexOf("c:")+1?a.substring(2):a)};DDObj.prototype._setCrs=function(a){if(this.css)this.css.cursor=(!dd.ie||dd.iemac)&&a=="hand"?"pointer":a};DDObj.prototype.setDraggable=function(a){this.nodrag=!a*1;this._setCrs(a?this.cursor:"auto")};
DDObj.prototype.setResizable=function(a){this.resizable=a*1;if(a)this.scalable=0};DDObj.prototype.setScalable=function(a){this.scalable=a*1;if(a)this.resizable=0};
DDObj.prototype.del=function(a,b){this.parent&&this.parent._removeChild&&this.parent._removeChild(this);if(this.original){if(this.hide(),this.original.copies){for(var a=[],c=0;c<this.original.copies.length;c++)if((b=this.original.copies[c])!=this)a[a.length]=a[b.name]=b;this.original.copies=a}}else if(this.is_image){if(this.hide(),this.oimg)dd.n4?this.oimg.src=this.defsrc:this.oimg.style.visibility="visible"}else if(this.moveTo){if(this.css)this.css.cursor="default";this.moveTo(this.defx,this.defy);
this.resizeTo(this.defw,this.defh)}a=[];for(c=0;c<dd.elements.length;c++)(b=dd.elements[c])!=this?a[a.length]=a[b.name]=b:b._free();dd.elements=a;!dd.op6&&!dd.n4&&dd.recalc()};DDObj.prototype._free=function(){for(var a in this)this[a]=null;dd.elements[this.name]=null};dd.n4RectVis=function(a){for(var b=4;b--;)if(dd.rectI[b].visibility=dd.rectA[b].visibility=a?"show":"hide",a)dd.rectI[b].zIndex=dd.rectA[b].zIndex=dd.z+2};dd.n4RectPos=function(a,b,c,d,e){a.x=b;a.y=c;a.clip.width=d;a.clip.height=e};
dd.n4Rect=function(a,b){if(!dd.rectI)dd.rectI=[],dd.rectA=[];if(!dd.rectI[0])for(var c=4;c--;)(dd.rectI[c]=new Layer(1)).bgColor="#000000",(dd.rectA[c]=new Layer(1)).bgColor="#ffffff";(!dd.rectI[0].visibility||dd.rectI[0].visibility=="hide")&&dd.n4RectVis(1);dd.obj.w=a;dd.obj.h=b;for(c=4;c--;)dd.n4RectPos(dd.rectI[c],dd.obj.x+(!(c-1)?dd.obj.w-1:0),dd.obj.y+(!(c-2)?dd.obj.h-1:0),c&1||dd.obj.w,!(c&1)||dd.obj.h),dd.n4RectPos(dd.rectA[c],!(c-1)?dd.rectI[1].x+1:dd.obj.x-1,!(c-2)?dd.rectI[2].y+1:dd.obj.y-
1,c&1||dd.obj.w+2,!(c&1)||dd.obj.h+2)};dd.reszTo=function(a,b){dd.n4&&dd.obj.is_image?dd.n4Rect(a,b):dd.obj.resizeTo(a,b)};dd.embedVis=function(a){for(var b=["iframe","applet","embed","object"],c=b.length;c--;){var d=dd.ie?document.all.tags(b[c]):document.getElementsByTagName?document.getElementsByTagName(b[c]):null;if(d)for(var e=d.length;e--;)for(var f=d[e];f.offsetParent||f.parentNode;)if((f=f.parentNode||f.offsetParent||null)==dd.obj.div){d[e].style.visibility=a;break}}};
dd.maxOffX=function(a,b){return dd.obj.maxoffl+1&&(b=dd.obj.defx-dd.obj.maxoffl)-a>0||dd.obj.maxoffr+1&&(b=dd.obj.defx+dd.obj.maxoffr)-a<0?b:a};dd.maxOffY=function(a,b){return dd.obj.maxofft+1&&(b=dd.obj.defy-dd.obj.maxofft)-a>0||dd.obj.maxoffb+1&&(b=dd.obj.defy+dd.obj.maxoffb)-a<0?b:a};dd.inWndW=function(a,b){var c=dd.getScrollX(),d=dd.getWndW();return(b=c+2)-a>0||(b=c+d+dd.obj.w-2)-a<0?b:a};
dd.inWndH=function(a,b){var c=dd.getScrollY(),d=dd.getWndH();return(b=c+2)-a>0||(b=c+d+dd.obj.h-2)-a<0?b:a};dd.limW=function(a){return dd.obj.minw-a>0?dd.obj.minw:dd.obj.maxw>0&&dd.obj.maxw-a<0?dd.obj.maxw:a};dd.limH=function(a){return dd.obj.minh-a>0?dd.obj.minh:dd.obj.maxh>0&&dd.obj.maxh-a<0?dd.obj.maxh:a};
function DDScroll(){if(!dd.obj||!dd.obj.scroll&&!dd.scroll||dd.op||dd.ie4||dd.whratio)dd.scrx=dd.scry=0;else{var a=dd.getScrollX(),b=dd.getScrollY();if(dd.msmoved){var c=dd.getWndW(),d=dd.getWndH(),e;dd.scrx=(e=dd.e.x-c-a+28)>0?(e>>=2)*e:(e=a+28-dd.e.x)>0?-(e>>=2)*e:0;dd.scry=(e=dd.e.y-d-b+28)>0?(e>>=2)*e:(e=b+28-dd.e.y)>0?-(e>>=2)*e:0}if(dd.scrx||dd.scry)window.scrollTo(a+(dd.scrx=dd.obj.is_resized?dd.limW(dd.obj.w+dd.scrx)-dd.obj.w:dd.obj.vertical?0:dd.maxOffX(dd.obj.x+dd.scrx)-dd.obj.x),b+(dd.scry=
dd.obj.is_resized?dd.limH(dd.obj.h+dd.scry)-dd.obj.h:dd.obj.horizontal?0:dd.maxOffY(dd.obj.y+dd.scry)-dd.obj.y)),dd.obj.is_dragged?dd.obj.moveTo(dd.obj.x+dd.getScrollX()-a,dd.obj.y+dd.getScrollY()-b):dd.reszTo(dd.obj.w+dd.getScrollX()-a,dd.obj.h+dd.getScrollY()-b);dd.msmoved=0;window.setTimeout("DDScroll()",51)}}
function PICK(a){dd.e=new dd.evt(a);if(dd.e.x>=dd.getWndW()+dd.getScrollX()||dd.e.y>=dd.getWndH()+dd.getScrollY())return!0;for(var b,c=-1,d=dd.elements.length;d--;){b=dd.elements[d];if(dd.n4&&dd.e.but>1&&dd.e.src==b.oimg&&!b.clone)return!1;if(b.visible&&dd.e.but<=1&&!b.nodrag&&dd.e.x>=b.x&&dd.e.x<=b.x+b.w&&dd.e.y>=b.y&&dd.e.y<=b.y+b.h&&b.z>c&&dd.e.src.tag.indexOf("input")<0&&dd.e.src.tag.indexOf("textarea")<0&&dd.e.src.tag.indexOf("select")<0&&dd.e.src.tag.indexOf("option")<0)c=b.z,dd.obj=b}if(dd.obj){dd.e.e.cancelBubble=
!0;a=dd.e.modifKey&&(dd.obj.resizable||dd.obj.scalable);if(dd.op&&!dd.op6)(b=document.getElementById("OpBlUr")).style.pixelLeft=dd.e.x,b.style.pixelTop=dd.e.y,(b=b.children[0].children[0]).focus(),b.blur();else if(dd.ie&&!dd.ie4)document.selection&&document.selection.empty&&document.selection.empty(),dd.db.onselectstart=function(){event.returnValue=!1};if(a){dd.obj._setCrs("se-resize");dd.obj.is_resized=1;dd.whratio=dd.obj.scalable?dd.obj.defw/dd.obj.defh:0;if(dd.ie){if(dd.ie4)window.dd_x=dd.getScrollX(),
window.dd_y=dd.getScrollY();setTimeout("if (dd.obj && document.selection && document.selection.empty){document.selection.empty();if (dd.ie4) window.scrollTo(window.dd_x, window.dd_y);}",0)}dd.setEvtHdl(1,RESIZE);dd.reszTo(dd.obj.w,dd.obj.h)}else if(!dd.obj.nodrag)dd.obj.is_dragged=1,dd.setEvtHdl(1,DRAG);dd.setEvtHdl(2,DROP);dd.embedVis("hidden");dd.obj.maximizeZ();dd.ofx=dd.obj.x+dd.obj.w-dd.e.x;dd.ofy=dd.obj.y+dd.obj.h-dd.e.y;window.my_PickFunc&&my_PickFunc();DDScroll();return!(dd.obj.is_resized||
dd.n4&&dd.obj.is_image||dd.n6||dd.w3c)}return dd.downFunc?dd.downFunc(a):!0}
function DRAG(a){if(!dd.obj||!dd.obj.visible)return!0;if(dd.ie4||dd.w3c||dd.n6||dd.obj.children.length>15){if(dd.wait)return!1;dd.wait=1;setTimeout("dd.wait = 0;",5)}dd.e=new dd.evt(a);if(dd.ie&&!dd.e.but)return DROP(a),!0;dd.msmoved=1;dd.obj.moveTo(dd.obj.vertical?dd.obj.x:dd.maxOffX(dd.inWndW(dd.ofx+dd.e.x)-dd.obj.w),dd.obj.horizontal?dd.obj.y:dd.maxOffY(dd.inWndH(dd.ofy+dd.e.y)-dd.obj.h));window.my_DragFunc&&my_DragFunc();return!1}
function RESIZE(a){if(!dd.obj||!dd.obj.visible)return!0;if(dd.wait)return!1;dd.wait=1;setTimeout("dd.wait = 0;",5);dd.e=new dd.evt(a);if(dd.ie&&!dd.e.but)return DROP(a),!0;dd.msmoved=1;a=dd.limW(dd.inWndW(dd.ofx+dd.e.x)-dd.obj.x);if(dd.whratio)b=dd.limH(dd.inWndH(Math.round(a/dd.whratio)+dd.obj.y)-dd.obj.y),a=Math.round(b*dd.whratio);else var b=dd.limH(dd.inWndH(dd.ofy+dd.e.y)-dd.obj.y);dd.reszTo(a,b);window.my_ResizeFunc&&my_ResizeFunc();return!1}
function DROP(a){if(dd.obj){dd.obj.is_dragged?dd.obj.is_image||dd.getWH(dd.obj):dd.n4&&dd.obj.is_image&&(dd.n4RectVis(0),dd.obj.resizeTo(dd.obj.w,dd.obj.h));(!dd.n4&&!dd.op6||!dd.obj.is_image)&&dd.recalc();dd.setEvtHdl(1,dd.moveFunc);dd.setEvtHdl(2,dd.upFunc);if(dd.db)dd.db.onselectstart=null;dd.obj._setCrs(dd.obj.cursor);dd.embedVis("visible");dd.obj._resetZ();if(window.my_DropFunc)dd.e=new dd.evt(a),my_DropFunc();dd.msmoved=dd.obj.is_dragged=dd.obj.is_resized=dd.whratio=0;dd.obj=null}dd.setEvtHdl(0,
PICK)}
function SET_DHTML(){dd.elements=[];for(var a=SET_DHTML.arguments,b,c="",d=a.length;d--;){if(dd.op6)for(b=(new Date).getTime();(new Date).getTime()-b<153;);if((b=a[d]).indexOf("c:"))if(b==NO_ALT)dd.noalt=1;else if(b==SCROLL)dd.scroll=1;else if(b==RESET_Z)dd.re_z=1;else if(b==RESIZABLE)dd.resizable=1;else if(b==SCALABLE)dd.scalable=1;else{if(b=new DDObj(b),dd.addElt(b),c+=b.t_htm||"",b.oimg&&b.cpy_n)for(var e=0;e<b.cpy_n;){var f=new DDObj(b.name+b.cmd,++e);dd.addElt(f,b);f.defz=b.defz+e;f.original=b;
c+=f.t_htm}}else dd.cursor=b.substring(2)}if(dd.n4||dd.n6||dd.ie||dd.op||dd.w3c)document.write((dd.n4?'<div style="position:absolute;"></div>\n':dd.op&&!dd.op6?'<div id="OpBlUr" style="position:absolute;visibility:hidden;width:0px;height:0px;"><form><input type="text" style="width:0px;height:0px;"></form></div>':"")+c);dd.z=51;for(d=dd.elements.length;d--;)if(dd.addProps(b=dd.elements[d]),b.is_image&&!b.original&&!b.clone)dd.n4?b.oimg.src=spacer:b.oimg.style.visibility="hidden";dd.mkWzDom();if(window.onload)dd.loadFunc=
window.onload;window.onload=dd.initz;window.onunload=dd.finlz;dd.setEvtHdl(0,PICK)}function ADD_DHTML(a){a=new DDObj(a);dd.addElt(a);dd.addProps(a);dd.mkWzDom()}dd.d=document;var RESET_ZINDEX=RESET_Z,KEYDOWN_RESIZE=RESIZABLE,CURSOR_POINTER=CURSOR_HAND,NO_SCROLL="";function my_PickFunc(){}function my_DragFunc(){}function my_ResizeFunc(){}function my_DropFunc(){};
