
if(typeof javascriptPath == 'undefined') {
    var javascriptPath = "myweb2go/ntlsapi/javascript";
}
if(typeof myweb2goJavascriptPath == 'undefined') {
    var myweb2goJavascriptPath = 'myweb2go/js';
}
document.write('<script type="text/javascript" src="' + javascriptPath + '/base.js"><\/script>');
document.write('<script type="text/javascript" src="' + myweb2goJavascriptPath + '/ajax.js"><\/script>');
document.write('<script type="text/javascript" src="' + myweb2goJavascriptPath + '/formutils.js"><\/script>');


function initMyweb2go() {
    accessClick();
    try { 
        loadFCKeditorAreas();
    }
    catch(e) { // kein FckEditor
    }
    var comboboxes = $$("select.tableCombobox");
    comboboxes.each( function(combo) {
            var data = optionHandler.options2Data(combo);
            var td = combo.parentNode;
            optionHandler.createTable(td,data,combo);
        });
}



function accessClick()
 {
     var anchors = $A(document.getElementsByTagName('a'));
     
     anchors.each ( function(anchor) {
             if (anchor.getAttribute('accesskey') != "")
                 {
                     anchor.onfocus = function() {
                         if(anchor.getAttribute('accesskey') != null) {
                             window.location = this.getAttribute('href');
                         }
                     };
                 }
         });
 }
 
 var Cookie = {
  set: function(name, value, daysToExpire) {
        var expire = '';
        if (daysToExpire != undefined) {
            var d = new Date();
            d.setTime(d.getTime() + (86400000 * parseFloat(daysToExpire)));
            expire = '; expires=' + d.toGMTString();
        }
        return (document.cookie = escape(name) + '=' + escape(value || '') + expire);
    },
  get: function(name) {
        var cookie = document.cookie.match(new RegExp('(^|;)\\s*' + escape(name) + '=([^;\\s]*)'));
        return (cookie ? unescape(cookie[2]) : null);
    },
  erase: function(name) {
        var cookie = Cookie.get(name) || true;
        Cookie.set(name, '', -1);
        return cookie;
    },
  accept: function() {
        if (typeof navigator.cookieEnabled == 'boolean') {
            return navigator.cookieEnabled;
        }
        Cookie.set('_test', '1');
        return (Cookie.erase('_test') == '1');
    }
};
