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

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);
	}
function isIe() {
	if(navigator.appVersion.indexOf("MSIE")!=-1) { 
		return true;
	}
	return false;
}
function noPx(v)
	{
		return Math.round(v.substr(0, v.length-2));
	}
function freshStyle(p)
	{
		if(isIe()) {
			var content = p.innerHTML;
			if(content != '') {
				p.innerHTML = '';
				setTimeout( function () {
					p.innerHTML = content; 					
					var elements = new Array ();
					try {
						var children = p.getElementsByTagName( "*" );
				
						for ( var i = 0; i < children.length; i++ ) {
							children[i].className = children[i].className;
						}
					} catch (err) { alert(err); } ;
				} , 100 );
			}
		}
	}
function getStyle( element, cssRule ) {
	if( document.defaultView && document.defaultView.getComputedStyle ) {
		var value = document.defaultView.getComputedStyle( element, '' ).getPropertyValue( cssRule );
	}
	else if ( element.currentStyle ) var value = element.currentStyle[ cssRule ];
	else                             var value = false;
	return value;
}

function fixCssLayout(e)
	{
		fixCssHeight();

		try { // menu esquerda
			var ray = document.getElementById('menu').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 { // menu esquerda
			var ray = document.getElementById('menuInter').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;
var fixcss_flashloader = 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';
			}
		// flash loader
		for(i in fixcss_flashloader)
			{
				getE(i).innerHTML = getE(fixcss_flashloader[i]).innerHTML;
			}
			
		// inherit height fix -- !!! always last
		for(i in fixcss_h_ray)
			{
				if(getElHeight(getE(i)) <= getElHeight(getE(fixcss_h_ray[i])))
					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';
			}
	}
	