document.write('<div class="css" style="font-family: monospace;"><br />');
document.write('<span style="color: #cc00cc;">#navbar <span style="color: #66cc66;">&#123;</span></span><br />');
document.write('&nbsp; <span style="color: #000000; font-weight: bold;">border</span>: 1px <span style="color: #993333;">solid</span> <span style="color: #000000; font-weight: bold;">black</span>;<br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('#navbar h2 <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; <span style="color: #000000; font-weight: bold;">background-color</span>: <span style="color: #000000; font-weight: bold;">black</span>;<br />');
document.write('&nbsp; <span style="color: #000000; font-weight: bold;">color</span>: <span style="color: #993333;">white</span>;<br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('#navbar li <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; <span style="color: #000000; font-weight: bold;">float</span>: <span style="color: #000000; font-weight: bold;">left</span>;<br />');
document.write('&nbsp; <span style="color: #000000; font-weight: bold;">width</span>: 100px;<br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp;</div><div class="css" style="font-family: monospace;"><br />');
document.write('<span style="color: #cc00cc;">#navbar <span style="color: #66cc66;">&#123;</span></span><br />');
document.write('&nbsp; <span style="color: #000000; font-weight: bold;">border</span>: 1px <span style="color: #993333;">solid</span> <span style="color: #000000; font-weight: bold;">black</span>;<br />');
document.write('&nbsp; <br />');
document.write('&nbsp; //Applies to h2s within the navbar<br />');
document.write('&nbsp; h2 <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background-color</span>: <span style="color: #000000; font-weight: bold;">black</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">color</span>: <span style="color: #993333;">white</span>;<br />');
document.write('&nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; li <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">float</span>: <span style="color: #000000; font-weight: bold;">left</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span>: 100px;<br />');
document.write('&nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp;</div><div class="php" style="font-family: monospace;"><br />');
document.write('<span style="color: #808080; font-style: italic;">/**<br />');
document.write('&nbsp;* Renders a snippet of CSS<br />');
document.write('&nbsp;*<br />');
document.write('&nbsp;* @param string $cssText<br />');
document.write('&nbsp;* @return string<br />');
document.write('&nbsp;*/</span><br />');
document.write('<span style="color: #000000; font-weight: bold;">function</span> renderCSS<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cssText</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$data</span> = <a target="_blank"&nbsp; href="http://www.php.net/preg_replace"><span style="color: #000066;">preg_replace</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'/(<span style="color: #000099; font-weight: bold;">\/</span><span style="color: #000099; font-weight: bold;">\/</span>.*<span style="color: #000099; font-weight: bold;">\n</span>)/\'</span>,<span style="color: #ff0000;">&quot;&quot;</span>,<span style="color: #0000ff;">$cssText</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// remove single line comments, like this, from // to \\n</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$data</span> = <a target="_blank"&nbsp; href="http://www.php.net/preg_replace"><span style="color: #000066;">preg_replace</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'/(<span style="color: #000099; font-weight: bold;">\t</span>|<span style="color: #000099; font-weight: bold;">\r</span>|<span style="color: #000099; font-weight: bold;">\n</span>)/\'</span>,<span style="color: #ff0000;">&quot;&quot;</span>,<span style="color: #0000ff;">$data</span><span style="color: #66cc66;">&#41;</span>;&nbsp; <span style="color: #808080; font-style: italic;">// remove new lines \\n, tabs and \\r</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$data</span> = <a target="_blank"&nbsp; href="http://www.php.net/preg_replace"><span style="color: #000066;">preg_replace</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'/(<span style="color: #000099; font-weight: bold;">\/</span><span style="color: #000099; font-weight: bold;">\*</span>[^*]*<span style="color: #000099; font-weight: bold;">\*</span><span style="color: #000099; font-weight: bold;">\/</span>)/\'</span>,<span style="color: #ff0000;">\'\'</span>,<span style="color: #0000ff;">$data</span><span style="color: #66cc66;">&#41;</span>;&nbsp; <span style="color: #808080; font-style: italic;">// remove multi-line comments /* */</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$data</span> = <a target="_blank"&nbsp; href="http://www.php.net/preg_replace"><span style="color: #000066;">preg_replace</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'/(<span style="color: #000099; font-weight: bold;">\/</span><span style="color: #000099; font-weight: bold;">\*</span>[^<span style="color: #000099; font-weight: bold;">\/</span>]*<span style="color: #000099; font-weight: bold;">\*</span><span style="color: #000099; font-weight: bold;">\/</span>)/\'</span>,<span style="color: #ff0000;">\'\'</span>,<span style="color: #0000ff;">$data</span><span style="color: #66cc66;">&#41;</span>;&nbsp; <span style="color: #808080; font-style: italic;">// remove multi-line comments /* */</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$data</span> = <a target="_blank"&nbsp; href="http://www.php.net/preg_replace"><span style="color: #000066;">preg_replace</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'/(<span style="color: #000099; font-weight: bold;">\s</span>+)/\'</span>, <span style="color: #ff0000;">\' \'</span>,<span style="color: #0000ff;">$data</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// replace multi spaces with singles</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$data</span> = fixNesting<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$data</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$data</span> = <a target="_blank"&nbsp; href="http://www.php.net/preg_replace"><span style="color: #000066;">preg_replace</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'/[^}{]+{<span style="color: #000099; font-weight: bold;">\s</span>?}/\'</span>, <span style="color: #ff0000;">\'\'</span>, <span style="color: #0000ff;">$data</span><span style="color: #66cc66;">&#41;</span>;&nbsp; <span style="color: #808080; font-style: italic;">//Remove empty rules</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$data</span> = <a target="_blank"&nbsp; href="http://www.php.net/preg_replace"><span style="color: #000066;">preg_replace</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'/<span style="color: #000099; font-weight: bold;">\s</span>*{<span style="color: #000099; font-weight: bold;">\s</span>*/\'</span>, <span style="color: #ff0000;">&quot;{&quot;</span>, <span style="color: #0000ff;">$data</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$data</span> = <a target="_blank"&nbsp; href="http://www.php.net/preg_replace"><span style="color: #000066;">preg_replace</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'/<span style="color: #000099; font-weight: bold;">\s</span>*}<span style="color: #000099; font-weight: bold;">\s</span>*/\'</span>, <span style="color: #ff0000;">&quot;}&quot;</span>, <span style="color: #0000ff;">$data</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$data</span> = <a target="_blank"&nbsp; href="http://www.php.net/preg_replace"><span style="color: #000066;">preg_replace</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'/}/\'</span>, <span style="color: #ff0000;">&quot;}<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>, <span style="color: #0000ff;">$data</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$data</span>;<br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<span style="color: #808080; font-style: italic;">// Helper callback function for fixNesting (below)</span><br />');
document.write('<span style="color: #000000; font-weight: bold;">function</span> fixNesting_buildSelector<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$outer</span>, <span style="color: #0000ff;">$inner</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$outerPieces</span> = <a target="_blank"&nbsp; href="http://www.php.net/split"><span style="color: #000066;">split</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;,&quot;</span>, <span style="color: #0000ff;">$outer</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.php.net/trim"><span style="color: #000066;">trim</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$inner</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #ff0000;">&quot;IEHACK&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$outerPieces</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$o</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$resultPieces</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">&quot;* html &quot;</span> . <span style="color: #0000ff;">$o</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$innerPieces</span> = <a target="_blank"&nbsp; href="http://www.php.net/split"><span style="color: #000066;">split</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;,&quot;</span>, <span style="color: #0000ff;">$inner</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$resultPieces</span> = <a target="_blank"&nbsp; href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$outerPieces</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$o</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$innerPieces</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$i</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$resultPieces</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #0000ff;">$o</span> . <span style="color: #ff0000;">&quot; &quot;</span> . <span style="color: #0000ff;">$i</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <a target="_blank"&nbsp; href="http://www.php.net/join"><span style="color: #000066;">join</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;,&quot;</span>, <span style="color: #0000ff;">$resultPieces</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<br />');
document.write('<span style="color: #808080; font-style: italic;">// Helper callback function for fixNesting (below)</span><br />');
document.write('<span style="color: #000000; font-weight: bold;">function</span> fixNesting_selector<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$selectors</span>, <span style="color: #0000ff;">$depth</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$newSelector</span> = <span style="color: #0000ff;">$selectors</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$j</span> = <span style="color: #cc66cc;">1</span>;<span style="color: #0000ff;">$j</span>&lt;<span style="color: #0000ff;">$depth</span>; <span style="color: #0000ff;">$j</span>++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$newSelector</span> = fixNesting_buildSelector<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$newSelector</span>, <span style="color: #0000ff;">$selectors</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$j</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span>&nbsp; <span style="color: #0000ff;">$newSelector</span>;<br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<span style="color: #000000; font-weight: bold;">function</span> fixNesting<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cssText</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$result</span> = <a target="_blank"&nbsp; href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$pieces</span> = <a target="_blank"&nbsp; href="http://www.php.net/split"><span style="color: #000066;">split</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;{&quot;</span>, <span style="color: #0000ff;">$cssText</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$selectorStackIndex</span> = <span style="color: #cc66cc;">0</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$selectorStack</span> = <a target="_blank"&nbsp; href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$currentPieceIndex</span> = <span style="color: #cc66cc;">0</span>;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$i</span> = <span style="color: #cc66cc;">0</span>; <span style="color: #0000ff;">$i</span>&lt;count<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$pieces</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #0000ff;">$i</span>++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$piece</span> = <span style="color: #0000ff;">$pieces</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$closeBracketPos</span> = <a target="_blank"&nbsp; href="http://www.php.net/strpos"><span style="color: #000066;">strpos</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$piece</span>, <span style="color: #ff0000;">&quot;}&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> !== <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$closeBracketPos</span> &gt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$result</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> = <a target="_blank"&nbsp; href="http://www.php.net/substr"><span style="color: #000066;">substr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$piece</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #0000ff;">$closeBracketPos</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$result</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">&quot;}&quot;</span>;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$selectorStackIndex</span>--;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$selectorStackIndex</span> &gt; <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$result</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> = fixNesting_selector<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$selectorStack</span>, <span style="color: #0000ff;">$selectorStackIndex</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$result</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">&quot;{&quot;</span>;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$piece</span> = <a target="_blank"&nbsp; href="http://www.php.net/substr"><span style="color: #000066;">substr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$piece</span>, <span style="color: #0000ff;">$closeBracketPos</span><span style="color: #cc66cc;">+1</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.php.net/trim"><span style="color: #000066;">trim</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$piece</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #ff0000;">\'\'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">continue</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Inner Rule</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$endOfLastProperty</span> = <a target="_blank"&nbsp; href="http://www.php.net/strrpos"><span style="color: #000066;">strrpos</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$piece</span>, <span style="color: #ff0000;">&quot;;&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$endOfLastProperty</span> !== <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$result</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> = <a target="_blank"&nbsp; href="http://www.php.net/substr"><span style="color: #000066;">substr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$piece</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #0000ff;">$endOfLastProperty</span><span style="color: #cc66cc;">+1</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$piece</span> = <a target="_blank"&nbsp; href="http://www.php.net/substr"><span style="color: #000066;">substr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$piece</span>, <span style="color: #0000ff;">$endOfLastProperty</span><span style="color: #cc66cc;">+1</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$selectorStackIndex</span> &gt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$result</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">&quot;}&quot;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Whole piece is the selector</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$selector</span> = <span style="color: #0000ff;">$piece</span>;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$selectorStack</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$selectorStackIndex</span>++<span style="color: #66cc66;">&#93;</span> = <span style="color: #0000ff;">$selector</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$result</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> = fixNesting_selector<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$selectorStack</span>, <span style="color: #0000ff;">$selectorStackIndex</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$result</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">\'{\'</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$result</span> = <a target="_blank"&nbsp; href="http://www.php.net/join"><span style="color: #000066;">join</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$result</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$result</span>;<br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp;</div>');
document.write('<br />&nbsp;<br /><div style="font-size: 12px">Brought to you by the community at <a href="http://www.bytemycode.com/snippets/snippet/633/1/" target="_blank">byteMyCode</a>.</div>');
