function  myTags(mytags){

        mytags=mytags.replace(/<A/g, '<a')

            .replace(/\/A>/g, "/a>")

            .replace(/(target=_)(\w*)/g, 'target="_$2"')

            .replace(/(class=)(?!")(\w*)/g, 'class="$2"')

            .replace(/(name=)(?!")(\w*)/g, 'name="$2"')

            .replace(/(id=)(?!")(\w*)/g, 'id="$2"');

      mytags=encodeURIComponent(mytags).replace(/!/g, '%21')

            .replace(/'/g, '%27').replace(/\(/g, '%28')

            .replace(/\)/g, '%29').replace(/\*/g, '%2A');

        var rnumber = Math.floor(Math.random()*9999999);

        var flashvars = {

            tcolor:"0xC9C9C9",

            tcolor2:"0xF6F958",

            hicolor:"0xFF00F0",

            tspeed:"120",

            distr:"true",

            mode:"tags",

            tagcloud:mytags

        };

        var params = {

            allowScriptAccess:"always",

            bgcolor:'0x00000'

        };

        var attributes = {

            id:"flash_cloud"

        };

        swfobject.embedSWF("tagcloud.swf?r="+rnumber,

                           "tags", "250", "190", "9.0.0",

                           "expressInstall.swf", flashvars,

                           params, attributes);

    }

  //  window.onload=function(){

     //   var mytags="<tags>"

       // +document.getElementById('tags').innerHTML

        //+"</tags>";

        //myTags(mytags);

    //};

    jQuery().ready(function(){

        var mytags="<tags>"

        +jQuery('#tags').html()

        +"</tags>";

        myTags(mytags);

    });



