<html>
<link rel="stylesheet" href="josh.css">
<body bgcolor="#FFFFFF">

		<div id="Description">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">styleSheet</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">2</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>The <span class="literal">styleSheet</span> object represents a style sheet
that may have been created as a <span class="literal">style</span> element or
imported with a <span class="literal">link</span> element or
<span class="literal">@import</span> statement inside a
<span class="literal">style</span> element. This object is different from the
<span class="literal">style</span> element object, which strictly reflects the
<span class="literal">style</span> HTML element and its attributes. The
<span class="literal">document.styleSheets[ ]</span> collection contains zero or
more <span class="literal">styleSheet</span> objects. The shared
<span class="literal">disabled</span> property is available in all supporting
browsers, facilitating the enabling and disabling of entire style
sheets with simple Boolean assignments.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectmodelreference"><span class="title">Object Model Reference</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>[window.]document.styleSheets[i]</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectspecificproperties"><span class="title">Object-Specific Properties</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<table border="1"><tbody><tr><td><span class="literal">cssRules[ ]</span></td><td><span class="literal">cssText</span></td><td><span class="literal">href</span></td><td><span class="literal">imports[ ]</span></td><td><span class="literal">media</span></td>
								</tr>
								<tr><td><span class="literal">ownerNode</span></td><td><span class="literal">ownerRule</span></td><td><span class="literal">owningElement</span></td><td><span class="literal">pages[ ]</span></td><td><span class="literal">parentStyleSheet</span></td>
								</tr>
								<tr><td><span class="literal">readOnly</span></td><td><span class="literal">rules[ ]</span></td><td><span class="literal">title</span></td><td><span class="literal">type</span></td><td></td>
								</tr>
							</tbody></table>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectspecificmethods"><span class="title">Object-Specific Methods</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<table border="1"><tbody><tr><td>a<span class="literal">ddImport( )</span></td><td><span class="literal">addRule( )</span></td><td><span class="literal">deleteRule( )</span></td><td><span class="literal">insertRule( )</span></td><td><span class="literal">removeRule( )</span></td>
								</tr>
							</tbody></table>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectspecificeventhandlerproperties"><span class="title">Object-Specific Event Handler Properties</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			None. </p>
					</td>
				</tr>
			</table>
		</div><div id="cssRules[ ]">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">cssRules[ ]</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">5(Mac)</span> DOM <span class="emphasis">2</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">Read-only&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Returns a collection of <span class="literal">cssRule</span> objects nested
within the current <span class="literal">styleSheet</span> object. The IE-only
equivalent is the <span class="literal">rules</span> property. See the
<span class="literal">cssRules</span> object earlier in this chapter for a
description of this collection object's property and
methods; see the <span class="literal">cssRule</span> object earlier in this
chapter for a description of the individual members of this
collection.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title">Example</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>var allCSSRules = document.styleSheets[0].cssRules;</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Reference to a <span class="literal">CSSRules</span> collection object.</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">Default</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Array of zero length. </p>
					</td>
				</tr>
			</table>
		</div><div id="cssText">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">cssText</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">n/a</span> IE <span class="emphasis">5</span> DOM <span class="emphasis">n/a</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">Read/Write&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Contains the entire text (as a string) of all rules defined in the
