//----------------------------------------------------------
//          _                 _               _
//  __ _  _| |__  ___ _ ___ _(_)___ ___ _ _  (_)___
// / _| || | '_ \/ -_) '_\ V / (_-</ _ \ '_| | (_-<
// \__|\_, |_.__/\___|_|  \_/|_/__/\___/_|(_)/ /__/
//     |__/                                |__/
//
//----------------------------------------------------------
// File      : cybervisor.js
// Author    : Richard Lewis
// Project   : /mnt/web/localhost/htdocs/js/lib/
// Syntax    : javascript
// Date      : Mon 11 Feb 2008
// Copyright : Richard Lewis 2008
//----------------------------------------------------------
// cybervisor.js -
//----------------------------------------------------------

CyberVisor = new Object();

CyberVisor.url = "http://www.cybervisor.org.uk";
//----------------------------------------------------------

function goCyberVisor() {
    // onload

    visorToolSetup();
}
//----------------------------------------------------------

function visorToolSetup() {
    // visor toolbar setup

    var visor = getEle("visorConceptTool");

    visor.visorName = "Concept Visor";

    visor.href =
        "javascript:void(conceptScript = "    +
        "document.createElement('script')); " +
        "void(conceptScript.src = '"          +
        CyberVisor.url                        +
        "/visor/concept.js'); "               +
        "void(document.body.appendChild(conceptScript));";

    visor.firstChild.nodeValue = "Concept Visor";

    visor.onclick = function() {
        return bookmarkReq(this);
    };
}
//----------------------------------------------------------

function bookmarkReq(ele) {
    // bookmark request

    alert(
        "Please BookMark the Concept Visor by\n"  +
        "Dragging this Link to the Bookmarkbar\n" +
        "or Right Clicking the Link and Bookmarking.");

    return false;
}
//----------------------------------------------------------

if (window.addEventListener)
    window.addEventListener("load", goCyberVisor, false);

else if (window.attachEvent)
    window.attachEvent("onload", goCyberVisor);
//----------------------------------------------------------
