1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840 |
- if(!dojo._hasResource["dojo._base.html"]){
- dojo._hasResource["dojo._base.html"] = true;
- dojo.provide("dojo._base.html");
- dojo.require("dojo._base.lang");
- try{
- document.execCommand("BackgroundImageCache", false, true);
- }catch(e){
-
- }
- if(dojo.isIE){
- dojo.byId = function(id, doc){
- if(typeof id != "string"){
- return id;
- }
- var _d = doc || dojo.doc, te = _d.getElementById(id);
-
-
- if(te && (te.attributes.id.value == id || te.id == id)){
- return te;
- }else{
- var eles = _d.all[id];
- if(!eles || eles.nodeName){
- eles = [eles];
- }
-
- var i=0;
- while((te=eles[i++])){
- if((te.attributes && te.attributes.id && te.attributes.id.value == id)
- || te.id == id){
- return te;
- }
- }
- }
- };
- }else{
- dojo.byId = function(id, doc){
-
-
- return ((typeof id == "string") ? (doc || dojo.doc).getElementById(id) : id) || null;
- };
- }
- (function(){
- var d = dojo;
- var byId = d.byId;
- function _destroy(/*DomNode*/ node, /*DomNode*/ parent){
- if(node.firstChild){
- _empty(node);
- }
- if(parent){
-
- d.isIE && parent.canHaveChildren && 'removeNode' in node ? node.removeNode(false) :
- parent.removeChild(node);
- }
- }
- dojo._destroyElement = dojo.destroy = function(/*String|DomNode*/node){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- node = byId(node);
- if(!node){ return; }
- _destroy(node, node.parentNode);
- };
- dojo.isDescendant = function(/*DomNode|String*/node, /*DomNode|String*/ancestor){
-
-
-
-
-
-
-
-
- try{
- node = byId(node);
- ancestor = byId(ancestor);
- while(node){
- if(node == ancestor){
- return true;
- }
- node = node.parentNode;
- }
- }catch(e){ }
- return false;
- };
- dojo.setSelectable = function(/*DomNode|String*/node, /*Boolean*/selectable){
-
-
-
-
-
-
-
-
-
-
-
-
-
- node = byId(node);
- if(d.isMozilla){
- node.style.MozUserSelect = selectable ? "" : "none";
- }else if(d.isKhtml || d.isWebKit){
- node.style.KhtmlUserSelect = selectable ? "auto" : "none";
- }else if(d.isIE){
- var v = (node.unselectable = selectable ? "" : "on");
- d.query("*", node).forEach("item.unselectable = '"+v+"'");
- }
-
- };
- var _insertBefore = function(/*DomNode*/node, /*DomNode*/ref){
- var parent = ref.parentNode;
- if(parent){
- parent.insertBefore(node, ref);
- }
- };
- var _insertAfter = function(/*DomNode*/node, /*DomNode*/ref){
-
-
- var parent = ref.parentNode;
- if(parent){
- if(parent.lastChild == ref){
- parent.appendChild(node);
- }else{
- parent.insertBefore(node, ref.nextSibling);
- }
- }
- };
- dojo.place = function(node, refNode, position){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- refNode = byId(refNode);
- if(typeof node == "string"){
- node = /^\s*</.test(node) ? d._toDom(node, refNode.ownerDocument) : byId(node);
- }
- if(typeof position == "number"){
- var cn = refNode.childNodes;
- if(!cn.length || cn.length <= position){
- refNode.appendChild(node);
- }else{
- _insertBefore(node, cn[position < 0 ? 0 : position]);
- }
- }else{
- switch(position){
- case "before":
- _insertBefore(node, refNode);
- break;
- case "after":
- _insertAfter(node, refNode);
- break;
- case "replace":
- refNode.parentNode.replaceChild(node, refNode);
- break;
- case "only":
- d.empty(refNode);
- refNode.appendChild(node);
- break;
- case "first":
- if(refNode.firstChild){
- _insertBefore(node, refNode.firstChild);
- break;
- }
-
- default:
- refNode.appendChild(node);
- }
- }
- return node;
- };
-
-
-
-
-
-
- dojo.boxModel = "content-box";
-
-
-
-
-
-
-
- if(d.isIE ){
-
- d.boxModel = document.compatMode == "BackCompat" ? "border-box" : "content-box";
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var gcs;
- if(d.isWebKit){
- gcs = function(/*DomNode*/node){
- var s;
- if(node.nodeType == 1){
- var dv = node.ownerDocument.defaultView;
- s = dv.getComputedStyle(node, null);
- if(!s && node.style){
- node.style.display = "";
- s = dv.getComputedStyle(node, null);
- }
- }
- return s || {};
- };
- }else if(d.isIE && (d.isIE < 9 || d.isQuirks)){
- gcs = function(node){
-
- return node.nodeType == 1 ? node.currentStyle : {};
- };
- }else{
- gcs = function(node){
- return node.nodeType == 1 ?
- node.ownerDocument.defaultView.getComputedStyle(node, null) : {};
- };
- }
- dojo.getComputedStyle = gcs;
- if(!d.isIE){
- d._toPixelValue = function(element, value){
-
-
- return parseFloat(value) || 0;
- };
- }else{
- d._toPixelValue = function(element, avalue){
- if(!avalue){ return 0; }
-
- if(avalue == "medium"){ return 4; }
-
-
- if(avalue.slice && avalue.slice(-2) == 'px'){ return parseFloat(avalue); }
- with(element){
- var sLeft = style.left;
- var rsLeft = runtimeStyle.left;
- runtimeStyle.left = currentStyle.left;
- try{
-
-
-
-
- style.left = avalue;
- avalue = style.pixelLeft;
- }catch(e){
- avalue = 0;
- }
- style.left = sLeft;
- runtimeStyle.left = rsLeft;
- }
- return avalue;
- };
- }
- var px = d._toPixelValue;
-
-
- var astr = "DXImageTransform.Microsoft.Alpha";
- var af = function(n, f){
- try{
- return n.filters.item(astr);
- }catch(e){
- return f ? {} : null;
- }
- };
- dojo._getOpacity =
- d.isIE < 9 || (d.isIE < 10 && d.isQuirks) ? function(node){
- try{
- return af(node).Opacity / 100;
- }catch(e){
- return 1;
- }
- } :
- function(node){
- return gcs(node).opacity;
- };
-
- dojo._setOpacity =
- d.isIE < 9 || (d.isIE < 10 && d.isQuirks) ? function(/*DomNode*/node, /*Number*/opacity){
- var ov = opacity * 100, opaque = opacity == 1;
- node.style.zoom = opaque ? "" : 1;
- if(!af(node)){
- if(opaque){
- return opacity;
- }
- node.style.filter += " progid:" + astr + "(Opacity=" + ov + ")";
- }else{
- af(node, 1).Opacity = ov;
- }
-
-
- af(node, 1).Enabled = !opaque;
- if(node.nodeName.toLowerCase() == "tr"){
- d.query("> td", node).forEach(function(i){
- d._setOpacity(i, opacity);
- });
- }
- return opacity;
- } :
- function(node, opacity){
- return node.style.opacity = opacity;
- };
- var _pixelNamesCache = {
- left: true, top: true
- };
- var _pixelRegExp = /margin|padding|width|height|max|min|offset/;
- var _toStyleValue = function(node, type, value){
- type = type.toLowerCase();
- if(d.isIE){
- if(value == "auto"){
- if(type == "height"){ return node.offsetHeight; }
- if(type == "width"){ return node.offsetWidth; }
- }
- if(type == "fontweight"){
- switch(value){
- case 700: return "bold";
- case 400:
- default: return "normal";
- }
- }
- }
- if(!(type in _pixelNamesCache)){
- _pixelNamesCache[type] = _pixelRegExp.test(type);
- }
- return _pixelNamesCache[type] ? px(node, value) : value;
- };
- var _floatStyle = d.isIE ? "styleFloat" : "cssFloat",
- _floatAliases = { "cssFloat": _floatStyle, "styleFloat": _floatStyle, "float": _floatStyle }
- ;
-
- dojo.style = function( /*DomNode|String*/ node,
- /*String?|Object?*/ style,
- /*String?*/ value){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var n = byId(node), args = arguments.length, op = (style == "opacity");
- style = _floatAliases[style] || style;
- if(args == 3){
- return op ? d._setOpacity(n, value) : n.style[style] = value;
- }
- if(args == 2 && op){
- return d._getOpacity(n);
- }
- var s = gcs(n);
- if(args == 2 && typeof style != "string"){
- for(var x in style){
- d.style(node, x, style[x]);
- }
- return s;
- }
- return (args == 1) ? s : _toStyleValue(n, style, s[style] || n.style[style]);
- };
-
-
-
- dojo._getPadExtents = function(/*DomNode*/n, /*Object*/computedStyle){
-
-
-
-
-
-
-
-
-
-
-
-
- var
- s = computedStyle||gcs(n),
- l = px(n, s.paddingLeft),
- t = px(n, s.paddingTop);
- return {
- l: l,
- t: t,
- w: l+px(n, s.paddingRight),
- h: t+px(n, s.paddingBottom)
- };
- };
- dojo._getBorderExtents = function(/*DomNode*/n, /*Object*/computedStyle){
-
-
-
-
-
-
-
-
-
-
-
- var
- ne = "none",
- s = computedStyle||gcs(n),
- bl = (s.borderLeftStyle != ne ? px(n, s.borderLeftWidth) : 0),
- bt = (s.borderTopStyle != ne ? px(n, s.borderTopWidth) : 0);
- return {
- l: bl,
- t: bt,
- w: bl + (s.borderRightStyle!=ne ? px(n, s.borderRightWidth) : 0),
- h: bt + (s.borderBottomStyle!=ne ? px(n, s.borderBottomWidth) : 0)
- };
- };
- dojo._getPadBorderExtents = function(/*DomNode*/n, /*Object*/computedStyle){
-
-
-
-
-
-
-
-
-
-
-
- var
- s = computedStyle||gcs(n),
- p = d._getPadExtents(n, s),
- b = d._getBorderExtents(n, s);
- return {
- l: p.l + b.l,
- t: p.t + b.t,
- w: p.w + b.w,
- h: p.h + b.h
- };
- };
- dojo._getMarginExtents = function(n, computedStyle){
-
-
-
-
-
-
-
-
-
-
-
- var
- s = computedStyle||gcs(n),
- l = px(n, s.marginLeft),
- t = px(n, s.marginTop),
- r = px(n, s.marginRight),
- b = px(n, s.marginBottom);
- if(d.isWebKit && (s.position != "absolute")){
-
-
-
-
-
-
- r = l;
- }
- return {
- l: l,
- t: t,
- w: l+r,
- h: t+b
- };
- };
-
-
-
-
-
-
-
-
-
-
-
-
-
- dojo._getMarginBox = function(/*DomNode*/node, /*Object*/computedStyle){
-
-
-
- var s = computedStyle || gcs(node), me = d._getMarginExtents(node, s);
- var l = node.offsetLeft - me.l, t = node.offsetTop - me.t, p = node.parentNode;
- if(d.isMoz){
-
-
-
-
-
- var sl = parseFloat(s.left), st = parseFloat(s.top);
- if(!isNaN(sl) && !isNaN(st)){
- l = sl, t = st;
- }else{
-
-
- if(p && p.style){
- var pcs = gcs(p);
- if(pcs.overflow != "visible"){
- var be = d._getBorderExtents(p, pcs);
- l += be.l, t += be.t;
- }
- }
- }
- }else if(d.isOpera || (d.isIE == 8 && !d.isQuirks)){
-
- if(p){
- be = d._getBorderExtents(p);
- l -= be.l;
- t -= be.t;
- }
- }
- return {
- l: l,
- t: t,
- w: node.offsetWidth + me.w,
- h: node.offsetHeight + me.h
- };
- }
-
- dojo._getMarginSize = function(/*DomNode*/node, /*Object*/computedStyle){
-
-
-
- node = byId(node);
- var me = d._getMarginExtents(node, computedStyle || gcs(node));
- var size = node.getBoundingClientRect();
- return {
- w: (size.right - size.left) + me.w,
- h: (size.bottom - size.top) + me.h
- }
- }
- dojo._getContentBox = function(node, computedStyle){
-
-
-
-
-
-
- var s = computedStyle || gcs(node),
- pe = d._getPadExtents(node, s),
- be = d._getBorderExtents(node, s),
- w = node.clientWidth,
- h
- ;
- if(!w){
- w = node.offsetWidth, h = node.offsetHeight;
- }else{
- h = node.clientHeight, be.w = be.h = 0;
- }
-
- if(d.isOpera){ pe.l += be.l; pe.t += be.t; }
- return {
- l: pe.l,
- t: pe.t,
- w: w - pe.w - be.w,
- h: h - pe.h - be.h
- };
- };
- dojo._getBorderBox = function(node, computedStyle){
- var s = computedStyle || gcs(node),
- pe = d._getPadExtents(node, s),
- cb = d._getContentBox(node, s)
- ;
- return {
- l: cb.l - pe.l,
- t: cb.t - pe.t,
- w: cb.w + pe.w,
- h: cb.h + pe.h
- };
- };
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- dojo._setBox = function(/*DomNode*/node, /*Number?*/l, /*Number?*/t, /*Number?*/w, /*Number?*/h, /*String?*/u){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- u = u || "px";
- var s = node.style;
- if(!isNaN(l)){ s.left = l + u; }
- if(!isNaN(t)){ s.top = t + u; }
- if(w >= 0){ s.width = w + u; }
- if(h >= 0){ s.height = h + u; }
- };
- dojo._isButtonTag = function(/*DomNode*/node) {
-
-
- return node.tagName == "BUTTON"
- || node.tagName=="INPUT" && (node.getAttribute("type")||'').toUpperCase() == "BUTTON";
- };
- dojo._usesBorderBox = function(/*DomNode*/node){
-
-
-
-
-
-
-
- var n = node.tagName;
- return d.boxModel=="border-box" || n=="TABLE" || d._isButtonTag(node);
- };
- dojo._setContentSize = function(/*DomNode*/node, /*Number*/widthPx, /*Number*/heightPx, /*Object*/computedStyle){
-
-
-
- if(d._usesBorderBox(node)){
- var pb = d._getPadBorderExtents(node, computedStyle);
- if(widthPx >= 0){ widthPx += pb.w; }
- if(heightPx >= 0){ heightPx += pb.h; }
- }
- d._setBox(node, NaN, NaN, widthPx, heightPx);
- };
- dojo._setMarginBox = function(/*DomNode*/node, /*Number?*/leftPx, /*Number?*/topPx,
- /*Number?*/widthPx, /*Number?*/heightPx,
- /*Object*/computedStyle){
-
-
-
-
-
- var s = computedStyle || gcs(node),
-
-
-
- bb = d._usesBorderBox(node),
- pb = bb ? _nilExtents : d._getPadBorderExtents(node, s)
- ;
- if(d.isWebKit){
-
-
-
- if(d._isButtonTag(node)){
- var ns = node.style;
- if(widthPx >= 0 && !ns.width) { ns.width = "4px"; }
- if(heightPx >= 0 && !ns.height) { ns.height = "4px"; }
- }
- }
- var mb = d._getMarginExtents(node, s);
- if(widthPx >= 0){ widthPx = Math.max(widthPx - pb.w - mb.w, 0); }
- if(heightPx >= 0){ heightPx = Math.max(heightPx - pb.h - mb.h, 0); }
- d._setBox(node, leftPx, topPx, widthPx, heightPx);
- };
- var _nilExtents = { l:0, t:0, w:0, h:0 };
-
- dojo.marginBox = function(/*DomNode|String*/node, /*Object?*/box){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var n = byId(node), s = gcs(n), b = box;
- return !b ? d._getMarginBox(n, s) : d._setMarginBox(n, b.l, b.t, b.w, b.h, s);
- };
- dojo.contentBox = function(/*DomNode|String*/node, /*Object?*/box){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var n = byId(node), s = gcs(n), b = box;
- return !b ? d._getContentBox(n, s) : d._setContentSize(n, b.w, b.h, s);
- };
-
-
-
- var _sumAncestorProperties = function(node, prop){
- if(!(node = (node||0).parentNode)){return 0;}
- var val, retVal = 0, _b = d.body();
- while(node && node.style){
- if(gcs(node).position == "fixed"){
- return 0;
- }
- val = node[prop];
- if(val){
- retVal += val - 0;
-
-
- if(node == _b){ break; }
- }
- node = node.parentNode;
- }
- return retVal;
- };
- dojo._docScroll = function(){
- var n = d.global;
- return "pageXOffset" in n
- ? { x:n.pageXOffset, y:n.pageYOffset }
- : (n = d.isQuirks? d.doc.body : d.doc.documentElement, { x:d._fixIeBiDiScrollLeft(n.scrollLeft || 0), y:n.scrollTop || 0 });
- };
- dojo._isBodyLtr = function(){
- return "_bodyLtr" in d? d._bodyLtr :
- d._bodyLtr = ((d.body() && d.body().dir) || d.doc.documentElement.dir || "ltr").toLowerCase() == "ltr";
- };
- dojo._getIeDocumentElementOffset = function(){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var de = d.doc.documentElement;
- if(d.isIE < 8){
- var r = de.getBoundingClientRect();
-
- var l = r.left,
- t = r.top;
- if(d.isIE < 7){
- l += de.clientLeft;
- t += de.clientTop;
- }
- return {
- x: l < 0? 0 : l,
- y: t < 0? 0 : t
- };
- }else{
- return {
- x: 0,
- y: 0
- };
- }
- };
-
- dojo._fixIeBiDiScrollLeft = function(/*Integer*/ scrollLeft){
-
-
-
-
- var ie = d.isIE;
- if(ie && !d._isBodyLtr()){
- var qk = d.isQuirks,
- de = qk ? d.doc.body : d.doc.documentElement;
- if(ie == 6 && !qk && d.global.frameElement && de.scrollHeight > de.clientHeight){
- scrollLeft += de.clientLeft;
- }
- return (ie < 8 || qk) ? (scrollLeft + de.clientWidth - de.scrollWidth) : -scrollLeft;
- }
- return scrollLeft;
- };
-
- dojo._abs = dojo.position = function(/*DomNode*/node, /*Boolean?*/includeScroll){
-
-
-
-
-
-
-
-
-
-
-
-
-
- node = byId(node);
- var db = d.body(),
- dh = db.parentNode,
- ret = node.getBoundingClientRect();
- ret = { x: ret.left, y: ret.top, w: ret.right - ret.left, h: ret.bottom - ret.top };
- if(d.isIE < 9){
-
- var offset = d._getIeDocumentElementOffset();
-
- ret.x -= offset.x + (d.isQuirks ? db.clientLeft+db.offsetLeft : 0);
- ret.y -= offset.y + (d.isQuirks ? db.clientTop+db.offsetTop : 0);
- }else if(d.isFF == 3){
-
-
- var cs = gcs(dh);
- ret.x -= px(dh, cs.marginLeft) + px(dh, cs.borderLeftWidth);
- ret.y -= px(dh, cs.marginTop) + px(dh, cs.borderTopWidth);
- }
-
- if(includeScroll){
- var scroll = d._docScroll();
- ret.x += scroll.x;
- ret.y += scroll.y;
- }
- return ret;
- };
- dojo.coords = function(/*DomNode|String*/node, /*Boolean?*/includeScroll){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var n = byId(node), s = gcs(n), mb = d._getMarginBox(n, s);
- var abs = d.position(n, includeScroll);
- mb.x = abs.x;
- mb.y = abs.y;
- return mb;
- };
-
-
-
-
- var _propNames = {
-
- "class": "className",
- "for": "htmlFor",
-
- tabindex: "tabIndex",
- readonly: "readOnly",
- colspan: "colSpan",
- frameborder: "frameBorder",
- rowspan: "rowSpan",
- valuetype: "valueType"
- },
- _attrNames = {
-
- classname: "class",
- htmlfor: "for",
-
- tabindex: "tabIndex",
- readonly: "readOnly"
- },
- _forcePropNames = {
- innerHTML: 1,
- className: 1,
- htmlFor: d.isIE,
- value: 1
- };
- var _fixAttrName = function(/*String*/ name){
- return _attrNames[name.toLowerCase()] || name;
- };
- var _hasAttr = function(node, name){
- var attr = node.getAttributeNode && node.getAttributeNode(name);
- return attr && attr.specified;
- };
-
-
-
-
- dojo.hasAttr = function(/*DomNode|String*/node, /*String*/name){
-
-
-
-
-
-
-
-
-
-
- var lc = name.toLowerCase();
- return _forcePropNames[_propNames[lc] || name] || _hasAttr(byId(node), _attrNames[lc] || name);
- };
- var _evtHdlrMap = {}, _ctr = 0,
- _attrId = dojo._scopeName + "attrid",
-
- _roInnerHtml = {col: 1, colgroup: 1,
-
- table: 1, tbody: 1, tfoot: 1, thead: 1, tr: 1, title: 1};
- dojo.attr = function(/*DomNode|String*/node, /*String|Object*/name, /*String?*/value){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- node = byId(node);
- var args = arguments.length, prop;
- if(args == 2 && typeof name != "string"){
-
- for(var x in name){
- d.attr(node, x, name[x]);
- }
- return node;
- }
- var lc = name.toLowerCase(),
- propName = _propNames[lc] || name,
- forceProp = _forcePropNames[propName],
- attrName = _attrNames[lc] || name;
- if(args == 3){
-
- do{
- if(propName == "style" && typeof value != "string"){
-
- d.style(node, value);
- break;
- }
- if(propName == "innerHTML"){
-
- if(d.isIE && node.tagName.toLowerCase() in _roInnerHtml){
- d.empty(node);
- node.appendChild(d._toDom(value, node.ownerDocument));
- }else{
- node[propName] = value;
- }
- break;
- }
- if(d.isFunction(value)){
-
-
- var attrId = d.attr(node, _attrId);
- if(!attrId){
- attrId = _ctr++;
- d.attr(node, _attrId, attrId);
- }
- if(!_evtHdlrMap[attrId]){
- _evtHdlrMap[attrId] = {};
- }
- var h = _evtHdlrMap[attrId][propName];
- if(h){
- d.disconnect(h);
- }else{
- try{
- delete node[propName];
- }catch(e){}
- }
-
- _evtHdlrMap[attrId][propName] = d.connect(node, propName, value);
- break;
- }
- if(forceProp || typeof value == "boolean"){
-
-
- node[propName] = value;
- break;
- }
-
- node.setAttribute(attrName, value);
- }while(false);
- return node;
- }
-
-
-
- value = node[propName];
- if(forceProp && typeof value != "undefined"){
-
- return value;
- }
- if(propName != "href" && (typeof value == "boolean" || d.isFunction(value))){
-
- return value;
- }
-
-
- return _hasAttr(node, attrName) ? node.getAttribute(attrName) : null;
- };
- dojo.removeAttr = function(/*DomNode|String*/ node, /*String*/ name){
-
-
-
-
-
-
- byId(node).removeAttribute(_fixAttrName(name));
- };
- dojo.getNodeProp = function(/*DomNode|String*/ node, /*String*/ name){
-
-
-
-
-
-
- node = byId(node);
- var lc = name.toLowerCase(),
- propName = _propNames[lc] || name;
- if((propName in node) && propName != "href"){
-
- return node[propName];
- }
-
- var attrName = _attrNames[lc] || name;
- return _hasAttr(node, attrName) ? node.getAttribute(attrName) : null;
- };
- dojo.create = function(tag, attrs, refNode, pos){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var doc = d.doc;
- if(refNode){
- refNode = byId(refNode);
- doc = refNode.ownerDocument;
- }
- if(typeof tag == "string"){
- tag = doc.createElement(tag);
- }
- if(attrs){ d.attr(tag, attrs); }
- if(refNode){ d.place(tag, refNode, pos); }
- return tag;
- };
-
- function _empty(/*DomNode*/ node){
- if(node.canHaveChildren){
- try{
-
- node.innerHTML = "";
- return;
- }catch(e){
-
-
- }
- }
-
- for(var c; c = node.lastChild;){
- _destroy(c, node);
- }
- }
- d.empty = function(node){
- _empty(byId(node));
- };
-
-
- var tagWrap = {
- option: ["select"],
- tbody: ["table"],
- thead: ["table"],
- tfoot: ["table"],
- tr: ["table", "tbody"],
- td: ["table", "tbody", "tr"],
- th: ["table", "thead", "tr"],
- legend: ["fieldset"],
- caption: ["table"],
- colgroup: ["table"],
- col: ["table", "colgroup"],
- li: ["ul"]
- },
- reTag = /<\s*([\w\:]+)/,
- masterNode = {}, masterNum = 0,
- masterName = "__" + d._scopeName + "ToDomId";
-
-
- for(var param in tagWrap){
- if(tagWrap.hasOwnProperty(param)){
- var tw = tagWrap[param];
- tw.pre = param == "option" ? '<select multiple="multiple">' : "<" + tw.join("><") + ">";
- tw.post = "</" + tw.reverse().join("></") + ">";
-
-
- }
- }
- d._toDom = function(frag, doc){
-
-
- doc = doc || d.doc;
- var masterId = doc[masterName];
- if(!masterId){
- doc[masterName] = masterId = ++masterNum + "";
- masterNode[masterId] = doc.createElement("div");
- }
-
- frag += "";
-
- var match = frag.match(reTag),
- tag = match ? match[1].toLowerCase() : "",
- master = masterNode[masterId],
- wrap, i, fc, df;
- if(match && tagWrap[tag]){
- wrap = tagWrap[tag];
- master.innerHTML = wrap.pre + frag + wrap.post;
- for(i = wrap.length; i; --i){
- master = master.firstChild;
- }
- }else{
- master.innerHTML = frag;
- }
-
- if(master.childNodes.length == 1){
- return master.removeChild(master.firstChild);
- }
-
- df = doc.createDocumentFragment();
- while((fc = master.firstChild)){
- df.appendChild(fc);
- }
- return df;
- };
-
-
-
- var _className = "className";
- dojo.hasClass = function(/*DomNode|String*/node, /*String*/classStr){
-
-
-
-
-
-
-
-
-
-
-
-
-
- return ((" "+ byId(node)[_className] +" ").indexOf(" " + classStr + " ") >= 0);
- };
- var spaces = /\s+/, a1 = [""],
- fakeNode = {},
- str2array = function(s){
- if(typeof s == "string" || s instanceof String){
- if(s.indexOf(" ") < 0){
- a1[0] = s;
- return a1;
- }else{
- return s.split(spaces);
- }
- }
-
- return s || "";
- };
- dojo.addClass = function(/*DomNode|String*/node, /*String|Array*/classStr){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- node = byId(node);
- classStr = str2array(classStr);
- var cls = node[_className], oldLen;
- cls = cls ? " " + cls + " " : " ";
- oldLen = cls.length;
- for(var i = 0, len = classStr.length, c; i < len; ++i){
- c = classStr[i];
- if(c && cls.indexOf(" " + c + " ") < 0){
- cls += c + " ";
- }
- }
- if(oldLen < cls.length){
- node[_className] = cls.substr(1, cls.length - 2);
- }
- };
- dojo.removeClass = function(/*DomNode|String*/node, /*String|Array?*/classStr){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- node = byId(node);
- var cls;
- if(classStr !== undefined){
- classStr = str2array(classStr);
- cls = " " + node[_className] + " ";
- for(var i = 0, len = classStr.length; i < len; ++i){
- cls = cls.replace(" " + classStr[i] + " ", " ");
- }
- cls = d.trim(cls);
- }else{
- cls = "";
- }
- if(node[_className] != cls){ node[_className] = cls; }
- };
- dojo.replaceClass = function(/*DomNode|String*/node, /*String|Array*/addClassStr, /*String|Array?*/removeClassStr){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- node = byId(node);
- fakeNode.className = node.className;
- dojo.removeClass(fakeNode, removeClassStr);
- dojo.addClass(fakeNode, addClassStr);
- if(node.className !== fakeNode.className){
- node.className = fakeNode.className;
- }
- };
- dojo.toggleClass = function(/*DomNode|String*/node, /*String|Array*/classStr, /*Boolean?*/condition){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(condition === undefined){
- condition = !d.hasClass(node, classStr);
- }
- d[condition ? "addClass" : "removeClass"](node, classStr);
- };
- })();
- }
|