﻿/***********************************************
* Floating image script- By Virtual_Max (http://www.geocities.com/siliconvalley/lakes/8620)
* Modified by Dynamic Drive for various improvements
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
var flyimage1;

function pagestart(){
    flyimage1=new Chip("flyimage1",100,50);
    movechip("flyimage1");
}

if (window.addEventListener) {
    window.addEventListener("load", pagestart, false);
}
else if (window.attachEvent) {
    window.attachEvent("onload", pagestart);
}
else if (document.getElementById) {
    window.onload = pagestart;
}

function hitbox(hid, uid) {
    hidediv(hid);
    unhidediv(uid);
}

function hidediv(id) {
    //safe function to hide an element with a specified id
    if (document.getElementById) { // DOM3 = IE5, NS6
        document.getElementById(id).style.display = 'none';
    }
    else {
        if (document.layers) { // Netscape 4
            document.id.display = 'none';
        }
        else {
            // IE 4
            document.all.id.style.display = 'none';
        }
    }
}

function unhidediv(id) {
    //safe function to unhide an element with a specified id
    if (document.getElementById) {
        // DOM3 = IE5, NS6
        document.getElementById(id).style.display = '';
    }
    else {        
        if (document.layers) { // Netscape 4
            document.id.display = 'inherit';
        }
        else {
            // IE 4
            document.all.id.style.display = 'inherit';
        }
    }
}
