
var ySmileys = [
[/&gt;:\D&lt;/gi, 'big hug', "6"],
[/&gt;:\D\</gi, 'big hug', "6"],
[/\#\:\-S/gi, 'whew!', "18"],
[/&lt;\:\-P/gi, 'party', "36"],
[/\:\-SS/gi, 'nailbiting', "42"],
[/&lt;\)\:\)/gi, 'cowboy', "48"],
[/\:\-bd/gi, 'thumbs up', "http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/113.gif"],
[/\^\#\(\^/gi, 'it wasn\'t me', "http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/114.gif"],
[/\:ar\!/gi, 'pirate*', "http://l.yimg.com/a/i/us/msg/emoticons/pirate_2.gif"],
[/\:\-\?\?/gi, 'I don\'t know ', "106"],
[/3\:\-O/gi, 'cow', "50"],
[/\:\(\|\)/gi, 'monkey', "51"],
[/\@\}\;\-/gi, 'rose', "53"],
[/\*\*\=\=/gi, 'flag', "55"],
[/\(\~\~\)/gi, 'pumpkin', "56"],
[/\*\-\:\)/gi, 'idea', "58"],
[/\[\-O&lt;/gi, 'praying', "63"],
[/\:\)&gt;\-/gi, 'peace sign', "67"],
[/\\\:D\//gi, 'dancing', "69"],
[/\^\:\)\^/gi, 'not worthy', "77"],
[/\[\.\.\]/gi, 'transformer*', "http://l.yimg.com/a/i/us/msg/emoticons/transformer.gif"],
[/\;\;\)/gi, 'batting eyelashes', "5"],
[/\:\-\//gi, 'confused', "7"],
[/\:\"&gt;/gi, 'blushing', "9"],
[/\:\-\*/gi, 'kiss', "11"],
[/\=\(\(/gi, 'broken heart', "12"],
[/\:\-O/gi, 'surprise', "13"],
[/B\-\)/gi, 'cool', "16"],
[/\:\-S/gi, 'worried', "17"],
[/&gt;\:\)/gi, 'devil', "19"],
[/\:\(\(/gi, 'crying', "20"],
[/\:\)\)/gi, 'laughing', "21"],
[/\/\:\)/gi, 'raised eyebrow', "23"],
[/\=\)\)/gi, 'rolling on the floor', "24"],
[/O\:\)/gi, 'angel', "25"],
[/\:\-B/gi, 'nerd', "26"],
[/\:\-c/gi, 'call me ', "101"],
[/\:\)\]/gi, 'on the phone ', "100"],
[/\~X\(/gi, 'at wits\' end ', "102"],
[/\:\-h/gi, 'wave ', "103"],
[/\:\-t/gi, 'time out ', "104"],
[/8\-&gt;/gi, 'daydreaming ', "105"],
[/I\-\|/gi, 'sleepy', "28"],
[/8\-\|/gi, 'rolling eyes', "29"],
[/L\-\)/gi, 'loser', "30"],
[/\:\-&amp;/gi, 'sick', "31"],
[/\:\-\$/gi, 'don\'t tell anyone', "32"],
[/\[\-\(/gi, 'not talking', "33"],
[/\:O\)/gi, 'clown', "34"],
[/8\-\}/gi, 'silly', "35"],
[/\(\:\|/gi, 'yawn', "37"],
[/\=P\~/gi, 'drooling', "38"],
[/\:\-\?/gi, 'thinking', "39"],
[/\#\-o/gi, 'd\'oh', "40"],
[/\=D&gt;/gi, 'applause', "41"],
[/\@\-\)/gi, 'hypnotized', "43"],
[/\:\^o/gi, 'liar', "44"],
[/\:\-w/gi, 'waiting', "45"],
[/\:\-&lt;/gi, 'sigh', "46"],
[/&gt;\:P/gi, 'phbbbbt', "47"],
[/X\_X/gi, 'I don\'t want to see', "http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/109.gif"],
[/\:\!\!/gi, 'hurry up!', "http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/110.gif"],
[/\\m\//gi, 'rock on!', "http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/111.gif"],
[/\:\-q/gi, 'thumbs down', "http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/112.gif"],
[/\%\-\(/gi, 'not listening ', "107"],
[/\:\@\)/gi, 'pig', "49"],
[/\~\:&gt;/gi, 'chicken', "52"],
[/\%\%\-/gi, 'good luck', "54"],
[/\~O\)/gi, 'coffee', "57"],
[/8\-X/gi, 'skull', "59"],
[/\=\:\)/gi, 'bug', "60"],
[/&gt;\-\)/gi, 'alien', "61"],
[/\:\-L/gi, 'frustrated', "62"],
[/\$\-\)/gi, 'money eyes', "64"],
[/\:\-\"/gi, 'whistling', "65"],
[/b\-\(/gi, 'feeling beat up', "66"],
[/\[\-X/gi, 'shame on you', "68"],
[/&gt;\:\//gi, 'bring it on', "70"],
[/\;\)\)/gi, 'hee hee', "71"],
[/\:\-\@/gi, 'chatterbox', "76"],
[/\:\-j/gi, 'oh go on', "78"],
[/\(\*\)/gi, 'star', "79"],
[/o\-&gt;/gi, 'hiro', "72"],
[/o\=&gt;/gi, 'billy', "73"],
[/o\-\+/gi, 'april', "74"],
[/\(\%\)/gi, 'yin yang', "75"],
[/\:bz/gi, 'bee', "http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/115.gif"],
[/\:\)/gi, 'happy', "1"],
[/\:\(/gi, 'sad', "2"],
[/\;\)/gi, 'winking', "3"],
[/\:D/gi, 'big grin', "4"],
[/\:x/gi, 'love struck', "8"],
[/\:P/gi, 'tongue', "10"],
[/X\(/gi, 'angry', "14"],
[/\:&gt;/gi, 'smug', "15"],
[/\:\|/gi, 'straight face', "22"],
[/\=\;/gi, 'talk to the hand', "27"]
];

    

for(var i=0;i<ySmileys.length;i++)    {
    var y = ySmileys[i];
    if (y[2].indexOf("http://")==-1)
        y[2] = "http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/"+y[2]+".gif";
    }




    function changeSmiley(_str) {
    for (var i = 0; i < ySmileys.length; i++)
    {
        var y = ySmileys[i];
        _str = _str.replace(y[0], "<img class='smiley' alt='"+y[1]+"' src='"+y[2]+"'/>");
    }
    return _str;
}
a = document.getElementsByTagName('LABEL');
if (a) {
    for (var i = 0; i < a.length; i++) {
        a.item(i).innerHTML = changeSmiley(a.item(i).innerHTML);
    }
}

a = document.getElementById('comments');
if (a) {
    b = a.getElementsByTagName("DD");
    for (i = 0; i < b.length; i++) {
        if (b.item(i).getAttribute('CLASS') == 'comment-body') {
            b.item(i).innerHTML = changeSmiley(b.item(i).innerHTML);
        }
    }
}
a = document.getElementById('comments');
if (a) {
    c = a.getElementsByTagName("DD");
    for (i = 0; i < c.length; i++) {
        if (c.item(i).getAttribute('CLASS') == 'owner-Body') {
            c.item(i).innerHTML = changeSmiley(c.item(i).innerHTML);
        }
    }
}
//  .replace(/\>\:\//gi, "<img class='smiley' alt='bring it on' src='http://us.i1.yimg.com/us.yimg.com/i/mesg/emoticons7/70.gif'>")