<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>Christina's Notes</title>
	<atom:link href="http://christina.schelin.org/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://christina.schelin.org/blog</link>
	<description>An overblown scratchpad.</description>
	<pubDate>Tue, 24 Mar 2009 06:41:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Blogger and numbered comments.</title>
		<link>http://christina.schelin.org/blog/?p=59</link>
		<comments>http://christina.schelin.org/blog/?p=59#comments</comments>
		<pubDate>Tue, 24 Mar 2009 06:34:11 +0000</pubDate>
		<dc:creator>christina</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[blogger]]></category>

		<category><![CDATA[comments]]></category>

		<category><![CDATA[internet explorer]]></category>

		<guid isPermaLink="false">http://christina.schelin.org/blog/?p=59</guid>
		<description><![CDATA[Another one of those things I stash here for future use.  This one is about how to have Blogger&#039;s comments be numbered.  Ease of reference, and all.
The source for the good numberedness code is Fernandooo1 at Quite Random.  Reproducing here for my stashliness.  Also to show a few amendments, and to rail about Internet Explorer [...]]]></description>
			<content:encoded><![CDATA[<p>Another one of those things I stash here for future use.  This one is about how to have Blogger&#039;s comments be numbered.  Ease of reference, and all.</p>
<p>The source for the good numberedness code is <a href="http://blog.randomnessf1.com/2008/08/translation-numbering-comments.html">Fernandooo1 at Quite Random</a>.  Reproducing here for my stashliness.  Also to show a few amendments, and to rail about Internet Explorer failing.</p>
<p>First, the code.  If you know Javascript at all, it&#039;s actually wicked easy - declare a counting variable just before the comment starts, then increment and print.</p>
<pre>&lt;b:includable id='comments' var='post'&gt;

[...]

&lt;dl id='comments-block'&gt;

<span style="color: #000099;">&lt;script type='text/javascript'&gt;var CommentsCounter = 0;&lt;/script&gt;</span>

&lt;b:loop values='data:post.comments' var='comment'&gt;

&lt;dt <span style="color: #000099;">style='clear: both;'</span> class='comment-author' expr:id='"comment-" + data:comment.id'&gt;
&lt;a expr:name='"comment-" + data:comment.id'/&gt;

<span style="color: #000099;">&lt;span class='numberingcomments'&gt;
&lt;a expr:href='data:comment.url' title='Comment Link'&gt;
&lt;script type='text/javascript'&gt;
CommentsCounter++;
document.write('#' + CommentsCounter + ': ');
&lt;/script&gt;
&lt;/a&gt;
&lt;/span&gt;</span>

&lt;b:if cond='data:comment.authorUrl'&gt;
&lt;a expr:href='data:comment.authorUrl' rel='nofollow'&gt;
&lt;data:comment.author/&gt;
&lt;/a&gt;
&lt;b:else/&gt;
&lt;data:comment.author/&gt;
&lt;/b:if&gt;
&lt;data:commentPostedByMsg/&gt;
&lt;/dt&gt;

&lt;dd class='comment-body'&gt;
[...]
&lt;/dd&gt;

&lt;/b:loop&gt;
&lt;/dl&gt;</pre>
<p>In the CSS block at the top, style .numberingcomments however you like.</p>
<p>This is slightly different from the original code at Quite Random, primarily in that I did not want the number off to the right.  It currently displays as image, number#, author.</p>
<p>What I wanted was to change the dl/dt/dd stuff to ol/li/p stuff.  However, it seems that Internet Explorer has a little <a href="http://reference.sitepoint.com/css/haslayout">hasLayout issue</a>.  When I changed the tags as noted just now, the icons (for anonymous, OpenID, Blogger, &amp;c) would be vertically aligned to the middle, rather than the top, and no numbers would appear.</p>
<p>If I can figure out how to get around that for Internet Explorer, I will absolutely post that here.  I&#039;ve nothing against Javascript, I just prefer simpler solutions.</p>
]]></content:encoded>
			<wfw:commentRss>http://christina.schelin.org/blog/?feed=rss2&amp;p=59</wfw:commentRss>
		</item>
		<item>
		<title>Blogger and &#034;lj-cuts&#034;.</title>
		<link>http://christina.schelin.org/blog/?p=55</link>
		<comments>http://christina.schelin.org/blog/?p=55#comments</comments>
		<pubDate>Tue, 24 Mar 2009 06:14:57 +0000</pubDate>
		<dc:creator>christina</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[blogger]]></category>

		<category><![CDATA[livejournal]]></category>

		<guid isPermaLink="false">http://christina.schelin.org/blog/?p=55</guid>
		<description><![CDATA[Everybody and their third biologically-related familial unit has posted something like this.  I put it here because I don&#039;t feel like reading everybody&#039;s &#38;c posts to find the one that has everything I want.  Plus, I don&#039;t trust (a) my memory (b) the internet.  I want to always be able to find it.
Which is almost [...]]]></description>
			<content:encoded><![CDATA[<p>Everybody and their third biologically-related familial unit has posted something like this.  I put it here because I don&#039;t feel like reading everybody&#039;s &amp;c posts to find the one that has everything I want.  Plus, I don&#039;t trust (a) my memory (b) the internet.  I want to always be able to find it.</p>
<p>Which is almost entirely why I post here, come to think of it.</p>
<p>Basically, Blogger has no &#034;more&#034; or &#034;lj-cut&#034; functionality.  You can get a start, sort of, with Blogger&#039;s <a href="http://help.blogger.com/bin/answer.py?hl=en&amp;answer=42215">help files</a>, but they&#039;re (a) not that fleshed out and (b) not that good.</p>
<p>First, don&#039;t use a classic template, use one of the newer ones.  I did not work with a classic template, so I don&#039;t know.  Information primarily culled from <a href="http://coderstalk.blogspot.com/2008/06/how-to-create-expandable-post-summaries.html">here</a>.</p>
<ol>
<li>Edit the HTML, and expand the widget templates.</li>
<li>At the top, look for the &lt;b:skin&gt; tag.  It&#039;s near the giant &#034;This is what template this is&#034; box.  Just before that, put this code:<br />
<span class="fullpost"></p>
<pre id="blogcode">&lt;style&gt;
&lt;b:if cond='data:blog.pageType == &amp;quot;item&amp;quot;'&gt;
   div.fullpost {display:inline;}
&lt;b:else/&gt;
   div.fullpost {display:none;}
&lt;/b:if&gt;
&lt;/style&gt;</pre>
<p></span></li>
<li>Search for &lt;data:post.body&gt;.  Put this in just after:
<pre id="blogcode">&lt;b:if cond='data:blog.pageType != &amp;quot;item&amp;quot;'&gt;
   &lt;b:if cond='data:post.labels'&gt;
      &lt;b:loop values='data:post.labels' var='label'&gt;
         &lt;b:if cond='data:label.name == &amp;quot;<span style="color: #000080;">more</span>&amp;quot;'&gt;
            &lt;a expr:href='data:post.url'&gt;...&lt;b&gt;Read more&lt;/b&gt;&lt;/a&gt;
         &lt;/b:if&gt;
      &lt;/b:loop&gt;
   &lt;/b:if&gt;
&lt;/b:if&gt;</pre>
</li>
<li>Change that &#034;more&#034; to the text you want.</li>
</ol>
<p>You&#039;re done!  To make the cut:</p>
<pre>Outside text.
&lt;div class="fullpost"&gt;Inside text.&lt;/div&gt;</pre>
<p>Ah, Blogger.  As a friend said, aren&#039;t you supposed to <em>copy</em> successful technology?</p>
]]></content:encoded>
			<wfw:commentRss>http://christina.schelin.org/blog/?feed=rss2&amp;p=55</wfw:commentRss>
		</item>
		<item>
		<title>Toggle display snippet.</title>
		<link>http://christina.schelin.org/blog/?p=48</link>
		<comments>http://christina.schelin.org/blog/?p=48#comments</comments>
		<pubDate>Sun, 16 Nov 2008 00:39:16 +0000</pubDate>
		<dc:creator>christina</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://christina.schelin.org/blog/?p=48</guid>
		<description><![CDATA[Mostly for me at work.

&#60;script language="javascript"&#62;
function toggleDisplay(det, des, show, hide) {
    if (det.style.display != 'none') {
        det.style.display = 'none';
        des.innerHTML = show;
    } else {
        det.style.display = 'block';
        des.innerHTML = hide;
    }
}
&#60;/script&#62;
&#60;p&#62;&#60;a href="javascript:void(null);" onclick="toggleDisplay(document.getElementById('details'), this, 'Show &#38;#9660;', 'Hide &#38;#9650;');"&#62;Hide &#38;#9650;&#60;/a&#62;&#60;/p&#62;
&#60;div id="details"&#62;Test.&#60;/div&#62;
]]></description>
			<content:encoded><![CDATA[<p>Mostly for me at work.</p>
<p><span id="more-48"></span></p>
<pre>&lt;script language="javascript"&gt;
function toggleDisplay(det, des, show, hide) {
    if (det.style.display != 'none') {
        det.style.display = 'none';
        des.innerHTML = show;
    } else {
        det.style.display = 'block';
        des.innerHTML = hide;
    }
}
&lt;/script&gt;</pre>
<p><code>&lt;p&gt;&lt;a href="javascript:void(null);" onclick="toggleDisplay(document.getElementById('details'), this, 'Show &amp;#9660;', 'Hide &amp;#9650;');"&gt;Hide &amp;#9650;&lt;/a&gt;&lt;/p&gt;</code></p>
<p><code>&lt;div id="details"&gt;Test.&lt;/div&gt;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://christina.schelin.org/blog/?feed=rss2&amp;p=48</wfw:commentRss>
		</item>
		<item>
		<title>Field validator.</title>
		<link>http://christina.schelin.org/blog/?p=37</link>
		<comments>http://christina.schelin.org/blog/?p=37#comments</comments>
		<pubDate>Wed, 12 Nov 2008 19:00:19 +0000</pubDate>
		<dc:creator>christina</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://christina.schelin.org/blog/?p=37</guid>
		<description><![CDATA[Everyone and their cousin has one.  I am myself and have my own.  I note that I don&#039;t deal with international addresses at my place of business.

// Check the phone.
function pcheck (str) {
    var patt = /[0-9 \-\(\)]/gi;
    var cdig = 0;
    for (var [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone and their cousin has one.  I am myself and have my own.  I note that I don&#039;t deal with international addresses at my place of business.</p>
<p><span id="more-37"></span></p>
<pre><span style="color: green;">// Check the phone.</span>
<span style="color: #000099;">function</span> pcheck <span style="color: #cc0000;">(</span>str<span style="color: #cc0000;">) {</span>
    <span style="color: #000099;">var</span> patt<span style="color: #7f7f7f;"> = </span>/<span style="color: #cc0000;">[</span>0-9 \-\<span style="color: #cc0000;">(</span>\<span style="color: #cc0000;">)]</span>/gi;
    <span style="color: #000099;">var</span> cdig<span style="color: #7f7f7f;"> = </span>0;
    <span style="color: #000099;">for</span> <span style="color: #cc0000;">(</span><span style="color: #000099;">var</span> x<span style="color: #7f7f7f;"> = </span>0; x<span style="color: #7f7f7f;"> &lt; </span>str.<span style="color: #000099;">length</span>; x<span style="color: #7f7f7f;">++</span><span style="color: #cc0000;">) {</span>
        <span style="color: #000099;">if</span><span style="color: #000099;"> </span><span style="color: #cc0000;">(</span>str.<span style="color: #000099;">substr</span><span style="color: #cc0000;">(</span>x, 1<span style="color: #cc0000;">)</span>.<span style="color: #000099;">match</span><span style="color: #cc0000;">(</span>patt<span style="color: #cc0000;">)</span><span style="color: #7f7f7f;"> == </span><span style="color: blue;">null</span><span style="color: #cc0000;">) {</span>
            <span style="color: #000099;">return</span> <span style="color: blue;">false</span>;
        <span style="color: #cc0000;">}</span>
<span style="color: green;">// Is it a digit?</span>
        <span style="color: #000099;">if</span><span style="color: #000099;"> </span><span style="color: #cc0000;">(</span>str.<span style="color: #000099;">substr</span><span style="color: #cc0000;">(</span>x, 1<span style="color: #cc0000;">)</span>.<span style="color: #000099;">match</span><span style="color: #cc0000;">(</span>/<span style="color: #cc0000;">[</span>0-9<span style="color: #cc0000;">]</span>/<span style="color: #cc0000;">)</span><span style="color: #7f7f7f;"> != </span><span style="color: blue;">null</span><span style="color: #cc0000;">) {</span>
            cdig<span style="color: #7f7f7f;">++</span>;
        <span style="color: #cc0000;">}</span>
    <span style="color: #cc0000;">}</span></pre>
<pre><span style="color: green;">// If there are fewer than 10 digits...</span>
    <span style="color: #000099;">if</span> <span style="color: #cc0000;">(</span>cdig<span style="color: #7f7f7f;"> &lt; </span>10<span style="color: #cc0000;">) {</span>
        <span style="color: #000099;">return</span> <span style="color: blue;">false</span>;
    <span style="color: #cc0000;">}</span>
    <span style="color: #000099;">return</span> <span style="color: blue;">true</span>;
<span style="color: #cc0000;">}</span></pre>
<pre><span style="color: green;">// Check the email.</span>
<span style="color: #000099;">function</span> echeck<span style="color: #cc0000;">(</span>str<span style="color: #cc0000;">) {</span>
    <span style="color: #000099;">var</span> at<span style="color: #7f7f7f;"> = </span><span style="color: #548dd4;">"@"</span>;
    <span style="color: #000099;">var</span> dot<span style="color: #7f7f7f;"> = </span><span style="color: #548dd4;">"."</span>;
    <span style="color: #000099;">var</span> lat<span style="color: #7f7f7f;"> = </span>str.<span style="color: #000099;">indexOf</span><span style="color: #cc0000;">(</span>at<span style="color: #cc0000;">)</span>;
    <span style="color: #000099;">var</span> lstr<span style="color: #7f7f7f;"> = </span>str.<span style="color: #000099;">length</span>;
    <span style="color: #000099;">var</span> ldot<span style="color: #7f7f7f;"> = </span>str.<span style="color: #000099;">indexOf</span><span style="color: #cc0000;">(</span>dot<span style="color: #cc0000;">)</span>;
    <span style="color: #000099;">var</span> patt<span style="color: #7f7f7f;"> = </span>/<span style="color: #cc0000;">[</span>a-z0-9.+@<span style="color: #cc0000;">]</span>/gi;
    <span style="color: #000099;">var</span> cat<span style="color: #7f7f7f;"> = </span>str.<span style="color: #000099;">split</span><span style="color: #cc0000;">(</span>at<span style="color: #cc0000;">)</span>;</pre>
<pre><span style="color: green;">// Invalid characters.</span>
    <span style="color: #000099;">for</span> <span style="color: #cc0000;">(</span><span style="color: #000099;">var</span> x<span style="color: #7f7f7f;"> = </span>0; x<span style="color: #7f7f7f;"> &lt; </span>str.<span style="color: #000099;">length</span>; x<span style="color: #7f7f7f;">++</span><span style="color: #cc0000;">)</span> <span style="color: #cc0000;">{</span>
        <span style="color: #000099;">if</span><span style="color: #000099;"> </span><span style="color: #cc0000;">(</span>str.<span style="color: #000099;">substr</span><span style="color: #cc0000;">(</span>x, 1<span style="color: #cc0000;">)</span>.<span style="color: #000099;">match</span><span style="color: #cc0000;">(</span>patt<span style="color: #cc0000;">)</span><span style="color: #7f7f7f;"> == </span><span style="color: blue;">null</span><span style="color: #cc0000;">) {</span>
            <span style="color: #000099;">return</span> <span style="color: blue;">false</span>;
        <span style="color: #cc0000;">}</span>
    <span style="color: #cc0000;">}</span></pre>
<pre><span style="color: green;">// If there's no @, or it's at the beginning or end, or there're too many @s.</span>
    <span style="color: #000099;">if</span> <span style="color: #cc0000;">(</span>cat.<span style="color: #000099;">length</span><span style="color: #7f7f7f;"> != </span>2<span style="color: #7f7f7f;"> || </span>lat<span style="color: #7f7f7f;"> &lt;= </span>0<span style="color: #7f7f7f;"> || </span>lat &gt;= lstr <span style="color: #7f7f7f;">-</span> 2<span style="color: #cc0000;">) {</span>
        <span style="color: #000099;">return</span> <span style="color: blue;">false</span>;
    <span style="color: #cc0000;">}</span></pre>
<pre><span style="color: green;">// If the . isn't there, or is at the very beginning or end.</span>
    <span style="color: #000099;">if</span> <span style="color: #cc0000;">(</span>ldot<span style="color: #7f7f7f;"> &lt;= </span>0<span style="color: #7f7f7f;"> || </span>ldot<span style="color: #7f7f7f;"> == </span>lstr <span style="color: #7f7f7f;">-</span> 1<span style="color: #cc0000;">) {</span>
        <span style="color: #000099;">return</span> <span style="color: blue;">false</span>;
    <span style="color: #cc0000;">}</span></pre>
<pre><span style="color: green;">// If there's no . after @.</span>
    <span style="color: #000099;">if</span> <span style="color: #cc0000;">(</span>ldot<span style="color: #7f7f7f;"> &gt; </span>0<span style="color: #7f7f7f;"> &amp;&amp; </span>lat<span style="color: #7f7f7f;"> &gt; </span>0<span style="color: #7f7f7f;"> &amp;&amp; </span>str.<span style="color: #000099;">indexOf</span><span style="color: #cc0000;">(</span>dot, lat<span style="color: #7f7f7f;"> + </span>1<span style="color: #cc0000;">)</span><span style="color: #7f7f7f;"> == </span>-1<span style="color: #cc0000;">) {</span>
        <span style="color: #000099;">return</span> <span style="color: blue;">false</span>;
    <span style="color: #cc0000;">}</span></pre>
<pre>    <span style="color: #000099;">return</span> <span style="color: blue;">true</span>;
<span style="color: #cc0000;">}</span></pre>
<pre><span style="color: green;">// Check the name.</span>
<span style="color: #000099;">function</span> ncheck<span style="color: #cc0000;">(</span>str<span style="color: #cc0000;">) {</span>
    <span style="color: #000099;">var</span> patt <span style="color: #7f7f7f;"> = </span>/<span style="color: #cc0000;">[</span>a-z ',.<span style="color: #cc0000;">]</span>/gi;
    <span style="color: #000099;">for</span> <span style="color: #cc0000;">(</span><span style="color: #000099;">var</span> x<span style="color: #7f7f7f;"> = </span>0; x<span style="color: #7f7f7f;"> &lt; </span>str.<span style="color: #000099;">length</span>; x<span style="color: #7f7f7f;">++</span><span style="color: #cc0000;">) {</span>
        <span style="color: #000099;">if</span><span style="color: #000099;"> </span><span style="color: #cc0000;">(</span>str.<span style="color: #000099;">substr</span><span style="color: #cc0000;">(</span>x, 1<span style="color: #cc0000;">)</span>.<span style="color: #000099;">match</span><span style="color: #cc0000;">(</span>patt<span style="color: #cc0000;">)</span><span style="color: #7f7f7f;"> == </span><span style="color: blue;">null</span><span style="color: #cc0000;">) {</span>
            <span style="color: #000099;">alert</span><span style="color: #cc0000;">(</span><span style="color: #548dd4;">"Please enter a valid name."</span><span style="color: #cc0000;">)</span>;
            <span style="color: #000099;">return</span> <span style="color: blue;">false</span>;
        <span style="color: #cc0000;">}</span>
    <span style="color: #cc0000;">}</span>
    <span style="color: #000099;">return</span> <span style="color: blue;">true</span>;
<span style="color: #cc0000;">}</span></pre>
<pre><span style="color: green;">// The main thing.</span>
<span style="color: #000099;">function</span> ValidateForm<span style="color: #cc0000;">(){</span>
<span style="color: green;">// Declarify.</span>
    <span style="color: #000099;">var</span> txtPhone<span style="color: #7f7f7f;"> = </span><span style="color: #000099;">document</span>.diagForm.txtPhone;
    <span style="color: #000099;">var</span> txtEmail<span style="color: #7f7f7f;"> = </span><span style="color: #000099;">document</span>.diagForm.txtEmail;
    <span style="color: #000099;">var</span> txtName<span style="color: #7f7f7f;"> = </span><span style="color: #000099;">document</span>.diagForm.txtName;</pre>
<pre><span style="color: green;">// Check if both email and phone are null.</span>
    <span style="color: #000099;">if</span> <span style="color: #cc0000;">((</span>txtPhone.<span style="color: #000099;">value</span><span style="color: #7f7f7f;"> == </span><span style="color: blue;">null</span><span style="color: #7f7f7f;"> || </span>txtPhone.<span style="color: #000099;">value</span><span style="color: #7f7f7f;"> == </span><span style="color: #548dd4;">""</span><span style="color: #cc0000;">)</span><span style="color: #7f7f7f;"> &amp;&amp; </span><span style="color: #cc0000;">(</span>txtEmail.<span style="color: #000099;">value</span><span style="color: #7f7f7f;"> == </span><span style="color: blue;">null</span><span style="color: #7f7f7f;"> || </span>txtEmail.<span style="color: #000099;">value</span><span style="color: #7f7f7f;"> == </span><span style="color: #548dd4;">""</span><span style="color: #cc0000;">)){</span>
        <span style="color: #000099;">alert</span><span style="color: #cc0000;">(</span><span style="color: #548dd4;">"Please enter a phone number or email address."</span><span style="color: #cc0000;">)</span>
        txtEmail.<span style="color: #000099;">focus</span><span style="color: #cc0000;">()</span>;
        <span style="color: #000099;">return</span> <span style="color: blue;">false</span>;
    <span style="color: #cc0000;">}</span></pre>
<pre><span style="color: green;">// Make sure the name is not null.</span>
    <span style="color: #000099;">if</span> <span style="color: #cc0000;">(</span>txtName.<span style="color: #000099;">value</span><span style="color: #7f7f7f;"> == </span><span style="color: blue;">null</span><span style="color: #7f7f7f;"> || </span>txtName.<span style="color: #000099;">value</span><span style="color: #7f7f7f;"> == </span><span style="color: #548dd4;">""</span><span style="color: #cc0000;">) {</span>
        <span style="color: #000099;">alert</span><span style="color: #cc0000;">(</span><span style="color: #548dd4;">"Please enter your name."</span><span style="color: #cc0000;">)</span>;
        txtName.<span style="color: #000099;">focus</span><span style="color: #cc0000;">()</span>;
        <span style="color: #000099;">return</span> <span style="color: blue;">false</span>;
    <span style="color: #cc0000;">}</span></pre>
<pre><span style="color: green;">// Now... verify fields.</span>
    <span style="color: #000099;">if</span> <span style="color: #cc0000;">(</span>pcheck<span style="color: #cc0000;">(</span>txtPhone.<span style="color: #000099;">value</span><span style="color: #cc0000;">)</span><span style="color: #7f7f7f;"> == </span><span style="color: blue;">false</span><span style="color: #7f7f7f;"> &amp;&amp; </span>txtPhone.<span style="color: #000099;">value</span><span style="color: #7f7f7f;"> != </span><span style="color: blue;">null</span><span style="color: #7f7f7f;"> &amp;&amp; </span>txtPhone.<span style="color: #000099;">value</span><span style="color: #7f7f7f;"> != </span><span style="color: #548dd4;">""</span><span style="color: #cc0000;">) {</span>
        <span style="color: #000099;">alert</span><span style="color: #cc0000;">(</span><span style="color: #548dd4;">"Please enter a valid phone number."</span><span style="color: #cc0000;">)</span>;
        txtPhone.<span style="color: #000099;">focus</span><span style="color: #cc0000;">()</span>;
        <span style="color: #000099;">return</span> <span style="color: blue;">false</span>;
    <span style="color: #cc0000;">}</span></pre>
<pre>    <span style="color: #000099;">if</span> <span style="color: #cc0000;">(</span>echeck<span style="color: #cc0000;">(</span>txtEmail.<span style="color: #000099;">value</span><span style="color: #cc0000;">)</span><span style="color: #7f7f7f;"> == </span><span style="color: blue;">false</span><span style="color: #7f7f7f;"> &amp;&amp; </span>txtEmail.<span style="color: #000099;">value</span><span style="color: #7f7f7f;"> != </span><span style="color: blue;">null</span><span style="color: #7f7f7f;"> &amp;&amp; </span>txtEmail.<span style="color: #000099;">value</span><span style="color: #7f7f7f;"> != </span><span style="color: #548dd4;">""</span><span style="color: #cc0000;">) {</span>
        <span style="color: #000099;">alert</span><span style="color: #cc0000;">(</span><span style="color: #548dd4;">"Please enter a valid email address."</span><span style="color: #cc0000;">)</span>;
        txtEmail.<span style="color: #000099;">focus</span><span style="color: #cc0000;">()</span>;
        <span style="color: #000099;">return</span> <span style="color: blue;">false</span>;
    <span style="color: #cc0000;">}</span></pre>
<pre>    <span style="color: #000099;">if</span> <span style="color: #cc0000;">(</span>ncheck<span style="color: #cc0000;">(</span>txtName.<span style="color: #000099;">value</span><span style="color: #cc0000;">)</span><span style="color: #7f7f7f;"> == </span><span style="color: blue;">false</span><span style="color: #cc0000;">) {</span>
        <span style="color: #000099;">alert</span><span style="color: #cc0000;">(</span><span style="color: #548dd4;">"Please enter a valid name."</span><span style="color: #cc0000;">)</span>;
        txtName.<span style="color: #000099;">focus</span><span style="color: #cc0000;">()</span>;
        <span style="color: #000099;">return</span> <span style="color: blue;">false</span>;
    <span style="color: #cc0000;">}</span></pre>
<pre>    <span style="color: #000099;">return</span> <span style="color: blue;">true</span>;
<span style="color: #cc0000;">}</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://christina.schelin.org/blog/?feed=rss2&amp;p=37</wfw:commentRss>
		</item>
		<item>
		<title>Livejournal - Format Light</title>
		<link>http://christina.schelin.org/blog/?p=34</link>
		<comments>http://christina.schelin.org/blog/?p=34#comments</comments>
		<pubDate>Tue, 11 Nov 2008 21:54:11 +0000</pubDate>
		<dc:creator>christina</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[livejournal]]></category>

		<guid isPermaLink="false">http://christina.schelin.org/blog/?p=34</guid>
		<description><![CDATA[I got tired of the format=light being able to be applied to any URL, and also continuing to append even if it&#039;s already there, so:
javascript:if(location.href.indexOf("format=light")==-1&#38;&#38;location.href.indexOf("livejournal.com")&#62;-1&#38;&#38;location.href.indexOf("html")&#62;-1){location.search+=(location.search?'&#038;':'?')+'format=light'}
(Updated to add a bit that requires &#039;html&#039; to be present.)
]]></description>
			<content:encoded><![CDATA[<p>I got tired of the format=light being able to be applied to any URL, and also continuing to append even if it&#039;s already there, so:</p>
<p><code>javascript:if(location.href.indexOf("format=light")==-1&amp;&amp;location.href.indexOf("livejournal.com")&gt;-1&amp;&amp;location.href.indexOf("html")&gt;-1){location.search+=(location.search?'&#038;':'?')+'format=light'}</code></p>
<p>(Updated to add a bit that requires &#039;html&#039; to be present.)</p>
]]></content:encoded>
			<wfw:commentRss>http://christina.schelin.org/blog/?feed=rss2&amp;p=34</wfw:commentRss>
		</item>
		<item>
		<title>Oo also.</title>
		<link>http://christina.schelin.org/blog/?p=32</link>
		<comments>http://christina.schelin.org/blog/?p=32#comments</comments>
		<pubDate>Fri, 07 Nov 2008 21:06:06 +0000</pubDate>
		<dc:creator>christina</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[mouse]]></category>

		<category><![CDATA[ubuntu]]></category>

		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://christina.schelin.org/blog/?p=32</guid>
		<description><![CDATA[How To Enable Mouse Wheel Scrolling in Ubuntu Hardy on VMware Fusion
]]></description>
			<content:encoded><![CDATA[<p><a href="http://peterc.org/2008/64-how-to-enable-vertical-mouse-wheel-scrolling-in-ubuntu-hardy-on-vmware-fusion.html">How To Enable Mouse Wheel Scrolling in Ubuntu Hardy on VMware Fusion</a></p>
]]></content:encoded>
			<wfw:commentRss>http://christina.schelin.org/blog/?feed=rss2&amp;p=32</wfw:commentRss>
		</item>
		<item>
		<title>Tag cloud foo.</title>
		<link>http://christina.schelin.org/blog/?p=30</link>
		<comments>http://christina.schelin.org/blog/?p=30#comments</comments>
		<pubDate>Fri, 07 Nov 2008 20:18:30 +0000</pubDate>
		<dc:creator>christina</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://christina.schelin.org/blog/?p=30</guid>
		<description><![CDATA[I hate tag clouds.  But I like the inline display.  So:
\wp-includes\category-template.php
At lines 342 and 372, change the numbers to what you want.
]]></description>
			<content:encoded><![CDATA[<p>I hate tag clouds.  But I like the inline display.  So:</p>
<p><code>\wp-includes\category-template.php</code></p>
<p>At lines 342 and 372, change the numbers to what you want.</p>
]]></content:encoded>
			<wfw:commentRss>http://christina.schelin.org/blog/?feed=rss2&amp;p=30</wfw:commentRss>
		</item>
		<item>
		<title>Ubuntu, VPN, and RDC.</title>
		<link>http://christina.schelin.org/blog/?p=28</link>
		<comments>http://christina.schelin.org/blog/?p=28#comments</comments>
		<pubDate>Fri, 07 Nov 2008 19:58:13 +0000</pubDate>
		<dc:creator>christina</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[cisco]]></category>

		<category><![CDATA[rdc]]></category>

		<category><![CDATA[rdp]]></category>

		<category><![CDATA[ubuntu]]></category>

		<category><![CDATA[vista]]></category>

		<category><![CDATA[vnc]]></category>

		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://christina.schelin.org/blog/?p=28</guid>
		<description><![CDATA[I prefer GUI over CLI for some things, so naturally someone will say &#034;Just go to Terminal and type blahdeeblah!&#034;.  Fie on them, I say.
The Cisco VPN client doesn&#039;t work with Vista Home 64-bit, and I already had a Ubuntu 8.04 virtual machine, so I set up a VPN thing there.  My steps:

Go to Applications [...]]]></description>
			<content:encoded><![CDATA[<p>I prefer GUI over CLI for some things, so naturally someone will say &#034;Just go to Terminal and type blahdeeblah!&#034;.  Fie on them, I say.</p>
<p>The Cisco VPN client doesn&#039;t work with Vista Home 64-bit, and I already had a Ubuntu 8.04 virtual machine, so I set up a VPN thing there.  My steps:</p>
<ul>
<li>Go to Applications &gt; Add/Remove and install &#034;VPN Connection Manager (vpnc)&#034; and &#034;Gnome-RDP&#034;.</li>
<li> Click on the network connection icon in the tray and select VPN Connections &gt; Configure VPN.</li>
<li> Choose Add:
<ul>
<li> Forward.</li>
<li> &#034;Compatible Cisco VPN client (vpnc)&#034;, forward.</li>
<li> Connection Name: A user-friendly name for the connection.</li>
<li> Gateway: The IP address your admin provides.</li>
<li> Group Name: The group name &amp;c.</li>
<li> In the Optional tab, click &#034;Override user name&#034;, and enter in your username.</li>
<li> Forward.</li>
<li> Click Apply, then Close.</li>
</ul>
</li>
</ul>
<p>To connect, click on the network connection icon again and select VPN Connections &gt; aitpdx webservers. The icon should change to a lock.</p>
<p>The steps to create and run a remote desktop session are remarkably similar to the steps when in Windows, so I won&#039;t recreate them here.</p>
]]></content:encoded>
			<wfw:commentRss>http://christina.schelin.org/blog/?feed=rss2&amp;p=28</wfw:commentRss>
		</item>
		<item>
		<title>PuTTY colours.</title>
		<link>http://christina.schelin.org/blog/?p=26</link>
		<comments>http://christina.schelin.org/blog/?p=26#comments</comments>
		<pubDate>Sun, 26 Oct 2008 05:29:36 +0000</pubDate>
		<dc:creator>christina</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[putty]]></category>

		<guid isPermaLink="false">http://christina.schelin.org/blog/?p=26</guid>
		<description><![CDATA[I never remember!  Argh!
Default Foreground: 0, 0, 0
Default Bold Foreground: 255, 255, 255
Default Background: 255, 255, 255
Default Bold Background: 0, 0, 0
Cursor Colour: 0, 0, 220
]]></description>
			<content:encoded><![CDATA[<p>I never remember!  Argh!</p>
<p>Default Foreground: 0, 0, 0<br />
Default Bold Foreground: 255, 255, 255<br />
Default Background: 255, 255, 255<br />
Default Bold Background: 0, 0, 0<br />
Cursor Colour: 0, 0, 220</p>
]]></content:encoded>
			<wfw:commentRss>http://christina.schelin.org/blog/?feed=rss2&amp;p=26</wfw:commentRss>
		</item>
		<item>
		<title>WP&#039;s RSS widget.</title>
		<link>http://christina.schelin.org/blog/?p=24</link>
		<comments>http://christina.schelin.org/blog/?p=24#comments</comments>
		<pubDate>Tue, 21 Oct 2008 21:59:55 +0000</pubDate>
		<dc:creator>christina</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[feeds]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[rss]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://christina.schelin.org/blog/?p=24</guid>
		<description><![CDATA[Elsewhere, I had an issue with using Wordpress&#039;s RSS widget with Google shared items - namely, it would put TitleTitle, for example.  This is because Google&#039;s .xml file was using &#039;title&#039; and &#039;link&#039; twice.
I found a fix for it elsewhere, so I&#039;ll summarise it here:
1. Open wp-includes/rss.php and go to line 46 or thereabouts.  [...]]]></description>
			<content:encoded><![CDATA[<p>Elsewhere, I had an issue with using Wordpress&#039;s RSS widget with Google shared items - namely, it would put TitleTitle, for example.  This is because Google&#039;s .xml file was using &#039;title&#039; and &#039;link&#039; twice.</p>
<p>I found a fix for it <a href="http://wordpress.org/support/topic/164824?replies=5">elsewhere</a>, so I&#039;ll summarise it here:</p>
<p>1. Open <code>wp-includes/rss.php</code> and go to line 46 or thereabouts.  Remove &#039;title&#039; from the CONTENT_CONSTRUCTS array.</p>
<p>2. Open <code>wp-includes/widgets.php</code> and look for the <code>wp_widget_rss_output</code> function - I found it at line 1094.  Within this code block, look for the following code and add the highlighted lines:</p>
<pre>foreach ($rss-&gt;items as $item ) {
             while ( strstr($item['link'], 'http') != $item['link'] ) {
                 $item['link'] = substr($item['link'], 1);
             }
<span style="color: blue;">             if($secondhttp = strpos($item['link'],'http',5)) {
                 $item['link'] = substr($item['link'],0,$secondhttp);
             }</span>
             $link = clean_url(strip_tags($item['link']));</pre>
]]></content:encoded>
			<wfw:commentRss>http://christina.schelin.org/blog/?feed=rss2&amp;p=24</wfw:commentRss>
		</item>
	</channel>
</rss>