style sheet. This is useful primarily if you wish to replace the
entire set of rules with a new set. To act on the text of an
individual rule in IE, access the <span class="literal">cssText</span> property
of a single <span class="literal">rule</span> object (obtained by the
<span class="literal">styleSheet</span> object's
<span class="literal">rules[i].cssText</span> property); or, in Netscape 6, you
can use the <span class="literal">cssRules[i].cssText</span> property.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title">Example</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>var allCSSText = document.styleSheets[0].cssText;</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			String.</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">Default</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Empty string. </p>
					</td>
				</tr>
			</table>
		</div>
		<div id="disabled">
					<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
						<tr><td valign="top" class="name">disabled</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">1</span>&nbsp;&nbsp;</td>
						</tr>
						<tr>
							<td valign="top" nowrap class="usage"><p class="literal"></p>
							</td><td valign="top" nowrap class="requirements"><span class="emphasis">Read/Write</span>&nbsp;&nbsp;</td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="description"><p>			Specifies whether the element is available for user interaction. When
		set to <span class="literal">true</span>, the element cannot receive focus or
		be modified by the user, and it typically appears grayed out on the
		page. This property is available for all HTML element objects in IE
		5.5 for Windows and later. For IE 4 and IE 5, it applies only to form
		controls, while Netscape 6 and later recognize the property for form
		controls and the <span class="literal">style</span> element object. A disabled
		form control's name/value pair is not submitted with
		its form.
		</p>
									</td>
	</tr>

						<tr>
							<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="example"><span class="title">Example</span></td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
						</tr>
						<tr>
							<td><span class="programlisting"><pre>document.getElementById("myButton").disabled = true;</pre>
								</span></td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
						</tr>
						<tr>
							<td colspan="2"><p>			Boolean value: <span class="literal">true</span> | <span class="literal">false</span>.</p>
							</td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
						</tr>
						<tr>
							<td valign="top" nowrap colspan="2" class="default"><span class="title">Default</span></td>
						</tr>
						<tr>
							<td colspan="2"><p>			<span class="literal">false</span></p>
							</td>
						</tr>
					</table>
				</div>

		<div id="href">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">href</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">2</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">Read/Write&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>This is the URL specified by a <span class="literal">link</span>
element's <span class="literal">href</span> attribute (when
the link is used to import a style sheet). This value is read/write
in IE for Windows, but read-only in Netscape 6 and IE/Mac.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title">Example</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>document.styleSheets[1].href = "css/altStyles.css";</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			String of complete or relative URL.</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">Default</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			None.</p>
					</td>
				</tr>
			</table>
		</div><div id="imports[ ]">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">imports[ ]</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">n/a</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">n/a</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">Read-only&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Returns a collection (array) of <span class="literal">styleSheet</span> objects
imported into an explicit <span class="literal">styleSheet</span> object via
the <span class="literal">@import</span> rule. See the
<span class="literal">imports</span> collection object earlier in this chapter
for further discussion. For Netscape 6, you must loop through all
<span class="literal">cssRule</span> objects of a <span class="literal">styleSheet</span>
object in search of those with <span class="literal">type</span> property
values equal to <span class="literal">3</span> (the same as the
<span class="literal">cssRule</span> object's
<span class="literal">IMPORT_RULE</span> constant).
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title">Example</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>var allImportRules = document.styleSheets[0].imports;</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Reference to an <span class="literal">imports</span> collection object.</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">Default</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Array of zero length. </p>
					</td>
				</tr>
			</table>
		</div><div id="media">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">media</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">2</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">Read/Write&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Specifies the intended output device for the content governed by the
style sheet (reflecting the <span class="literal">media</span> attribute of the
<span class="literal">link</span> and <span class="literal">style</span> elements). The
<span class="literal">media</span> property looks forward to the day when
browsers are able to tailor content to specific kinds of devices such
as pocket computers, text-to-speech digitizers, or fuzzy television
sets. This property is not available in IE 4/Macintosh.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title">Example</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>if (document.styleSheets[2].media == "print") {
    // process for print output
}</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Any one of the following constant values as a string:
<span class="literal">all</span> | <span class="literal">print</span> |
<span class="literal">screen</span>.
</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">Default</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			<span class="literal">all</span></p>
					</td>
				</tr>
			</table>
		</div><div id="ownerNode">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">ownerNode</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">n/a</span> DOM <span class="emphasis">2</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">Read-only&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Returns a reference to the document tree node that contains the
