var i = 0;
var layout = 'sc';
var pTags = document.getElementsByTagName('p');
var aTags = document.getElementsByTagName('a');
var iTags = document.getElementsByTagName('img');
var dTags = document.getElementsByTagName('div');
var date = '1/21/08';
var time = '3:45 AM';
var visits = '4380';
var rank = '247';
var entries = '274';
var introCode = '<div class="intro">Hey! Thanks for stopping by! Could you please sign my guestbook before you leave?<hr class="hr" />Because I\'ve gotten a few requests already and I\'m sure to get more, here\'s a link on how to put a music player on your site. Enjoy!<br /><br /><div align="center"><a href="http://otaku.brokenrevolution.com/music.html" rel="_blank">Putting Music on Your Page</a></div><hr class="hr" /><div align="center"><img src="http://otaku.brokenrevolution.com/trapped.gif" alt="Trapped" /></div>I liked this animation so I put it up. If you like it, feel free to use it by copying the code below. Unfortunately, I don\'t actually know who made it but please leave a comment if you want to use it.<br /><br /><span class="bold">Code:</span><br /><span style="font-family: Courier New, Courier, sans-serif; font-size: 11px; word-spacing: -5px;">&lt;img src="http://otaku.brokenrevolution.com/trapped.gif" alt="Trapped" /&gt;</span><hr class="hr" /><div align="center">Site stats as of <span class="bold">' + date + '</span> at <span class="bold">' + time + '</span>:<br />Total Visits: <span class="bold">' + visits + '</span><br />Popularity Rank: <span class="bold">#' + rank + '</span><br />Guestbook Entries: <span class="bold">' + entries + '</span><hr class="hr" /><iframe src="http://136098.myshoutbox.com" width="160" height="400" frameborder="0"></iframe><hr class="hr" /></div><div class="clubs"><img src="http://otaku.brokenrevolution.com/that/thats3.png" alt="THAT" /><br />I\'m a proud member of S.S.T.E.B.H.B.H or "Sadistic Stalkers and Torturers of Elves, Bounty Hunters, and Bounty Heads," for short, <a href="http://www.myotaku.com/users/that" rel="_blank">THAT</a>.<hr class="hr" style="width: 85%;" /><img src="http://otaku.brokenrevolution.com/banners/donut.jpg" alt="The Breakfast Club" /><br />"Donut here and still lacking a catch phrase!"<hr class="hr" style="width: 85%;" /><img src="http://otaku.brokenrevolution.com/banners/hateclub.jpg" alt="The Hate Club" /><br />"I think the correct question is what <span class="italic">AREN\'T</span> we hating?" - See <a href="http://www.myotaku.com/users/color_me_evil" rel="_blank">Evil</a> to join.<hr class="hr" style="width: 85%;" /><img src="http://otaku.brokenrevolution.com/banners/petieness.jpg" alt="Evil\'s Bitch" /><br />You can direct any questions about this one to <a href="http://www.myotaku.com/users/color_me_evil" rel="_blank">Evil</a> herself ^_^</div><hr class="hr" /><div align="center">New music coming eventually! Suggestions are welcome!</div></div>';
// Original THAT Banner URL: http://www.cucurbitalane.net/that/thats3.png

function writeIntro()
{
    document.write(introCode);
}

function fixLinks()
{
    for(i = 0; i < aTags.length; i++)
    {
        if(aTags[i].getAttribute('href') && aTags[i].getAttribute('rel'))
        {
            aTags[i].setAttribute('target', aTags[i].getAttribute('rel'));
        }
    }
}

function fixLayout()
{
    document.write('<link rel="stylesheet" type="text/css" href="http://otaku.brokenrevolution.com/myotaku_' + layout + '.css" />');
    for(i = 0; i < pTags.length; i++)
    {
        if(pTags[i].innerHTML.indexOf('google_ad_client') != -1)
        {
            pTags[i].innerHTML = '';
            pTags[i].style.height = '5px';
            pTags[i].style.padding = '0px';
            pTags[i].style.margin = '0px';
        }
    }
    for(i = 0; i < aTags.length; i++)
    {
        if(aTags[i].getAttribute('href').indexOf('artofotaku') != -1)
        {
            aTags[i].setAttribute('href', aTags[i].getAttribute('href') + '?source=70');
            aTags[i].setAttribute('target', '_blank');
        }
    }
    for(i = 0; i < iTags.length; i++)
    {
        if(iTags[i].getAttribute('src').indexOf('lab.jpg') != -1)
        {
            iTags[i].setAttribute('src', 'http://otaku.brokenrevolution.com/layouts/' + layout + '/myo_header.png');
        }
    }
    dTags[0].style.position = 'absolute';
    dTags[0].style.left = '10px';
    dTags[0].style.top = '-5px';
}
