function getQueryArr(q) {
    // parse the query string (without ?) - (current window cgi string as default)
    // and return a result array
    var res = new Array();
    var vals = new Array();
    if (typeof q == "undefined")
        q = window.location.search.slice(1);
    q = q.split("&");
    for(var i=0; i<q.length; i++) {
        vals = q[i].split("=");
        res[vals[0]] = unescape(vals[1]);
    }
    return res;               
}

Array.prototype.contains = function (element) {
    for (var i=0; i < this.length; i++)
        if (this[i] == element) return true;

    return false;
};

var olNs4 = (navigator.appName=='Netscape' && parseInt(navigator.appVersion) == 4);
function show_object(obj, visible) {
  var theObj=(olNs4 ? obj : obj.style);
  theObj.visibility = (visible) ? 'visible' : 'hidden';
}

function is_visible(obj) {
  var theObj=(olNs4 ? obj : obj.style);
  return (theObj.visibility == 'visible') ? true : false;
}