var links = document.getElementsByTagName( "link" );
var num = links.length;
var feedURL = "&feedURL=";
var tmpURL  = "";
for (var i = 0; i < links.length; ++i) {
    var element = links[i];
    if (!element.title && !element.type) {
        continue;
    }
    if (element.title.search(/RSS/) != -1 || element.type == "application/rss+xml" ) {
        tmpURL = htmlspecialchars( element.href );
        break;
    } else if (element.title == "Atom" || element.type == "application/atom+xml" ) {
        tmpURL = htmlspecialchars( element.href );
    }
}
feedURL += tmpURL;
var target = document.getElementById( "gUrO7TYasoJkM3mHYalER5C8oL3d5e" );
renderSwfSrc(target, feedURL);
function renderSwfSrc(target, feedURL){
    string = "?action=getSwf&uid=1886&ver=1&wanko=3186a790a83658e27b8601a98c90695c" + feedURL;
    var doc = "";

    doc += '<style type="text/css">';
    doc += '#gUrO7TYasoJkM3mHYalER5C8oL3d5e object {';
    doc += ' outline:none;';
    doc += '}';
    doc += '</style>';

    doc += '<object data="http://minnanowanko.jp/bp/bp.php' + string + '" type="application/x-shockwave-flash" width="160" height="395" allowScriptAccess="always" FlashVars="UID=1886">';
    doc += '<param name="movie" value="http://minnanowanko.jp/bp/bp.php' + string + '" />';
    doc += '<param name="wmode" value="transparent" />';
    doc += '<param name="allowScriptAccess" value="always" />';
    doc += '<param name="FlashVars" value="UID=1886" />';
    doc += '</object>';
    target.innerHTML = doc;
}
function htmlspecialchars(ch) {
    ch = ch.replace(/&/g,"&amp;") ;
    ch = ch.replace(/"/g,"&quot;") ;
    ch = ch.replace(/'/g,"&#039;") ;
    ch = ch.replace(/</g,"&lt;") ;
    ch = ch.replace(/>/g,"&gt;") ;
    return ch ;
} 