/* cgi object */

var cgi = new Object();
    cgi.http_host = location.host;
    cgi.http_user_agent = navigator.userAgent;
    cgi.http_cookie = document.cookie;
    cgi.https = (location.protocol == 'https:\/\/') ? 'on' : 'off';
    cgi.path_info = (location.pathname.indexOf('?') != -1) ? location.pathname.substring(0, location.pathname.indexOf('?')) : location.pathname;
    cgi.query_string = (location.search) ? ((location.search.indexOf('##') != -1) ? location.search.substring(1, location.search.indexOf('##')) : location.search.substring(1)) : '';
    cgi.script_name = cgi.path_info;

