//----------------------------------- 
function CarregarFlash(url,w,h,transparente){
	var obj="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='"+w+"' height='"+h+"'>";
					obj+="<param name='movie' value='"+url+"' />";
					obj+="<param name='quality' value='best' />";
	//VERIFICA SE É TRANSPARENTE
	if(transparente=="yes"){obj+="<param name='BGCOLOR' value='#FFFFFF' /><param name='wmode' value='transparent' />";}
	
	obj+="<embed src='"+url+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+w+"' height='"+h+"'";
	if(transparente=="yes"){obj+=" wmode='transparent'"}
	obj+="></embed></object>";
	document.write(obj);
}
//----------------------------------- 
function MDropDown(ul){
	if (!document.getElementById(ul))return (false);
	
	var li = document.getElementById(ul).getElementsByTagName("li");
	var app;
	for (i=0;i < li.length;i++){
		if (li[i].getElementsByTagName("ul")[0] != undefined){
			li[i].onmouseover = function(){this.getElementsByTagName("ul")[0].style.display = "block";}
			li[i].onmouseout = function(){this.getElementsByTagName("ul")[0].style.display = "none";}
		}
	}
}
//----------------------------------- 
function cbx_goto(cmd){window.open(cmd,"_self")}
//----------------------------------- 
function trocaimg(path){document.getElementById("logo_destaque").src = path;}
//*----------------------------------
function popup(url,win,prop){window.open(url,win,prop);}
//----------------------------------
function resize(obj){
	w = document.getElementById(obj).width 
	h = document.getElementById(obj).height
	window.resizeTo(w,h);
}
//----------------------------------
function showHide(div){
	if(getElementById(div).style.display == 'none'){
		getElementById(div).style.display = 'block'
	}else{
		getElementById(div).style.display = 'none'
	}
}
//verfica a quantidade de caracteres digitado
function countChr(t,vMax,dply){
	z = t.value.length;
	if(z>=vMax){t.value=t.value.substring(-1,vMax);}else{document.getElementById(dply).value = vMax-z;}
	t.onchange = function(){if(z >= vMax)t.value=t.value.substring(0,vMax);}
}
//----------------------------------- 
