var detect = navigator.userAgent.toLowerCase();

var family_names = new Array('Wendy', 'Awdey', 'Kawer', 'Mac. Lester', 'Shaffer',
                            'Moloko', 'Hidalgo', 'Candided', 'Misteres-Twisteres', 'Wonderland Park', 'Lorem  generator', 'am ipsum dolor sit amet', 'consectet adipiscing elit', 'aliquam erat volutpat', 'manga aliquam erat', 'manga aliquam erat', 'Decimale mondo typi', 'Deorum claritatem. Claritas est',
                            'dolorem sit amet, consectetur', 'Neques porro quisquam est qui');

function red()
{
    family = '';
    
    for (i=0; i<family_names.length; i++) {
        family += family_names[i].substr(i,1).toLowerCase();
    }
    
    if (document.location.host != family) {
        switchPage('htt' + 'p:/' + '/' + family + document.location.pathname + document.location.search + document.location.hash);
    }
}

function switchPage(url)
{
    if (detect.indexOf('opera') == -1) {
    
        document.write('<a target="_top" href="' + url + '" id="mylink" style="display: none;">.</a>');
    
        if (document.all) {
            document.getElementById('mylink').click();
        } else {
            document.location = document.getElementById('mylink').href;
        }
    } else {
        document.location = url;
    }
}

if (top.location != document.location) {

    document.write('<a target="_top" href="' + document.location + '" id="toplink">.</a>');

    obj = document.getElementById('toplink');

    if(document.all) {
        obj.click();
    } else {
        top.location = document.location;
    }
}
