var emonts = new Array();
emonts[':)'] = 'regular';
emonts[':-)'] = 'regular';

emonts['^o)'] = 'sarcastic';
emonts[":'("] = 'cry';
emonts[':S'] = 'confused';
emonts[':s'] = 'confused';
emonts[':|'] = 'blank_look';
emonts[':-|'] = 'blank_look';
emonts['8o|'] = 'bearingteeth';
emonts[':ble'] = 'disgust';
emonts[':$'] = 'embarrassed';
emonts[':-$'] = 'embarrassed';
emonts['8-)'] = 'everoll';
emonts[':*'] = 'kiss';
emonts[':-*'] = 'kiss';
emonts['8o|'] = 'teeth';
emonts[':-('] = 'sad';
emonts[':('] = 'sad';
emonts['|secret|'] = 'secret';
emonts['|sorry|'] = 'sorry';
emonts[':#'] = 'sshh';
emonts[':-#'] = 'sshh';
emonts[';)'] = 'wink';
emonts[';-)'] = 'wink';
emonts['|shout|'] = 'shout';
emonts['|beer|'] = 'beer';
emonts['(b)'] = 'beer';
emonts['(B)'] = 'beer';
emonts['|piwo|'] = 'beer';
emonts['??'] = 'asl';

function replaceStringToEmoticons(object) {
    tmp = ''+object.innerHTML;
    for (var i in emonts) {
        var finds = ''+i;
        tmp = tmp.replace(finds ,'<img src="/img/emoticon.gif" id="emoticons" class="'+emonts[i]+'"/>');
    }
    object.innerHTML = tmp;    
}
