4 ) { coords.pop(); }\n\t\tvar ret = {\n\t\t\tleft: coords[0],\n\t\t\ttop: coords[1],\n\t\t\twidth: coords[2],\n\t\t\theight: coords[3]\n\t\t};\n\t}else if(!coords.nodeType && !(coords instanceof String || typeof coords == \"string\") &&\n\t\t\t ('width' in coords || 'height' in coords || 'left' in coords ||\n\t\t\t 'x' in coords || 'top' in coords || 'y' in coords)){\n\t\t\/\/ coords is a coordinate object or at least part of one\n\t\tvar ret = {\n\t\t\tleft: coords.left||coords.x||0,\n\t\t\ttop: coords.top||coords.y||0,\n\t\t\twidth: coords.width||0,\n\t\t\theight: coords.height||0\n\t\t};\n\t}else{\n\t\t\/\/ coords is an dom object (or dom object id); return it's coordinates\n\t\tvar node = dojo.byId(coords);\n\t\tvar pos = dojo.html.abs(node, includeScroll, boxtype);\n\t\tvar marginbox = dojo.html.getMarginBox(node);\n\t\tvar ret = {\n\t\t\tleft: pos.left,\n\t\t\ttop: pos.top,\n\t\t\twidth: marginbox.width,\n\t\t\theight: marginbox.height\n\t\t};\n\t}\n\tret.x = ret.left;\n\tret.y = ret.top;\n\treturn ret;\t\/\/\tobject","returns":"object"}},"dojo.html.setMarginBoxWidth":{"meta":{"is":"dojo.html.setOuterWidth"}},"dojo.html.setOuterWidth":{"meta":{"summary":"","parameters":{"node":{"type":""},"width":{"type":""}},"src":" return dojo.html._callDeprecated(\"setMarginBoxWidth\", \"setMarginBox\", arguments, \"width\");"}},"dojo.html.setMarginBoxHeight":{"meta":{"is":"dojo.html.setOuterHeight"}},"dojo.html.setOuterHeight":{"meta":{"summary":"","src":" return dojo.html._callDeprecated(\"setMarginBoxHeight\", \"setMarginBox\", arguments, \"height\");"}},"dojo.html.getMarginBoxWidth":{"meta":{"is":"dojo.html.getOuterWidth"}},"dojo.html.getOuterWidth":{"meta":{"summary":"","src":" return dojo.html._callDeprecated(\"getMarginBoxWidth\", \"getMarginBox\", arguments, null, \"width\");"}},"dojo.html.getMarginBoxHeight":{"meta":{"is":"dojo.html.getOuterHeight"}},"dojo.html.getOuterHeight":{"meta":{"summary":"","src":" return dojo.html._callDeprecated(\"getMarginBoxHeight\", \"getMarginBox\", arguments, null, \"height\");"}},"dojo.html.getTotalOffset":{"meta":{"summary":"","parameters":{"node":{"type":""},"type":{"type":""},"includeScroll":{"type":""}},"src":" return dojo.html._callDeprecated(\"getTotalOffset\", \"getAbsolutePosition\", arguments, null, type);"}},"dojo.html.getAbsoluteX":{"meta":{"summary":"","parameters":{"node":{"type":""},"includeScroll":{"type":""}},"src":" return dojo.html._callDeprecated(\"getAbsoluteX\", \"getAbsolutePosition\", arguments, null, \"x\");"}},"dojo.html.getAbsoluteY":{"meta":{"summary":"","parameters":{"node":{"type":""},"includeScroll":{"type":""}},"src":" return dojo.html._callDeprecated(\"getAbsoluteY\", \"getAbsolutePosition\", arguments, null, \"y\");"}},"dojo.html.totalOffsetLeft":{"meta":{"summary":"","parameters":{"node":{"type":""},"includeScroll":{"type":""}},"src":" return dojo.html._callDeprecated(\"totalOffsetLeft\", \"getAbsolutePosition\", arguments, null, \"left\");"}},"dojo.html.totalOffsetTop":{"meta":{"summary":"","parameters":{"node":{"type":""},"includeScroll":{"type":""}},"src":" return dojo.html._callDeprecated(\"totalOffsetTop\", \"getAbsolutePosition\", arguments, null, \"top\");"}},"dojo.html.getMarginWidth":{"meta":{"summary":"","parameters":{"node":{"type":""}},"src":" return dojo.html._callDeprecated(\"getMarginWidth\", \"getMargin\", arguments, null, \"width\");"}},"dojo.html.getMarginHeight":{"meta":{"summary":"","parameters":{"node":{"type":""}},"src":" return dojo.html._callDeprecated(\"getMarginHeight\", \"getMargin\", arguments, null, \"height\");"}},"dojo.html.getBorderWidth":{"meta":{"summary":"","parameters":{"node":{"type":""}},"src":" return dojo.html._callDeprecated(\"getBorderWidth\", \"getBorder\", arguments, null, \"width\");"}},"dojo.html.getBorderHeight":{"meta":{"summary":"","parameters":{"node":{"type":""}},"src":" return dojo.html._callDeprecated(\"getBorderHeight\", \"getBorder\", arguments, null, \"height\");"}},"dojo.html.getPaddingWidth":{"meta":{"summary":"","parameters":{"node":{"type":""}},"src":" return dojo.html._callDeprecated(\"getPaddingWidth\", \"getPadding\", arguments, null, \"width\");"}},"dojo.html.getPaddingHeight":{"meta":{"summary":"","parameters":{"node":{"type":""}},"src":" return dojo.html._callDeprecated(\"getPaddingHeight\", \"getPadding\", arguments, null, \"height\");"}},"dojo.html.getPadBorderWidth":{"meta":{"summary":"","parameters":{"node":{"type":""}},"src":" return dojo.html._callDeprecated(\"getPadBorderWidth\", \"getPadBorder\", arguments, null, \"width\");"}},"dojo.html.getPadBorderHeight":{"meta":{"summary":"","parameters":{"node":{"type":""}},"src":" return dojo.html._callDeprecated(\"getPadBorderHeight\", \"getPadBorder\", arguments, null, \"height\");"}},"dojo.html.getBorderBoxWidth":{"meta":{"is":"dojo.html.getInnerWidth"}},"dojo.html.getInnerWidth":{"meta":{"summary":"","src":" return dojo.html._callDeprecated(\"getBorderBoxWidth\", \"getBorderBox\", arguments, null, \"width\");"}},"dojo.html.getBorderBoxHeight":{"meta":{"is":"dojo.html.getInnerHeight"}},"dojo.html.getInnerHeight":{"meta":{"summary":"","src":" return dojo.html._callDeprecated(\"getBorderBoxHeight\", \"getBorderBox\", arguments, null, \"height\");"}},"dojo.html.getContentBoxWidth":{"meta":{"is":"dojo.html.getContentWidth"}},"dojo.html.getContentWidth":{"meta":{"summary":"","src":" return dojo.html._callDeprecated(\"getContentBoxWidth\", \"getContentBox\", arguments, null, \"width\");"}},"dojo.html.getContentBoxHeight":{"meta":{"is":"dojo.html.getContentHeight"}},"dojo.html.getContentHeight":{"meta":{"summary":"","src":" return dojo.html._callDeprecated(\"getContentBoxHeight\", \"getContentBox\", arguments, null, \"height\");"}},"dojo.html.setContentBoxWidth":{"meta":{"is":"dojo.html.setContentWidth"}},"dojo.html.setContentWidth":{"meta":{"summary":"","parameters":{"node":{"type":""},"width":{"type":""}},"src":" return dojo.html._callDeprecated(\"setContentBoxWidth\", \"setContentBox\", arguments, \"width\");"}},"dojo.html.setContentBoxHeight":{"meta":{"is":"dojo.html.setContentHeight"}},"dojo.html.setContentHeight":{"meta":{"summary":"","parameters":{"node":{"type":""},"height":{"type":""}},"src":" return dojo.html._callDeprecated(\"setContentBoxHeight\", \"setContentBox\", arguments, \"height\");"}}},"objects":{"dojo.html.boxSizing":{"meta":{"variables":["MARGIN_BOX","BORDER_BOX","PADDING_BOX","CONTENT_BOX"]}}}}},"dojo.html.metrics":{"meta":{"requires":{"common":["dojo.html.layout"]},"functions":{"dojo.html.getScrollbar":{"meta":{"summary":"","src":" var scroll = document.createElement(\"div\");\r\n\tscroll.style.width=\"100px\";\r\n\tscroll.style.height=\"100px\";\r\n\tscroll.style.overflow=\"scroll\";\r\n\tscroll.style.position=\"absolute\";\r\n\tscroll.style.top=\"-300px\";\r\n\tscroll.style.left=\"0px\"\r\n\tvar test = document.createElement(\"div\");\r\n\ttest.style.width=\"400px\";\r\n\ttest.style.height=\"400px\";\r\n\tscroll.appendChild(test);\r\n\tdojo.body().appendChild(scroll);\r\n\tvar width=scroll.offsetWidth - scroll.clientWidth;\r\n\tdojo.body().removeChild(scroll);\r\n\tscroll.removeChild(test);\r\n\tscroll=test=null;\r\n\t\/\/\twe return an object because we may add additional info in the future.\r\n\treturn { width: width };\t\/\/\tobject\r","returns":"object"},"extra":{"returns":"the width of a scrollbar. set up the test nodes."}},"dojo.html.getFontMeasurements":{"meta":{"summary":"Returns an object that has pixel equivilents of standard font size values.","src":" var heights = {\r\n\t\t'1em':0, '1ex':0, '100%':0, '12pt':0, '16px':0, 'xx-small':0, 'x-small':0,\r\n\t\t'small':0, 'medium':0, 'large':0, 'x-large':0, 'xx-large':0\r\n\t};\r\n\tif(dojo.render.html.ie){\r\n\t\t\/\/\twe do a font-size fix if and only if one isn't applied already.\r\n\t\t\/\/\tNOTE: If someone set the fontSize on the HTML Element, this will kill it.\r\n\t\tdocument.documentElement.style.fontSize=\"100%\";\r\n\t}\r\n\t\/\/\tset up the measuring node.\r\n\tvar div=document.createElement(\"div\");\r\n\tdiv.style.position=\"absolute\";\r\n\tdiv.style.left=\"-100px\";\r\n\tdiv.style.top=\"0\";\r\n\tdiv.style.width=\"30px\";\r\n\tdiv.style.height=\"1000em\";\r\n\tdiv.style.border=\"0\";\r\n\tdiv.style.margin=\"0\";\r\n\tdiv.style.padding=\"0\";\r\n\tdiv.style.outline=\"0\";\r\n\tdiv.style.lineHeight=\"1\";\r\n\tdiv.style.overflow=\"hidden\";\r\n\tdojo.body().appendChild(div);\r\n\t\/\/\tdo the measurements.\r\n\tfor(var p in heights){\r\n\t\tdiv.style.fontSize = p;\r\n\t\theights[p] = Math.round(div.offsetHeight * 12\/16) * 16\/12 \/ 1000;\r\n\t}\r\n\tdojo.body().removeChild(div);\r\n\tdiv = null;\r\n\treturn heights; \t\/\/\tobject\r","returns":"object"}},"dojo.html.getCachedFontMeasurements":{"meta":{"summary":"","parameters":{"recalculate":{"type":""}},"src":" if(recalculate || !dojo.html._fontMeasurements){\r\n\t\tdojo.html._fontMeasurements = dojo.html.getFontMeasurements();\r\n\t}\r\n\treturn dojo.html._fontMeasurements;\r"}},"dojo.html.measureFragment":{"meta":{"summary":"get the dimensions of passed node if it were populated with passed html.","parameters":{"node":{"type":"HTMLElement"},"html":{"type":"string"},"boxType":{"type":"string?"}},"src":" var clone = node.cloneNode(true);\r\n\tclone.innerHTML = html;\r\n\tnode.parentNode.appendChild(clone);\r\n\tvar ret = dojo.html.getElementBox(clone, boxType);\r\n\tnode.parentNode.removeChild(clone);\r\n\tclone=null;\r\n\treturn ret; \/\/ object\r","returns":"object"}},"dojo.html.getFittedFragment":{"meta":{"summary":"Given html, return the fragment that will fit on one line of passed node.","parameters":{"node":{"type":"HTMLElement"},"html":{"type":"string"}},"src":" function cl(node){\r\n\t\tvar element = document.createElement(node.tagName);\r\n\t\telement.id = node.id + \"-clone\";\r\n\t\telement.className = node.className;\r\n\t\tfor (var j = 0; j < node.attributes.length; j++) {\r\n\t\t\tif (node.attributes[j].specified) {\r\n\t\t\t\tif (node.attributes[j].nodeName.toLowerCase() != \"style\" \r\n\t\t\t\t\t&& node.attributes[j].nodeName.toLowerCase() != \"edited\" \r\n\t\t\t\t\t&& node.attributes[j].nodeName.toLowerCase() != \"contenteditable\"\r\n\t\t\t\t\t&& node.attributes[j].nodeName.toLowerCase() != \"id\"\r\n\t\t\t\t\t&& node.attributes[j].nodeName.toLowerCase() != \"class\"\r\n\t\t\t\t){\r\n\t\t\t\t\telement.setAttribute(node.attributes[j].nodeName.toLowerCase(), node.attributes[j].nodeValue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn element;\r\n\t}\r\n\tvar height = dojo.html.getFontMeasurements()[\"16px\"];\r\n\tvar n=cl(node);\r\n\tn.style.width=dojo.html.getBorderBox(node).width+\"px\";\r\n\tn.style.height=(height+4)+\"px\";\r\n\tnode.parentNode.appendChild(n);\r\n\tvar rem = dojo.html.fitToElement(n, html);\r\n\tvar ret = n.innerHTML;\r\n\tn.parentNode.removeChild(n);\r\n\treturn ret;\r"}},"dojo.html.fitToElement":{"meta":{"summary":"will fit as much html as possible into node, and return the unused portion, with tag corrections.","parameters":{"node":{"type":"HTMLElement"},"html":{"type":"string"}},"src":" function cl(node){\r\n\t\tvar element = document.createElement(node.tagName);\r\n\t\telement.id = node.id + \"-clone\";\r\n\t\telement.className = node.className;\r\n\t\tfor (var j = 0; j < node.attributes.length; j++) {\r\n\t\t\tif (node.attributes[j].specified) {\r\n\t\t\t\tif (node.attributes[j].nodeName.toLowerCase() != \"style\" \r\n\t\t\t\t\t&& node.attributes[j].nodeName.toLowerCase() != \"edited\" \r\n\t\t\t\t\t&& node.attributes[j].nodeName.toLowerCase() != \"contenteditable\"\r\n\t\t\t\t\t&& node.attributes[j].nodeName.toLowerCase() != \"id\"\r\n\t\t\t\t\t&& node.attributes[j].nodeName.toLowerCase() != \"class\"\r\n\t\t\t\t){\r\n\t\t\t\t\telement.setAttribute(node.attributes[j].nodeName.toLowerCase(), node.attributes[j].nodeValue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn element;\r\n\t}\r\n\tvar clone = cl(node);\r\n\tnode.parentNode.appendChild(clone);\r\n\tvar t=dojo.html.getBorderBox(node);\r\n\tclone.style.width = t.width+\"px\";\r\n\tvar singletons = [\"br\",\"img\", \"hr\", \"input\", \"!--\"];\r\n\tvar chop = [\"
\",\"
\",\"
\",\"
\",\"<\/p>\",\"
<\/P>\"];\r\n\tvar openTags = [];\r\n\tvar str = html;\r\n\tvar i = 0;\r\n\tvar limit = str.length;\r\n\tvar add = 0;\r\n\tvar doLoop = true;\r\n\tclone.innerHTML = str;\r\n\twhile (doLoop) {\r\n\t\tadd = Math.round((limit - i) \/ 2);\r\n\t\tif (add <= 1) doLoop = false;\r\n\t\ti += add;\r\n\t\tclone.innerHTML = str.substr(0, i);\r\n\t\tif (clone.offsetHeight > t.height) {\r\n\t\t\tlimit = i;\r\n\t\t\ti -= add;\r\n\t\t}\r\n\t}\r\n\tif (str.substr(0, i) != str) {\r\n\t\tvar lastSpace = str.substr(0, i).lastIndexOf(\" \");\r\n\t\tvar lastNewLine = str.substr(0, i).lastIndexOf(\"\\n\");\r\n\t\tvar lastGreater = str.substr(0, i).lastIndexOf(\">\");\r\n\t\tvar lastLess = str.substr(0, i).lastIndexOf(\"<\");\r\n\t\tif (lastLess <= lastGreater && lastNewLine == i - 1) i = i;\r\n\t\telse if (lastSpace != -1 && lastSpace > lastGreater && lastGreater > lastLess) i = lastSpace + 1;\r\n\t\telse if (lastLess > lastGreater) i = lastLess;\r\n\t\telse if (lastGreater != -1) i = lastGreater + 1;\r\n\t}\r\n\tstr = str.substr(0, i);\r\n\tvar ret = html.substr(str.length);\t\/\/\tget the rest of the passed text.\r\n\tvar doPush = true;\r\n\tvar tags = str.split(\"<\");\r\n\ttags.shift();\r\n\tfor (var j = 0; j < tags.length; j++) {\r\n\t\ttags[j] = tags[j].split(\">\")[0];\r\n\t\tif (tags[j].charAt(tags[j].length - 1) == \"\/\"){ continue; }\r\n\t\tif (tags[j].charAt(0) != \"\/\") {\r\n\t\t\tfor (var k = 0; k < singletons.length; k++) {\r\n\t\t\t\tif (tags[j].split(\" \")[0].toLowerCase() == singletons[k]){\r\n\t\t\t\t\tdoPush = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (doPush){\r\n\t\t\t\topenTags.push(tags[j]);\r\n\t\t\t}\r\n\t\t\tdoPush = true;\r\n\t\t} else {\r\n\t\t\topenTags.pop();\r\n\t\t}\r\n\t}\r\n\t\/\/\tclose any open tags and prepend them to ret as well.\r\n\tfor(var j=0; j=0; j--){\r\n\t\tif(str.lastIndexOf(openTags[j]) == (str.length-openTags[j].length-1)){\r\n\t\t\tstr = str.substring(0, str.lastIndexOf(openTags[j]));\r\n\t\t} else {\r\n\t\t\tstr += \"<\/\"+openTags[j]+\">\";\r\n\t\t}\r\n\t\tif(ret.length > 0){\r\n\t\t\tret = \"<\"+openTags[j]+\">\"+ret;\r\n\t\t}\r\n\t}\r\n\tfor(var j=0; j0){\n\t\t\t\treturn node;\n\t\t\t}\n\t\t\tnode = node.parentNode;\n\t\t}\n\t\treturn null;"}},"dojo.html.selection.isTag":{"meta":{"summary":"","parameters":{"node":{"type":"DomNode"},"tags":{"type":"Array"}},"src":" \tif(node && node.tagName) {\n\t\t\tfor (var i=0; i *downloaded cssText*<\/style>","parameters":{"URI":{"type":"string"},"doc":{"type":"HTMLDocument?"},"checkDuplicates":{"type":"boolean?"},"fail_ok":{"type":"boolean"}},"src":" if(!URI){ return; }\n\tif(!doc){ doc = document; }\n\tvar cssStr = dojo.hostenv.getText(URI, false, fail_ok);\n\tif(cssStr===null){ return; }\n\tcssStr = dojo.html.fixPathsInCssText(cssStr, URI);\n\tif(checkDuplicates){\n\t\tvar idx = -1, node, ent = dojo.html._insertedCssFiles;\n\t\tfor(var i = 0; i < ent.length; i++){\n\t\t\tif((ent[i].doc == doc) && (ent[i].cssText == cssStr)){\n\t\t\t\tidx = i; node = ent[i].nodeRef;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\/\/ make sure we havent deleted our node\n\t\tif(node){\n\t\t\tvar styles = doc.getElementsByTagName(\"style\");\n\t\t\tfor(var i = 0; i < styles.length; i++){\n\t\t\t\tif(styles[i] == node){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\/\/ delete this entry\n\t\t\tdojo.html._insertedCssFiles.shift(idx, 1);\n\t\t}\n\t}\n\tvar style = dojo.html.insertCssText(cssStr, doc);\n\tdojo.html._insertedCssFiles.push({'doc': doc, 'cssText': cssStr, 'nodeRef': style});\n\t\/\/ insert custom attribute ex dbgHref=\"..\/foo.css\" usefull when debugging in DOM inspectors, no?\n\tif(style && djConfig.isDebug){\n\t\tstyle.setAttribute(\"dbgHref\", URI);\n\t}\n\treturn style;\t\/\/\tHTMLStyleElement","returns":"HTMLStyleElement"}},"dojo.html.insertCssText":{"meta":{"summary":"Attempt to insert CSS rules into the document through inserting a style element DomNode Style = insertCssText(String \".dojoMenu {color: green;}\"[, DomDoc document, dojo.uri.Uri Url ])","parameters":{"cssStr":{"type":"string"},"doc":{"type":"HTMLDocument?"},"URI":{"type":"string?"}},"src":" if(!cssStr){ \n\t\treturn; \/\/\tHTMLStyleElement\n\t}\n\tif(!doc){ doc = document; }\n\tif(URI){\/\/ fix paths in cssStr\n\t\tcssStr = dojo.html.fixPathsInCssText(cssStr, URI);\n\t}\n\tvar style = doc.createElement(\"style\");\n\tstyle.setAttribute(\"type\", \"text\/css\");\n\t\/\/ IE is b0rken enough to require that we add the element to the doc\n\t\/\/ before changing it's properties\n\tvar head = doc.getElementsByTagName(\"head\")[0];\n\tif(!head){ \/\/ must have a head tag \n\t\tdojo.debug(\"No head tag in document, aborting styles\");\n\t\treturn;\t\/\/\tHTMLStyleElement\n\t}else{\n\t\thead.appendChild(style);\n\t}\n\tif(style.styleSheet){\/\/ IE\n\t\tvar setFunc = function(){ \n\t\t\ttry{\n\t\t\t\tstyle.styleSheet.cssText = cssStr;\n\t\t\t}catch(e){ dojo.debug(e); }\n\t\t};\n\t\tif(style.styleSheet.disabled){\n\t\t\tsetTimeout(setFunc, 10);\n\t\t}else{\n\t\t\tsetFunc();\n\t\t}\n\t}else{ \/\/ w3c\n\t\tvar cssText = doc.createTextNode(cssStr);\n\t\tstyle.appendChild(cssText);\n\t}\n\treturn style;\t\/\/\tHTMLStyleElement","returns":"HTMLStyleElement"}},"dojo.html.fixPathsInCssText":{"meta":{"summary":"usage: cssText comes from dojoroot\/src\/widget\/templates\/Foobar.css it has .dojoFoo { background-image: url(images\/bar.png);} then uri should point to dojoroot\/src\/widget\/templates\/","parameters":{"cssStr":{"type":"string"},"URI":{"type":"string"}},"src":" if(!cssStr || !URI){ return; }\n\tvar match, str = \"\", url = \"\", urlChrs = \"[\\\\t\\\\s\\\\w\\\\(\\\\)\\\\\/\\\\.\\\\\\\\'\\\"-:#=&?~]+\";\n\tvar regex = new RegExp('url\\\\(\\\\s*('+urlChrs+')\\\\s*\\\\)');\n\tvar regexProtocol = \/(file|https?|ftps?):\\\/\\\/\/;\n\tregexTrim = new RegExp(\"^[\\\\s]*(['\\\"]?)(\"+urlChrs+\")\\\\1[\\\\s]*?$\");\n\tif(dojo.render.html.ie55 || dojo.render.html.ie60){\n\t\tvar regexIe = new RegExp(\"AlphaImageLoader\\\\((.*)src\\=['\\\"](\"+urlChrs+\")['\\\"]\");\n\t\t\/\/ TODO: need to decide how to handle relative paths and AlphaImageLoader see #1441\n\t\t\/\/ current implementation breaks on build with intern_strings\n\t\twhile(match = regexIe.exec(cssStr)){\n\t\t\turl = match[2].replace(regexTrim, \"$2\");\n\t\t\tif(!regexProtocol.exec(url)){\n\t\t\t\turl = (new dojo.uri.Uri(URI, url).toString());\n\t\t\t}\n\t\t\tstr += cssStr.substring(0, match.index) + \"AlphaImageLoader(\" + match[1] + \"src='\" + url + \"'\";\n\t\t\tcssStr = cssStr.substr(match.index + match[0].length);\n\t\t}\n\t\tcssStr = str + cssStr;\n\t\tstr = \"\";\n\t}\n\twhile(match = regex.exec(cssStr)){\n\t\turl = match[1].replace(regexTrim, \"$2\");\n\t\tif(!regexProtocol.exec(url)){\n\t\t\turl = (new dojo.uri.Uri(URI, url).toString());\n\t\t}\n\t\tstr += cssStr.substring(0, match.index) + \"url(\" + url + \")\";\n\t\tcssStr = cssStr.substr(match.index + match[0].length);\n\t}\n\treturn str + cssStr;\t\/\/\tstring","returns":"string"}},"dojo.html.setActiveStyleSheet":{"meta":{"summary":"Activate style sheet with specified title.","parameters":{"title":{"type":"string"}},"src":" var i = 0, a, els = dojo.doc().getElementsByTagName(\"link\");\n\twhile (a = els[i++]) {\n\t\tif(a.getAttribute(\"rel\").indexOf(\"style\") != -1 && a.getAttribute(\"title\")){\n\t\t\ta.disabled = true;\n\t\t\tif (a.getAttribute(\"title\") == title) { a.disabled = false; }\n\t\t}\n\t}"}},"dojo.html.getActiveStyleSheet":{"meta":{"summary":"return the title of the currently active stylesheet","src":" var i = 0, a, els = dojo.doc().getElementsByTagName(\"link\");\n\twhile (a = els[i++]) {\n\t\tif (a.getAttribute(\"rel\").indexOf(\"style\") != -1 \n\t\t\t&& a.getAttribute(\"title\") \n\t\t\t&& !a.disabled\n\t\t){\n\t\t\treturn a.getAttribute(\"title\");\t\/\/\tstring \n\t\t}\n\t}\n\treturn null;\t\/\/\tstring","returns":"string"}},"dojo.html.getPreferredStyleSheet":{"meta":{"summary":"Return the preferred stylesheet title (i.e. link without alt attribute)","src":" var i = 0, a, els = dojo.doc().getElementsByTagName(\"link\");\n\twhile (a = els[i++]) {\n\t\tif(a.getAttribute(\"rel\").indexOf(\"style\") != -1\n\t\t\t&& a.getAttribute(\"rel\").indexOf(\"alt\") == -1\n\t\t\t&& a.getAttribute(\"title\")\n\t\t){ \n\t\t\treturn a.getAttribute(\"title\"); \t\/\/\tstring\n\t\t}\n\t}\n\treturn null;\t\/\/\tstring","returns":"string"}},"dojo.html.applyBrowserClass":{"meta":{"summary":"Applies pre-set class names based on browser & version to the passed node. Modified version of Morris' CSS hack.","parameters":{"node":{"type":"HTMLElement"}},"src":" var drh=dojo.render.html;\n\tvar classes = {\n\t\tdj_ie: drh.ie,\n\t\tdj_ie55: drh.ie55,\n\t\tdj_ie6: drh.ie60,\n\t\tdj_ie7: drh.ie70,\n\t\tdj_iequirks: drh.ie && drh.quirks,\n\t\tdj_opera: drh.opera,\n\t\tdj_opera8: drh.opera && (Math.floor(dojo.render.version)==8),\n\t\tdj_opera9: drh.opera && (Math.floor(dojo.render.version)==9),\n\t\tdj_khtml: drh.khtml,\n\t\tdj_safari: drh.safari,\n\t\tdj_gecko: drh.mozilla\n\t}; \/\/ no dojo unsupported browsers\n\tfor(var p in classes){\n\t\tif(classes[p]){\n\t\t\tdojo.html.addClass(node, p);\n\t\t}\n\t}"}}},"objects":{"dojo.html.getUnitValue.bad":{"meta":{"variables":["value","units"]}}}}},"dojo.html.util":{"meta":{"requires":{"common":["dojo.html.layout"]},"functions":{"dojo.html.getElementWindow":{"meta":{"summary":"Get the window object where the element is placed in.","parameters":{"element":{"type":"HTMLElement"}},"src":" return dojo.html.getDocumentWindow( element.ownerDocument );\t\/\/\tWindow","returns":"Window"}},"dojo.html.getDocumentWindow":{"meta":{"summary":"Get window object associated with document doc","parameters":{"doc":{"type":""}},"src":"\t\/\/ With Safari, there is not wa to retrieve the window from the document, so we must fix it.\n\tif(dojo.render.html.safari && !doc._parentWindow){\n\t\t\/*\n\t\t\tThis is a Safari specific function that fix the reference to the parent\n\t\t\twindow from the document object.\n\t\t*\/\n\t\tvar fix=function(win){\n\t\t\twin.document._parentWindow=win;\n\t\t\tfor(var i=0; i If you wanted to insert a node into a DOM tree based on the mouse position you might use the following code: if (gravity(node, e) & gravity.NORTH) { [insert before]; } else { [insert after]; } <\/pre> @param node The node @param e The event containing the mouse coordinates @return The directions, NORTH or SOUTH and EAST or WEST. These are properties of the function.","parameters":{"node":{"type":"HTMLElement"},"e":{"type":"DOMEvent"}},"src":" node = dojo.byId(node);\n\tvar mouse = dojo.html.getCursorPosition(e);\n\twith (dojo.html) {\n\t\tvar absolute = getAbsolutePosition(node, true);\n\t\tvar bb = getBorderBox(node);\n\t\tvar nodecenterx = absolute.x + (bb.width \/ 2);\n\t\tvar nodecentery = absolute.y + (bb.height \/ 2);\n\t}\n\twith (dojo.html.gravity) {\n\t\treturn ((mouse.x < nodecenterx ? WEST : EAST) | (mouse.y < nodecentery ? NORTH : SOUTH));\t\/\/\tinteger\n\t}","returns":"integer"}},"dojo.html.overElement":{"meta":{"summary":"Returns whether the mouse is over the passed element. Element must be display:block (ie, not a )","parameters":{"element":{"type":"HTMLElement"},"e":{"type":"DOMEvent"}},"src":" element = dojo.byId(element);\n\tvar mouse = dojo.html.getCursorPosition(e);\n\tvar bb = dojo.html.getBorderBox(element);\n\tvar absolute = dojo.html.getAbsolutePosition(element, true, dojo.html.boxSizing.BORDER_BOX);\n\tvar top = absolute.y;\n\tvar bottom = top + bb.height;\n\tvar left = absolute.x;\n\tvar right = left + bb.width;\n\treturn (mouse.x >= left\n\t\t&& mouse.x <= right\n\t\t&& mouse.y >= top\n\t\t&& mouse.y <= bottom\n\t);\t\/\/\tboolean"}},"dojo.html.renderedTextContent":{"meta":{"summary":"Attempts to return the text as it would be rendered, with the line breaks sorted out nicely. Unfinished.","parameters":{"node":{"type":"HTMLElement"}},"src":" node = dojo.byId(node);\n\tvar result = \"\";\n\tif (node == null) { return result; }\n\tfor (var i = 0; i < node.childNodes.length; i++) {\n\t\tswitch (node.childNodes[i].nodeType) {\n\t\t\tcase 1: \/\/ ELEMENT_NODE\n\t\t\tcase 5: \/\/ ENTITY_REFERENCE_NODE\n\t\t\t\tvar display = \"unknown\";\n\t\t\t\ttry {\n\t\t\t\t\tdisplay = dojo.html.getStyle(node.childNodes[i], \"display\");\n\t\t\t\t} catch(E) {}\n\t\t\t\tswitch (display) {\n\t\t\t\t\tcase \"block\": case \"list-item\": case \"run-in\":\n\t\t\t\t\tcase \"table\": case \"table-row-group\": case \"table-header-group\":\n\t\t\t\t\tcase \"table-footer-group\": case \"table-row\": case \"table-column-group\":\n\t\t\t\t\tcase \"table-column\": case \"table-cell\": case \"table-caption\":\n\t\t\t\t\t\t\/\/ TODO: this shouldn't insert double spaces on aligning blocks\n\t\t\t\t\t\tresult += \"\\n\";\n\t\t\t\t\t\tresult += dojo.html.renderedTextContent(node.childNodes[i]);\n\t\t\t\t\t\tresult += \"\\n\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"none\": break;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif(node.childNodes[i].tagName && node.childNodes[i].tagName.toLowerCase() == \"br\") {\n\t\t\t\t\t\t\tresult += \"\\n\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresult += dojo.html.renderedTextContent(node.childNodes[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3: \/\/ TEXT_NODE\n\t\t\tcase 2: \/\/ ATTRIBUTE_NODE\n\t\t\tcase 4: \/\/ CDATA_SECTION_NODE\n\t\t\t\tvar text = node.childNodes[i].nodeValue;\n\t\t\t\tvar textTransform = \"unknown\";\n\t\t\t\ttry {\n\t\t\t\t\ttextTransform = dojo.html.getStyle(node, \"text-transform\");\n\t\t\t\t} catch(E) {}\n\t\t\t\tswitch (textTransform){\n\t\t\t\t\tcase \"capitalize\":\n\t\t\t\t\t\tvar words = text.split(' ');\n\t\t\t\t\t\tfor(var i=0; i]\/i).test(txt.replace(\/^\\s+\/))) {\n\t\ttxt = \"\" + txt + \"<\/tr><\/tbody><\/table>\";\n\t\ttableType = \"cell\";\n\t} else if((\/^
]\/i).test(txt.replace(\/^\\s+\/))) {\n\t\ttxt = \"\" + txt + \"<\/tbody><\/table>\";\n\t\ttableType = \"row\";\n\t} else if((\/^<(thead|tbody|tfoot)[\\s\\r\\n>]\/i).test(txt.replace(\/^\\s+\/))) {\n\t\ttxt = \"\" + txt + \"<\/table>\";\n\t\ttableType = \"section\";\n\t}\n\ttn.innerHTML = txt;\n\tif(tn[\"normalize\"]){\n\t\ttn.normalize();\n\t}\n\tvar parent = null;\n\tswitch(tableType) {\n\t\tcase \"cell\":\n\t\t\tparent = tn.getElementsByTagName(\"tr\")[0];\n\t\t\tbreak;\n\t\tcase \"row\":\n\t\t\tparent = tn.getElementsByTagName(\"tbody\")[0];\n\t\t\tbreak;\n\t\tcase \"section\":\n\t\t\tparent = tn.getElementsByTagName(\"table\")[0];\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tparent = tn;\n\t\t\tbreak;\n\t}\n\t\/* this doesn't make much sense, I'm assuming it just meant trim() so wrap was replaced with trim\n\tif(wrap){\n\t\tvar ret = [];\n\t\t\/\/ start hack\n\t\tvar fc = tn.firstChild;\n\t\tret[0] = ((fc.nodeValue == \" \")||(fc.nodeValue == \"\\t\")) ? fc.nextSibling : fc;\n\t\t\/\/ end hack\n\t\t\/\/ tn.style.display = \"none\";\n\t\tdojo.body().removeChild(tn);\n\t\treturn ret;\n\t}\n\t*\/\n\tvar nodes = [];\n\tfor(var x=0; x view.width) {\n\t\t\tx = view.width - w;\n\t\t\tmatch = false;\n\t\t} else {\n\t\t\tx = tryX;\n\t\t}\n\t\tx = Math.max(padding[0], x) + scroll.x;\n\t\tvar y = tryY + h;\n\t\tif(y > view.height) {\n\t\t\ty = view.height - h;\n\t\t\tmatch = false;\n\t\t} else {\n\t\t\ty = tryY;\n\t\t}\n\t\ty = Math.max(padding[1], y) + scroll.y;\n\t\tif(match){ \/\/perfect match, return now\n\t\t\tbestx = x;\n\t\t\tbesty = y;\n\t\t\tbestDistance = 0;\n\t\t\tbestCorner = corner;\n\t\t\tbreak;\n\t\t}else{\n\t\t\t\/\/not perfect, find out whether it is better than the saved one\n\t\t\tvar dist = Math.pow(x-tryX-scroll.x,2)+Math.pow(y-tryY-scroll.y,2);\n\t\t\tif(bestDistance > dist){\n\t\t\t\tbestDistance = dist;\n\t\t\t\tbestx = x;\n\t\t\t\tbesty = y;\n\t\t\t\tbestCorner = corner;\n\t\t\t}\n\t\t}\n\t}\n\tif(!tryOnly){\n\t\tnode.style.left = bestx + \"px\";\n\t\tnode.style.top = besty + \"px\";\n\t}\n\treturn { left: bestx, top: besty, x: bestx, y: besty, dist: bestDistance, corner: bestCorner};\t\/\/\tobject","returns":"mixed"}},"dojo.html.placeOnScreenPoint":{"meta":{"summary":"","parameters":{"node":{"type":""},"desiredX":{"type":""},"desiredY":{"type":""},"padding":{"type":""},"hasScroll":{"type":""}},"src":" dojo.deprecated(\"dojo.html.placeOnScreenPoint\", \"use dojo.html.placeOnScreen() instead\", \"0.5\");\n\treturn dojo.html.placeOnScreen(node, desiredX, desiredY, padding, hasScroll, ['TL', 'TR', 'BL', 'BR']);"}},"dojo.html.placeOnScreenAroundElement":{"meta":{"summary":"Like placeOnScreen, except it accepts aroundNode instead of x,y and attempts to place node around it. aroundType (see dojo.html.boxSizing in html\/layout.js) determines which box of the","parameters":{"node":{"type":"HTMLElement"},"aroundNode":{"type":"HTMLElement"},"padding":{"type":"integer"},"aroundType":{"type":"string?"},"aroundCorners":{"type":"string?"},"tryOnly":{"type":"boolean?"}},"src":"\tvar best, bestDistance=Infinity;\n\taroundNode = dojo.byId(aroundNode);\n\tvar oldDisplay = aroundNode.style.display;\n\taroundNode.style.display=\"\";\n\tvar mb = dojo.html.getElementBox(aroundNode, aroundType);\n\tvar aroundNodeW = mb.width;\n\tvar aroundNodeH = mb.height;\n\tvar aroundNodePos = dojo.html.getAbsolutePosition(aroundNode, true, aroundType);\n\taroundNode.style.display=oldDisplay;\n\tfor(var nodeCorner in aroundCorners){\n\t\tvar pos, desiredX, desiredY;\n\t\tvar corners = aroundCorners[nodeCorner];\n\t\tdesiredX = aroundNodePos.x + (nodeCorner.charAt(1)=='L' ? 0 : aroundNodeW);\n\t\tdesiredY = aroundNodePos.y + (nodeCorner.charAt(0)=='T' ? 0 : aroundNodeH);\n\t\tpos = dojo.html.placeOnScreen(node, desiredX, desiredY, padding, true, corners, true);\n\t\tif(pos.dist == 0){\n\t\t\tbest = pos;\n\t\t\tbreak;\n\t\t}else{\n\t\t\t\/\/not perfect, find out whether it is better than the saved one\n\t\t\tif(bestDistance > pos.dist){\n\t\t\t\tbestDistance = pos.dist;\n\t\t\t\tbest = pos;\n\t\t\t}\n\t\t}\n\t}\n\tif(!tryOnly){\n\t\tnode.style.left = best.left + \"px\";\n\t\tnode.style.top = best.top + \"px\";\n\t}\n\treturn best;\t\/\/\tobject","returns":"object"},"extra":{"parameters":{"aroundNode":{"type":"should","summary":"be used to calculate the outer box."},"aroundCorners":{"type":"TL'","summary":"'BL', 'BL': 'TL'}"}}}},"dojo.html.scrollIntoView":{"meta":{"summary":"Scroll the passed node into view, if it is not.","parameters":{"node":{"type":"HTMLElement"}},"src":" if(!node){ return; }\n\t\/\/ don't rely on that node.scrollIntoView works just because the function is there\n\t\/\/ it doesnt work in Konqueror or Opera even though the function is there and probably\n\t\/\/ not safari either\n\t\/\/ dont like browser sniffs implementations but sometimes you have to use it\n\tif(dojo.render.html.ie){\n\t\t\/\/only call scrollIntoView if there is a scrollbar for this menu,\n\t\t\/\/otherwise, scrollIntoView will scroll the window scrollbar\n\t\tif(dojo.html.getBorderBox(node.parentNode).height <= node.parentNode.scrollHeight){\n\t\t\tnode.scrollIntoView(false);\n\t\t}\n\t}else if(dojo.render.html.mozilla){\n\t\t\/\/ IE, mozilla\n\t\tnode.scrollIntoView(false);\n\t}else{\n\t\tvar parent = node.parentNode;\n\t\tvar parentBottom = parent.scrollTop + dojo.html.getBorderBox(parent).height;\n\t\tvar nodeBottom = node.offsetTop + dojo.html.getMarginBox(node).height;\n\t\tif(parentBottom < nodeBottom){\n\t\t\tparent.scrollTop += (nodeBottom - parentBottom);\n\t\t}else if(parent.scrollTop > node.offsetTop){\n\t\t\tparent.scrollTop -= (parent.scrollTop - node.offsetTop);\n\t\t}\n\t}"}}}}},"dojo.html":{"meta":{"requires":{"common":["dojo.html.*"]}}}}