function fader(el,inOut){

    if(inOut==1){
        el.setStyles({'filter':'alpha(opacity=0)','-moz-opacity': '0','opacity': '0'})
        el.addEvent('domready', function() {
            new Fx.Morph(el, {duration: 1000}).start({'filter':'alpha(opacity=100)','-moz-opacity': '1','opacity': '1' })
        })
    }else{
        el.setStyles({'filter':'alpha(opacity=0)','-moz-opacity': '0','opacity': '0'})
        el.addEvent('domready', function() {
            new Fx.Morph(el, {duration: 1000}).start({'filter':'alpha(opacity=100)','-moz-opacity': '1','opacity': '1' })
        })
    }
}

function changeColor(chang_class,way){
    if($$(chang_class).length>0){
       if(way==1){
           fromColor='#ffffff';
           toColor= $$(chang_class)[0].getStyle('color');
       }else{
           fromColor=$$(chang_class)[0].getStyle('color');
           toColor= '#ffffff';

       }
       $$(chang_class).each(function(el){
            el.setStyles({'color':fromColor});
            new Fx.Morph(el, {duration: 1000}).start({'color': toColor });
       })
    }
}

function rhtmlspecialchars(str) {
    if (typeof(str) == "string") {
        str = str.replace(/&gt;/ig, ">");
        str = str.replace(/&lt;/ig, "<");
        str = str.replace(/&#039;/g, "'");
        str = str.replace(/&quot;/ig, '"');
        str = str.replace(/&amp;/ig, '&'); /* must do &amp; last */
    }
    return str;
 }