var uhkna  = {

	version: '0.0.1',
	requiredPrototype: '1.6.0',
    debugLevel: 0,
    defaultLogoHeight: 130,
    defaultMenuWidth: 130,
    currentPageId: 'home',
    currentContentId: null,
    currentDivisionId: null,
    currentNavbarId: 'm-home',
    homeId: 'home',
    minContentWidth: 1030,
    testStr: 'This is a test',

    load: function() {
		this.init();
    },
  
    init: function() {
        var agt = navigator.userAgent.toLowerCase();
        this.is_op  = (agt.indexOf("opera") != -1);
        this.is_ie  = (agt.indexOf("msie") != -1) && document.all && !this.is_op;
        this.is_ie6 = (agt.indexOf("msie 6") != -1) && document.all && !this.is_op;
        this.is_ie7 = (agt.indexOf("msie 7") != -1) && document.all && !this.is_op;
        this.checkRequiredPrototype(); // http://script.aculo.us/
        $('content').show();
    },

    /* http://script.aculo.us/ */
    checkRequiredPrototype: function() {
        if ((typeof Prototype == 'undefined') || 
            (typeof Element == 'undefined') || 
            (typeof Element.Methods=='undefined') ||
            (this.convertVersionString(Prototype.Version) <
             this.convertVersionString(this.requiredPrototype)))
        throw("uhkna requires the Prototype JavaScript framework >= " + this.requiredPrototype);
    },

    /* http://script.aculo.us/ */
    convertVersionString : function (versionString) {
        var r = versionString.split('.');
        return parseInt(r[0])*100000 + parseInt(r[1])*1000 + parseInt(r[2]);
    },

    
    getPage: function(h) {
         var params = $H(h);
         var url = "index.php";
         var sep = "?"; 
         
         this.currentContentId = params['pageId'];
         params.each(function (param) {
             pair = sep + param.first() + "=" + param.last();
             url += pair; 
             sep='&';
         });
         //alert("Changing Page: URL = " + url)
         document.location.href=url;
    }

}

Event.observe(window, 'load', function() {
	uhkna.load();
});

