function writeHyakuenTag(tic,dirName) {
    var thisUrl      = encodeURI(decodeURI(document.URL));
    var thisReferrer = encodeURI(decodeURI(document.referrer));

   document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' id='aexternal' width='166' height='406' align='middle' VIEWASTEXT>");
   document.write("<param name='allowScriptAccess' value='always' />");
   document.write("<param name='FlashVars' value='&dur=" + thisUrl + "&tic=" + tic + "&tit=" + document.title.replace(/[\'\"!#$%&]/g,"") + "&ref=" + thisReferrer + "&dirName=" + dirName + "' />");
   document.write("<param name='movie' value='http://www.square-enix.com/jp/members/blogparts/ganganonline/"+dirName+"/index.swf' />");
   document.write("<param name='scale' value='noscale' />");
   document.write("<param name='salign' value='lt' />");
   document.write("<param name='quality' value='high' />");
   document.write("<param name='wmode' value='transparent' />");
   document.write("<param name='menu' value='false' />");
   document.write("<embed src='http://www.square-enix.com/jp/members/blogparts/ganganonline/"+dirName+"/index.swf' quality='high' menu='false' scale='noscale' salign='lt' wmode='transparent' width='166' height='406' FlashVars='&dur=" + thisUrl + "&tic=" + tic + "&tit=" + document.title.replace(/[\'\"!#$%&]/g,"") + "&ref=" + thisReferrer + "&dirName=" + dirName + "' swLiveConnect=true align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
   document.write("</object>");
}
