var old_cssjs_onload = window.onload;
var window_onload = function () {;};
window.onload = fixCssLayout;

function fixCssLayout(e)
	{
		fixCssHeight(); // height
		try { // menu horizontal
			var ray = document.getElementById('menuTudo').getElementsByTagName('div');
			for (i in ray) {
				if(ray[i].className == 'menuItem') {
					ray[i].onmouseover = function(){ this.getElementsByTagName('img')[0].style.visibility = 'hidden'; }
					ray[i].onmouseout = function(){ this.getElementsByTagName('img')[0].style.visibility = ''; }
				}
			}
		}catch(e){;}
		try { // menu principal
			var ray = document.getElementById('menuPrincipal').getElementsByTagName('li');
			for (i in ray) {
				if(ray[i].className == 'li_normal') {
					ray[i].onmouseover = function(){ this.className = 'li_hover'; }
					ray[i].onmouseout = function(){ this.className = 'li_normal'; }
				}
			}
		}catch(e){;}

		try{ old_cssjs_onload(e); }catch(e){;}
		try{ window_onload(e); }catch(e){;}
	}

var fixcss_h_ray = new Array;
var fixcss_minh_ray = new Array;
var fixcss_h_ray_m = new Array;

function fixCssHeight()
	{
		// min height
		for(i in fixcss_minh_ray)
			{
				if( getElHeight(getE(i)) < fixcss_minh_ray[i] )
					getE(i).style.height = fixcss_minh_ray[i] + 'px';
			}
		
		// inherit height fix -- !!! always last
		for(i in fixcss_h_ray)
			{
				getE(i).style.height = getElHeight(getE(fixcss_h_ray[i])) + 'px';
			}
		// inherit height fix -- !!! always last
		for(i in fixcss_h_ray_m)
			{
				getE(i).style.height = (getElHeight(getE(fixcss_h_ray_m[i][0])) + fixcss_h_ray_m[i][1]) + 'px';
			}
	}

function getElHeight(el)
	{
		try{
			h = el.style.pixelHeight;
			if(!isDefined(h) || h == 0)
				h = el.offsetHeight;
			if(!isDefined(h) || h == 0)
				h = el.clientHeight;
		} catch(e) {
			h = el.offsetHeight;
		}
		return h;
	}
function getElWidth(el)
	{
		try{
			w = el.style.pixelWidth;
			if(!isDefined(w) || w == 0)
				w = el.offsetWidth;
			if(!isDefined(w) || w == 0)
				w = el.clientWidth;
		} catch(e) {
			w = el.offsetWidth;
		}
		return w;
	}
function getE(id)
	{
		return document.getElementById(id);
	}