<span class="literal">styleSheet</span> object. This node is either a
<span class="literal">style</span> or <span class="literal">link</span> element,
depending on the way the style sheet is defined in the document. The
IE (Windows and Mac) equivalent property is
<span class="literal">owningElement</span>. IE for the Macintosh provides an
extra <span class="literal">owningNode</span> property, which is very likely a
mistaken implementation of the W3C DOM <span class="literal">ownerNode</span>
property.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title">Example</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>var mama = document.styleSheets[2].ownerNode;</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Object reference.</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">Default</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			None.</p>
					</td>
				</tr>
			</table>
		</div><div id="ownerRule">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">ownerRule</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">n/a</span> DOM <span class="emphasis">2</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">Read-only&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>For a <span class="literal">styleSheet</span> object brought into the document
via an <span class="literal">@import</span> rule, returns a reference to that
<span class="literal">@import</span> rule object (a W3C DOM
<span class="literal">CSSImportRule</span> object). The
<span class="literal">cssRule</span> object earlier in this chapter provides
the properties and methods that apply to a
<span class="literal">CSSImportRule</span> object. For other style sheet types,
the property returns <span class="literal">null</span>.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title">Example</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>var hostRule = document.styleSheets[2].ownerRule;</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Object reference or <span class="literal">null</span>.</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">Default</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			<span class="literal">null</span></p>
					</td>
				</tr>
			</table>
		</div><div id="owningElement">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">owningElement</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">n/a</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">n/a</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">Read-only&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Returns a reference to the <span class="literal">style</span> or
<span class="literal">link</span> element object that defines the current
<span class="literal">styleSheet</span> object. Each document maintains a
collection of style sheets created with both the
<span class="literal">style</span> and <span class="literal">link</span> elements. The
comparable Netscape 6 property is <span class="literal">ownerNode</span>.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title">Example</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>var firstStyleID = document.styleSheets[0].owningElement.id;</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Element object reference.</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">Default</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			None.</p>
					</td>
				</tr>
			</table>
		</div><div id="pages[ ]">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">pages[ ]</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">n/a</span> IE <span class="emphasis">5.5(Win)</span> DOM <span class="emphasis">n/a</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">Read-only&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Returns a collection (array) of <span class="literal">page</span> objects
(<span class="literal">@page</span> rules) nested within a
<span class="literal">styleSheet</span> object. For Netscape 6, you must loop
through all <span class="literal">cssRule</span> objects of a
<span class="literal">styleSheet</span> object in search of those with
<span class="literal">type</span> property values equal to <span class="literal">6</span>
(the same as the <span class="literal">cssRule</span> object's
<span class="literal">PAGE_RULE</span> constant). See the
<span class="literal">page</span> object.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title">Example</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>var allPageRules = document.styleSheets[0].pages;</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Reference to a <span class="literal">pages</span> collection object.</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">Default</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Array of zero length. </p>
					</td>
				</tr>
			</table>
		</div><div id="parentStyleSheet">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">parentStyleSheet</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">2</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">Read-only&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>For a <span class="literal">styleSheet</span> object generated by virtue of
inclusion with an <span class="literal">@page</span> rule, the
<span class="literal">parentStyleSheet</span> property returns a reference to
the <span class="literal">styleSheet</span> (created as a
<span class="literal">link</span> or <span class="literal">style</span> element) object
that imported the current style sheet. For a nonimported style sheet,
the property returns <span class="literal">null</span>.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title">Example</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>var myMaker = document.styleSheets[0].parentStyleSheet;</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Reference to a <span class="literal">styleSheet</span> object.</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">Default</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			<span class="literal">null</span> </p>
					</td>
				</tr>
			</table>
		</div><div id="readOnly">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">readOnly</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">n/a</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">n/a</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">Read-only&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Specifies whether the style sheet can be modified under script
control. Style sheets imported through a <span class="literal">link</span>
element or an <span class="literal">@import</span> rule cannot be modified, so
they return a value of <span class="literal">true</span>.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Boolean value: <span class="literal">true</span> | <span class="literal">false</span>.</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">Default</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			<span class="literal">false</span></p>
					</td>
				</tr>
			</table>
		</div><div id="rules[ ]">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">rules[ ]</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">n/a</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">n/a</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">Read-only&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Returns a collection of <span class="literal">rule</span> objects nested within
