

function flash(arquivo, id, width, height)
{
	
	var li = document.getElementById(id);
	swf = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+width+"' height='"+height+"' id=''>";
	swf+= "<param name='allowScriptAccess' value='sameDomain' />";
	swf+= "<param name='movie' value='"+arquivo+"' />";
	swf+= "<param name='quality' value='high' />";
	swf+= "<param name='wmode' value='transparent' />"; //firefox wmode='transparent'
	swf+= "<param name='scale' value='noscale' />";
	swf+= "<embed src='"+arquivo+"' wmode='transparent' quality='high' width='"+width+"' height='"+height+"'name='menu_topo' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";
	swf+= "</object>";
	li.innerHTML = swf;
}
function mascara(campo, mask, e)
{
	campo.maxLength=mask.length;
    
	var src=campo.value.length;
    var mask=mask.substr(src,1);
    
    if(window.event)
    {
	    if(e.keyCode!=13 && (e.keyCode>47 && e.keyCode<58))
	    {
	    	if(mask!='#' && src>=0)
	    	{	
	        	campo.value+=mask;
	    	}
	    }
	    else
	    {
	    	e.keyCode=0;
	    }
    }
    else
    {
    	if(e.which!=13 && (e.which>47 && e.which<58))
	    {
	    	if(mask!='#' && src>=0)
	    	{	
	        	campo.value+=mask;
	    	}
	    }
	    else if((e.which>64 && e.which<91) || (e.which>96 && e.which<123))
	    {
	    	e.preventDefault();
	    }
    }
}
function abre(pagina,arquivo,largura,altura)
{
	window.open(pagina+'?arquivo='+arquivo+'&amp;largura='+largura+'&amp;altura='+altura,'','width='+largura+',height='+altura+'');
}
