Javascript, target.id and event.srcElement.id
<p>i am trying to understand part of javascript code is refer to the code is:<a href="http://jsfiddle.net/xHue9/1/" rel="nofollow">Link</a>, now there is 2 more css files the first contain(sansStyle.css):</p>

<pre><code>body, p, td, ol, ul, select, span, div, input {
    font: .9em/1.1em verdana, geneva, arial, helvetica, sans-serif;
}
</code></pre>

<p>the second contain(serifStyle.css):</p>

<pre><code>  body, p, td, ol, ul, select, span, div, input {
        font: 1.1em/1.2em Times New Roman, Times, serif;
    }
</code></pre>

<p>my problem is only at a small part at the javascript code that i dont understand, if you take a look at the link and at the javascript part the is:</p>

<pre><code>if (inVal) {
        if (typeof inVal == "string") {
            title = inVal;
        }
        else {
            title = inVal.target.id;
        }
    }
    else {
        title = window.event.srcElement.id;
    }
</code></pre>

<p>now i do understand that we refer at the else to the id becouse it got the same value as the title value we need, but the problem is that if its not a string so what is it? and how does it get for example inVal.target.id what is inVal.target is?, and about the window event.srcElement.id what event is it? if can some one please help me understand thoes two i will be very thankful.</p>