the current <span class="literal">styleSheet</span> object. The W3C DOM
equivalent (implemented in Netscape 6 and IE 5/Mac) is the
<span class="literal">cssRules</span> property. See the
<span class="literal">cssRules</span> object earlier in this chapter for a
description of this collection object's property and
methods; see the <span class="literal">cssRule</span> object earlier in this
chapter for a description of the individual members of this
collection.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title">Example</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>var allrules = document.styleSheets[0].rules;</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Reference to a <span class="literal">rules</span> collection object.</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">Default</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Array of zero length. </p>
					</td>
				</tr>
			</table>
		</div><div id="title">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">title</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">2</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">Read/Write&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Exposes the <span class="literal">title</span> attribute of the
<span class="literal">style</span> or <span class="literal">link</span> element that owns
the current <span class="literal">styleSheet</span> object. Since the attribute
does not affect user interface elements (the elements are unrendered,
and thus don't show tool tips), it is available to
convey other string information to the <span class="literal">styleSheet</span>
object under script control.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title">Example</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>if (document.styleSheets[2].title == "corpStyleWindows") {
    // process for the designated style
}</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			String value.</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">Default</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Empty string.</p>
					</td>
				</tr>
			</table>
		</div><div id="type">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">type</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">2</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">Read-only&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Returns the style sheet MIME type specified by the
<span class="literal">type</span> attribute of the <span class="literal">style</span> or
<span class="literal">link</span> element.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title">Example</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>if (document.styleSheets[0].type == "text/css") {
    ...
}</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			String (<span class="literal">text/css</span> for typical CSS style sheets).</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">Default</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			None. </p>
					</td>
				</tr>
			</table>
		</div><div id="addImport( )">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">addImport( )</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">n/a</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">n/a</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">addImport(<span class="replaceable">url</span>,
[<span class="replaceable">index</span>])</p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Adds an external style sheet specification to a
<span class="literal">styleSheet</span> object.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="parameters"><span class="title">Parameters</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<ul><li><span class="literal"></span>A complete or relative URL to the style sheet
(<span class="emphasis">.css</span>) file.
</li><li><span class="literal"></span>An optional integer indicating where in the collection the new
element should be placed.
</li></ul>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="returnedvalue"><span class="title">Returned Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Integer of the index position within the
<span class="literal">styleSheets[ ]</span> collection where the style sheet was
added (in case you omit the second parameter and let the browser find
the end position).
</p>
					</td>
				</tr>
			</table>
		</div><div id="addRule( )">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">addRule( )</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">n/a</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">n/a</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">addRule("<span class="replaceable">selector</span>",
"<span class="replaceable">style</span>"[,
<span class="replaceable">index</span>])</p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Adds a new rule for a style sheet. This method offers a scripted way
of adding a rule to an existing <span class="literal">styleSheet</span> object:
</p>
<span class="PROGRAMLISTING"><pre>document.styleSheets[1].addRule(&quot;p b&quot;,&quot;color:red&quot;);</pre></span>
							</td>
						</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
						<tr>
							<td colspan="2"><p>			You may duplicate a selector that already exists in the
<span class="literal">styleSheet</span> and, therefore, override an existing
rule for the same element selector. The only prohibition is that you
may not override a rule to convert a plain style rule into one that
creates a positionable element (or vice versa). The new rule is
governed by the same cascading rules as all style sheet rules (that
includes the rule's source code position among other
rules with the same selector). Therefore, a new rule in a
<span class="literal">styleSheet</span> object does not supersede a style set
in an element's <span class="literal">style</span> property.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="parameters"><span class="title">Parameters</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<ul><li><span class="literal"></span>The style rule selector as a string.</li><li><span class="literal"></span>One or more style <span class="replaceable">attribute:value</span> pairs.
Multiple pairs are semicolon delimited, just as they are in the
regular style sheet definition.
</li><li><span class="literal"></span>An optional integer indicating where in the collection the new
element should be placed.
</li></ul>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="returnedvalue"><span class="title">Returned Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Early versions of IE returned no value. More recently, IE for Windows
returns <span class="literal">-1</span>, while IE for Macintosh returns
<span class="literal">null</span>. In the future, the returned value may become
the integer of the index location of the new rule.
</p>
					</td>
				</tr>
			</table>
		</div><div id="deleteRule( )">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">deleteRule( )</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">5(Mac)</span> DOM <span class="emphasis">2</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">deleteRule(<span class="replaceable">index</span>)</p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Removes a rule from the <span class="literal">styleSheet</span> object. The
