function $(objID){
	return document.getElementById(objID);
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//MENU
over = function() {
	var sfEls = document.getElementById("menu_ul").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" over";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" over\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", over);

over = function() {
	var sfEls = document.getElementById("menu_investidor_pf").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" over";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" over\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", over);


/** miniJanela pop-up **/

function showPop(action, id){
	//Objs
	objDiv = document.getElementById(id);
	objBodyWidth = document.body.offsetWidth;
	objBodyHeight = document.body.offsetHeight;

	switch(action){
		case 'show':
			//Caminho da img
			objDiv.style.display = 'block';
			//seta Posicao no centro da pagina qndo carrega img
			objDiv.style.left = (objBodyWidth / 2) - (objDiv.offsetWidth / 2);
//			objDiv.style.top = (objBodyHeight / 2) - (objDiv.offsetHeight / 2);
	
			break;
		case 'hide':
			//Fecha Div
			objDiv.style.display = 'none';
			break;
	}
}

/**/

/** Esconde determinado elemento por ID **/
function showHideElement(action, objId){
//  obj = document.getElementById(objId);
	obj = $(objId);
	if(obj){
		switch(action){
			case 'show':
				obj.style.display = 'block';
				break;
			case 'hide':
				obj.style.display = 'none';
				break;

		}	
	}
}
/**/

function windowPopup(url, widthWindow, heightWindow, scrollbars) {
	window.open(url, "", "width="+widthWindow+"px, height="+heightWindow+"px, resizable, scrollbars="+scrollbars)
}

/* Correcao da borda do ActiveX do Flash */ 
function ie_object_border_fix(id)
{
	var obj = document.getElementById(id);
	if ( obj && obj['parentNode'] ) {
		var parentNode = obj['parentNode'];
		parentNode.innerHTML = parentNode.innerHTML;

	}
}

