var pages = ["desc","scrs","inst","use","keys","bugs","work","hist","oth","cnt"];
var           pictures = ["originalSite.png","cruiser.png","cruiserGallery.png","cruiserLinks.png","cruiserHelp.png"];
var           page = 0;
var           showing = 0;
function s(id)
{
    var           o = document.getElementById('cruiser');
    var           scrl = window.pageYOffset?window.pageYOffset:(document.documentElement.scrollTop?document.documentElement.scrollTop:0);

    o.style.display = 'block';
    o.style.top = scrl+"px";
    document.getElementById('icruiser').src = id+'.png';
    document.getElementById('main').style.opacity = "0.45";
    document.getElementById('sidebar').style.opacity = "0.45";
    showing = 1;
   // document.body.style.backgroundColor="#F0F8FF";
}

function h(id)
{
    showing = 0;
    document.getElementById('cruiser').style.display = 'none';
    document.getElementById('main').style.opacity = "1";
    document.getElementById('sidebar').style.opacity = "1";
    document.body.style.backgroundColor = "white";
}

function sec(id)
{
    var           a;


    if (!showing) {
        for (a = 0; a < pages.length; a++) {
            var           o = pages[a];

            document.getElementById(o).style.display = 'none';
            var           t = document.getElementById('an'+a);

            if (id == pages[a])
                t.className = 'anactive';
            else
                t.className = 'aninactive';
        }
        document.getElementById(id).style.display = 'block';
    }
}
function showHide(id,ctl)
{
    var           o = document.getElementById(id);
    var           oi = document.getElementById(ctl);
    var           i = '';
    if (o) {
        if (o.style.display == 'none') {
            i = 'open-twisty.gif';
            o.style.display = 'block';
        }
        else {
            o.style.display = 'none';
            i = 'closed-twisty.gif';
        }
		if (oi)
				oi.src = i;
    }
}

function lm()
{
    var           o = document.getElementById('updated');
    var           scrl = window.pageYOffset?window.pageYOffset:(document.documentElement.scrollTop?document.documentElement.scrollTop:0);


    if (window.innerHeight)
        o.style.top = (scrl+window.innerHeight-o.offsetHeight);
    else
        o.style.top = (scrl+document.body.clientHeight-o.offsetHeight);
}
function kids(item,depth)
{
    var           k = item.childNodes;
//    alert(k+'\n'+k.length);
    var           i;

    for (i = 0; i < k.length; i++) {
        if (k[i].getAttribute) {
            var           attr = k[i].getAttribute("id");

            if (attr) {
                if (attr.substring(0, 2).toLowerCase() == 'fc')
                    k[i].style.display = 'none';
            }
            kids(k[i], depth+1)
        }
    }
}
function itx()
{
    var           found = 1;
    var           cnt = 0;
var centerRemoved = 0;
    while (found == 1) {
        found = 0;
        var           t = document.body.getElementsByTagName('a');
    //    var           g = document.body.getElementsByTagName('img');

      //  for (a = 0; a < g.length; a++) {if (g[a]) g[a].style.display="none";}
        for (a = 0; a < t.length; a++) {
            var           c = t[a].getAttribute('class');

            if ((c && ((c == 'iAs') || (c == 'kText'))) || t[a].oncontextmenu) {
                found = 1;
                n = document.createElement('span');
                n.innerHTML = t[a].innerHTML.replace(/<[^<>]* > /gi, '');
                t[a].parentNode.replaceChild(n, t[a]);
                cnt++;
            }
        }
    }

//	kids(document.body,0);
	var g=document.body.getElementsByTagName('center');
	if (g.length>0 && !centerRemoved) {
			g[0].style.display='none';
			centerRemoved=1;
	}
}

function wheelHandler(e)
{
    if (!e)
        if (window.event) {
            e = window.event;
            e.detail = window.event.wheelDelta;
        }
    if (showing) {
        var           c;
        var           a;
        var           p = document.getElementById('icruiser');

        c = 0;
        for (a = 0; a < pictures.length; a++) {
            if (-1 < p.src.indexOf(pictures[a]))
                c = a+((e.detail < 0)?-1:1);
        }
        if (c == pictures.length)
            c = 0;
        if (c < 0)
            c = pictures.length-1;
        p.src = pictures[c];
    }
    else {
        if (e.detail < 0)
            page = Math.max(page-1, 0);
        else
            page = Math.min(page+1, pages.length-2);
        sec(pages[page]);
    }
    e.preventDefault();
    e.returnValue = false;
}

function setup()
{
    document.getElementById('updated').innerHTML = "Modified: "+document.lastModified+
        '<br>&nbsp;Web hosting courtesy of<br>&nbsp;&nbsp;<a target="blank" href="http://fortunecity.com/">fortunecity.com</a>'+
        '<br>&nbsp;This site contains<br>&nbsp;&nbsp;no adult content';
    lm();
    FCWindowWidth = 0;
    document.body.onunload = 'return';
    if (window.addEventListener) {
        window.addEventListener("resize", lm, false);
        window.addEventListener("scroll", lm, false);
        window.addEventListener('DOMMouseScroll', wheelHandler, false);
    }
    else {
        document.body.onmousewheel = "wheelHandler()";
        document.body.onresize = "lm()";
        document.body.onscroll = "lm()";
    }
    setTimeout('itx()', 2000);
    setTimeout('itx()', 4000);
    setTimeout('itx()', 6000);
    setTimeout('itx()', 8000);
}
//alert(document.cookie);
document.cookie='fcmember=1';
//alert(document.cookie);