// level scope settins structure
var MENU_TPL = [
// root level configuration (level 0)
{
	// item sizes
	'height': 310,
	'width': 40,
	// absolute position of the menu on the page (in pixels)
	// with centered content use Tigra Menu PRO or Tigra Menu GOLD
	'block_top': -137,
	'block_left': 884,
	// offsets between items of the same level (in pixels)
	'top': 24,
	'left': 0,
	// time delay before menu is hidden after cursor left the menu (in milliseconds)
	'hide_delay': 500,
	// submenu expand delay after the rollover of the parent 
	'expd_delay': 0,
	// names of the CSS classes for the menu elements in different states
	// tag: [normal, hover, mousedown]
	'css' : {
		'inner' : 'minner',
		'outer' : ['moout', 'moover', 'modown']
	}
},
// sub-menus configuration (level 1)
// any omitted parameters are inherited from parent level
{
	'height': 312,
	'width': 320,
	// position of the submenu relative to top left corner of the parent item
	'block_top': -312,
	'block_left': -319,
	'css' : {
		'inner' : '',
		'outer' : ''
	}
}
// the depth of the menu is not limited
// make sure there is no comma after the last element
];

// set an element 'ele' to remain fixed at 'dist' px from top

function topFixed(ele,dist) {

    // set the initial position based on 'dist'

    ele.style.top = dist+'px';

    // bad browser detect! but it should work...

    var ieMatch = navigator.appVersion.match(/MSIE (\d+)\./);

    if(!ieMatch || +ieMatch[1]>=7) {

        // set it to fixed, and forget it! we're done!

        ele.style.position = 'fixed';

    } else {

        // uh-oh... not supported!

        // set the position to absolute...

        ele.style.position = 'absolute';

        // then set up a func to run every .01 sec...

        setInterval(function(ele) {

            ele.style.display = 'none'; // turn visibility off...

            ele.style.top = dist+'px'; // change the offset...

            // and turn it back on to force the browser to reposition!

            ele.style.display = 'block';

        },0,ele);

    }

    // the rest takes care of itself!
}

      onload = function() {

        // the two params are the element to float,

        // and how many pixels off the top to float it

        topFixed(document.getElementById('theFixedThing'),255);

      } 



