// -----------------------------------------------------------------------------
// helper ----------------------------------------------------------------------
// -----------------------------------------------------------------------------

function error(txt) {
    var error = "[ERROR] " + txt;
    log(error);
    alert(error);
}

var logTxt = "Log:\n";
//var win = window.open();
function log(txt) {
/*
    logTxt = "<pre>" + txt + "</pre>";
    win.document.write(logTxt);
*/
}
// mouse over
function mov(image) {
    if(image.src.indexOf("_of") == -1) {
        image.src = "/media/game/" + image.name + "_mo.gif";
    }
}
function mot(image) {
    if(image.src.indexOf("_of") == -1) {
        image.src = "/media/game/" + image.name + ".gif";
    }
}
function getWindowHeight() {
    return document.body.clientHeight;
}
function $(name) {
    return document.getElementById(name);
}

function openPopup(width, height, title, content) {
    var popup = open(content, title, "width=" + width + ",height=" + height + ",resizable=no,scrollbars=yes,toolbar=no");
    popup.focus();
    return false;
}
