<!doctype html public "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<html>
<head>
<title>
ka-Map Overview
</title>
<link rel ="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script>
function asd() {
parent.document.title="DHTMLapi.js Overview";
}
</script>
</head>
<body bgcolor="white" onload="asd();">
<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
<tr align="center" valign="top">
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a> </td>
<td bgcolor="#FFFFFF" class="NavBarCell1Rev"> <font class="NavBarFont1Rev"><b>File</b></font> </td>
<td bgcolor="#FFFFFF" class="NavBarCell1"> <font class="NavBarFont1">Class</font> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a> </td>
</tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top">
<em>
<b>ka-Map</b></em>
</td>
</tr>
<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
PREV
NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
<a href="index.html" target="_top"><b>FRAMES</b></a>
<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
<script>
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->
<hr>
<center>
<h2>DHTMLapi.js</h2>
</center>
<h4>Summary</h4>
<p>
No overview generated for 'DHTMLapi.js'<BR/><BR/>
</p>
<hr>
<!-- ========== METHOD SUMMARY =========== -->
<a name="method_summary"><!-- --></a>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
<td colspan=2>
<font size="+2">
<b>Method Summary</b>
</font>
</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<font size="-1">
<code>static Object</code>
</font>
</td>
<td>
<code>
<b>
<a href="GLOBALS.html#!s!getInsideWindowHeight">getInsideWindowHeight</a></b>()
</code>
<br>
</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<font size="-1">
<code>static Object</code>
</font>
</td>
<td>
<code>
<b>
<a href="GLOBALS.html#!s!getInsideWindowWidth">getInsideWindowWidth</a></b>()
</code>
<br>
</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<font size="-1">
<code>static Object</code>
</font>
</td>
<td>
<code>
<b>
<a href="GLOBALS.html#!s!getObject">getObject</a></b>(obj)
</code>
<br>
</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<font size="-1">
<code>static Object</code>
</font>
</td>
<td>
<code>
<b>
<a href="GLOBALS.html#!s!getObjectHeight">getObjectHeight</a></b>(obj)
</code>
<br>
</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<font size="-1">
<code>static Object</code>
</font>
</td>
<td>
<code>
<b>
<a href="GLOBALS.html#!s!getObjectLeft">getObjectLeft</a></b>(obj)
</code>
<br>
</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<font size="-1">
<code>static Object</code>
</font>
</td>
<td>
<code>
<b>
<a href="GLOBALS.html#!s!getObjectTop">getObjectTop</a></b>(obj)
</code>
<br>
</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<font size="-1">
<code>static Object</code>
</font>
</td>
<td>
<code>
<b>
<a href="GLOBALS.html#!s!getObjectWidth">getObjectWidth</a></b>(obj)
</code>
<br>
</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<font size="-1">
<code>static Object</code>
</font>
</td>
<td>
<code>
<b>
<a href="GLOBALS.html#!s!getRawObject">getRawObject</a></b>(obj)
</code>
<br>
</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<font size="-1">
<code>static void</code>
</font>
</td>
<td>
<code>
<b>
<a href="GLOBALS.html#!s!hide">hide</a></b>(obj)
</code>
<br>
</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<font size="-1">
<code>static void</code>
</font>
</td>
<td>
<code>
<b>
<a href="GLOBALS.html#!s!initDHTMLAPI">initDHTMLAPI</a></b>()
</code>
<br>
</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<font size="-1">
<code>static Object</code>
</font>
</td>
<td>
<code>
<b>
<a href="GLOBALS.html#!s!seekLayer">seekLayer</a></b>(doc, name)
</code>
<br>
</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<font size="-1">
<code>static void</code>
</font>
</td>
<td>
<code>
<b>
<a href="GLOBALS.html#!s!setBGColor">setBGColor</a></b>(obj, color)
</code>
<br>
</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<font size="-1">
<code>static void</code>
</font>
</td>
<td>
<code>
<b>
<a href="GLOBALS.html#!s!setZIndex">setZIndex</a></b>(obj, zOrder)
</code>
<br>
</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<font size="-1">
<code>static void</code>
</font>
</td>
<td>
<code>
<b>
<a href="GLOBALS.html#!s!shiftBy">shiftBy</a></b>(obj, deltaX, deltaY)
</code>
<br>
</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<font size="-1">
<code>static void</code>
</font>
</td>
<td>
<code>
<b>
<a href="GLOBALS.html#!s!shiftTo">shiftTo</a></b>(obj, x, y)
</code>
<br>
</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td align="right" valign="top" width="1%">
<font size="-1">
<code>static void</code>
</font>
</td>
<td>
<code>
<b>
<a href="GLOBALS.html#!s!show">show</a></b>(obj)
</code>
<br>
</td>
</tr>
</table>
<p>
<!-- ========== END METHOD SUMMARY =========== -->
<pre class="sourceview"><span class="comment">/* ***********************************************************
Example 4-3 (DHTMLapi.js)
"Dynamic HTML:The Definitive Reference"
2nd Edition
by Danny Goodman
Published by O'Reilly & Associates ISBN 1-56592-494-0
http://www.oreilly.com
Copyright 2002 Danny Goodman. All Rights Reserved.
************************************************************ */</span>
<span class="comment">// DHTMLapi.js custom API for cross-platform</span>
<span class="comment">// object positioning by Danny Goodman (http://www.dannyg.com).</span>
<span class="comment">// Release 2.0. Supports NN4, IE, and W3C DOMs.</span>
<span class="comment">// Global variables</span>
var isCSS, isW3C, isIE4, isNN4;
<span class="comment">// initialize upon load to let all browsers establish content objects</span>
<span class="reserved">function</span> initDHTMLAPI() {
<span class="reserved">if</span> (document.images) {
isCSS = (document.body && document.body.style) ? true : false;
isW3C = (isCSS && document.getElementById) ? true : false;
isIE4 = (isCSS && document.all) ? true : false;
isNN4 = (document.layers) ? true : false;
isIE6CSS = (document.compatMode && document.compatMode.indexOf(<span class="literal">"CSS1"</span>) >= 0) ? true : false;
}
}
<span class="comment">// set event handler to initialize API</span>
<span class="comment">//window.onload = initDHTMLAPI;</span>
<span class="comment">// Seek nested NN4 layer from string name</span>
<span class="reserved">function</span> seekLayer(doc, name) {
var theObj;
<span class="reserved">for</span> (var i = 0; i < doc.layers.length; i++) {
<span class="reserved">if</span> (doc.layers[i].name == name) {
theObj = doc.layers[i];
break;
}
<span class="comment">// dive into nested layers if necessary</span>
<span class="reserved">if</span> (doc.layers[i].document.layers.length > 0) {
theObj = seekLayer(document.layers[i].document, name);
}
}
<span class="reserved">return</span> theObj;
}
<span class="comment">// Convert object name string or object reference</span>
<span class="comment">// into a valid element object reference</span>
<span class="reserved">function</span> getRawObject(obj) {
var theObj;
<span class="reserved">if</span> (typeof obj == <span class="literal">"string"</span>) {
<span class="reserved">if</span> (isW3C) {
theObj = document.getElementById(obj);
} <span class="reserved">else</span> <span class="reserved">if</span> (isIE4) {
theObj = document.all(obj);
} <span class="reserved">else</span> <span class="reserved">if</span> (isNN4) {
theObj = seekLayer(document, obj);
}
} <span class="reserved">else</span> {
<span class="comment">// pass through object reference</span>
theObj = obj;
}
<span class="reserved">return</span> theObj;
}
<span class="comment">// Convert object name string or object reference</span>
<span class="comment">// into a valid style (or NN4 layer) reference</span>
<span class="reserved">function</span> getObject(obj) {
var theObj = getRawObject(obj);
<span class="reserved">if</span> (theObj && isCSS) {
theObj = theObj.style;
}
<span class="reserved">return</span> theObj;
}
<span class="comment">// Position an object at a specific pixel coordinate</span>
<span class="reserved">function</span> shiftTo(obj, x, y) {
var theObj = getObject(obj);
<span class="reserved">if</span> (theObj) {
<span class="reserved">if</span> (isCSS) {
<span class="comment">// equalize incorrect numeric value type</span>
var units = (typeof theObj.left == <span class="literal">"string"</span>) ? <span class="literal">"px"</span> : 0;
theObj.left = x + units;
theObj.top = y + units;
} <span class="reserved">else</span> <span class="reserved">if</span> (isNN4) {
theObj.moveTo(x,y)
}
}
}
<span class="comment">// Move an object by x and/or y pixels</span>
<span class="reserved">function</span> shiftBy(obj, deltaX, deltaY) {
var theObj = getObject(obj);
<span class="reserved">if</span> (theObj) {
<span class="reserved">if</span> (isCSS) {
<span class="comment">// equalize incorrect numeric value type</span>
var units = (typeof theObj.left == <span class="literal">"string"</span>) ? <span class="literal">"px"</span> : 0;
theObj.left = getObjectLeft(obj) + deltaX + units;
theObj.top = getObjectTop(obj) + deltaY + units;
} <span class="reserved">else</span> <span class="reserved">if</span> (isNN4) {
theObj.moveBy(deltaX, deltaY);
}
}
}
<span class="comment">// Set the z-order of an object</span>
<span class="reserved">function</span> setZIndex(obj, zOrder) {
var theObj = getObject(obj);
<span class="reserved">if</span> (theObj) {
theObj.zIndex = zOrder;
}
}
<span class="comment">// Set the background color of an object</span>
<span class="reserved">function</span> setBGColor(obj, color) {
var theObj = getObject(obj);
<span class="reserved">if</span> (theObj) {
<span class="reserved">if</span> (isNN4) {
theObj.bgColor = color;
} <span class="reserved">else</span> <span class="reserved">if</span> (isCSS) {
theObj.backgroundColor = color;
}
}
}
<span class="comment">// Set the visibility of an object to visible</span>
<span class="reserved">function</span> show(obj) {
var theObj = getObject(obj);
<span class="reserved">if</span> (theObj) {
theObj.visibility = <span class="literal">"visible"</span>;
}
}
<span class="comment">// Set the visibility of an object to hidden</span>
<span class="reserved">function</span> hide(obj) {
var theObj = getObject(obj);
<span class="reserved">if</span> (theObj) {
theObj.visibility = <span class="literal">"hidden"</span>;
}
}
<span class="comment">// Retrieve the x coordinate of a positionable object</span>
<span class="reserved">function</span> getObjectLeft(obj) {
var elem = getRawObject(obj);
var result = 0;
<span class="reserved">if</span> (document.defaultView) {
var style = document.defaultView;
var cssDecl = style.getComputedStyle(elem, <span class="literal">""</span>);
result = cssDecl.getPropertyValue(<span class="literal">"left"</span>);
} <span class="reserved">else</span> <span class="reserved">if</span> (elem.currentStyle) {
result = elem.currentStyle.left;
} <span class="reserved">else</span> <span class="reserved">if</span> (elem.style) {
result = elem.style.left;
} <span class="reserved">else</span> <span class="reserved">if</span> (isNN4) {
result = elem.left;
}
<span class="reserved">return</span> parseInt(result);
}
<span class="comment">// Retrieve the y coordinate of a positionable object</span>
<span class="reserved">function</span> getObjectTop(obj) {
var elem = getRawObject(obj);
var result = 0;
<span class="reserved">if</span> (document.defaultView) {
var style = document.defaultView;
var cssDecl = style.getComputedStyle(elem, <span class="literal">""</span>);
result = cssDecl.getPropertyValue(<span class="literal">"top"</span>);
} <span class="reserved">else</span> <span class="reserved">if</span> (elem.currentStyle) {
result = elem.currentStyle.top;
} <span class="reserved">else</span> <span class="reserved">if</span> (elem.style) {
result = elem.style.top;
} <span class="reserved">else</span> <span class="reserved">if</span> (isNN4) {
result = elem.top;
}
<span class="reserved">return</span> parseInt(result);
}
<span class="comment">// Retrieve the rendered width of an element</span>
<span class="reserved">function</span> getObjectWidth(obj) {
var elem = getRawObject(obj);
var result = 0;
<span class="reserved">if</span> (elem.offsetWidth) {
result = elem.offsetWidth;
} <span class="reserved">else</span> <span class="reserved">if</span> (elem.clip && elem.clip.width) {
result = elem.clip.width;
} <span class="reserved">else</span> <span class="reserved">if</span> (elem.style && elem.style.pixelWidth) {
result = elem.style.pixelWidth;
}
<span class="reserved">return</span> parseInt(result);
}
<span class="comment">// Retrieve the rendered height of an element</span>
<span class="reserved">function</span> getObjectHeight(obj) {
var elem = getRawObject(obj);
var result = 0;
<span class="reserved">if</span> (elem.offsetHeight) {
result = elem.offsetHeight;
} <span class="reserved">else</span> <span class="reserved">if</span> (elem.clip && elem.clip.height) {
result = elem.clip.height;
} <span class="reserved">else</span> <span class="reserved">if</span> (elem.style && elem.style.pixelHeight) {
result = elem.style.pixelHeight;
}
<span class="reserved">return</span> parseInt(result);
}
<span class="comment">// Return the available content width space in browser window</span>
<span class="reserved">function</span> getInsideWindowWidth() {
<span class="reserved">if</span> (window.innerWidth) {
<span class="reserved">return</span> window.innerWidth;
} <span class="reserved">else</span> <span class="reserved">if</span> (isIE6CSS) {
<span class="comment">// measure the html element's clientWidth</span>
<span class="reserved">return</span> document.body.parentElement.clientWidth;
} <span class="reserved">else</span> <span class="reserved">if</span> (document.body && document.body.clientWidth) {
<span class="reserved">return</span> document.body.clientWidth;
}
<span class="reserved">return</span> 0;
}
<span class="comment">// Return the available content height space in browser window</span>
<span class="reserved">function</span> getInsideWindowHeight() {
<span class="reserved">if</span> (window.innerHeight) {
<span class="reserved">return</span> window.innerHeight;
} <span class="reserved">else</span> <span class="reserved">if</span> (isIE6CSS) {
<span class="comment">// measure the html element's clientHeight</span>
<span class="reserved">return</span> document.body.parentElement.clientHeight;
} <span class="reserved">else</span> <span class="reserved">if</span> (document.body && document.body.clientHeight) {
<span class="reserved">return</span> document.body.clientHeight;
}
<span class="reserved">return</span> 0;
}
</pre>
<hr>
<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
<tr align="center" valign="top">
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a> </td>
<td bgcolor="#FFFFFF" class="NavBarCell1Rev"> <font class="NavBarFont1Rev"><b>File</b></font> </td>
<td bgcolor="#FFFFFF" class="NavBarCell1"> <font class="NavBarFont1">Class</font> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a> </td>
</tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top"><em>
<b>ka-Map</b></em>
</td>
</tr>
<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
PREV
NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
<a href="index.html" target="_top"><b>FRAMES</b></a>
<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
<script>
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->
<hr>
<font size="-1">
</font>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Wed Mar 15 10:50:59 2006</div>
</body>
</html>