integer index parameter value points to the zero-based item in the
<span class="literal">cssRules</span> array to delete. Note that IE 5 for
Macintosh implements both the Microsoft <span class="literal">removeRule(
)</span> and W3C DOM <span class="literal">deleteRule( )</span> method for
the same operation.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="parameters"><span class="title">Parameters</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<ul><li><span class="literal"></span>A zero-based integer indicating which rule in the
<span class="literal">cssRules</span> collection is to be deleted.
</li></ul>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="returnedvalue"><span class="title">Returned Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			None.</p>
					</td>
				</tr>
			</table>
		</div><div id="insertRule( )">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">insertRule( )</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">5(Mac)</span> DOM <span class="emphasis">2</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">insertRule("<span class="replaceable">ruleText</span>",
<span class="replaceable">index</span>)</p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Adds a new rule for a style sheet. This method offers a scripted way
of adding a rule to an existing W3C DOM <span class="literal">styleSheet</span>
object:
</p>
<span class="PROGRAMLISTING"><pre>document.styleSheets[1].insertRule(&quot;p b {color:red}&quot;, 0);</pre></span>
							</td>
						</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
						<tr>
							<td colspan="2"><p>			You may duplicate a selector that already exists in the
<span class="literal">styleSheet</span> and, therefore, override an existing
rule for the same element selector. The only prohibition is that you
may not override a rule to convert a plain style rule into one that
creates a positionable element (or vice versa). The new rule is
governed by the same cascading rules as all style sheet rules (that
includes the rule's source code position among other
rules with the same selector). Therefore, a new rule in a
<span class="literal">styleSheet</span> object does not supersede a style set
in an element's <span class="literal">style</span> property.
Note that IE 5 for the Macintosh implements both the W3C DOM
<span class="literal">insertRule( )</span> and Microsoft <span class="literal">addRule(
)</span> methods to accomplish the same result.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="parameters"><span class="title">Parameters</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<ul><li><span class="literal"></span>The entire style rule selector as a string in exactly the same format
as assigned in a style element: <span class="replaceable">selector</span>
<span class="literal">{</span><span class="replaceable">attribute</span><span class="literal">:</span><span class="replaceable">value</span><span class="literal">;</span>
<span class="replaceable">attribute</span><span class="literal">:</span><span class="replaceable">value</span><span class="literal">;</span>...<span class="literal">}</span>.
</li><li><span class="literal"></span>Zero-based integer indicating where in the
<span class="literal">cssRules</span> collection the new rule should be placed.
</li></ul>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="returnedvalue"><span class="title">Returned Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Integer of the index location of the new rule.</p>
					</td>
				</tr>
			</table>
		</div><div id="removeRule( )">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">removeRule( )</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">n/a</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">n/a</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">removeRule(<span class="replaceable">index</span>)</p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Removes a rule from the <span class="literal">styleSheet</span> object. The
integer index parameter value points to the zero-based item in the
<span class="literal">rules</span> array to delete.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="parameters"><span class="title">Parameters</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<ul><li><span class="literal"></span>A zero-based integer indicating which rule in the
<span class="literal">rules</span> collection is to be deleted.
</li></ul>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="returnedvalue"><span class="title">Returned Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			None.</p>
					</td>
				</tr>
			</table>
		</div>

</body>
</html>