function SetFlashPage(urlFlash,width,height,transparent,backgroundColor)
{
    var result = new String();
	result="<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='" + width + "' height='" + height + "'>";
	result+="<param name='movie' value='" + urlFlash + "' />";
	result+="<param name='quality' value='best' />";
	result+="<param name='BGCOLOR' value='" + backgroundColor + "' />";
	
	if (transparent)
	    result+="<param name='wmode' value='transparent' />";
	    
	result+="<embed src='" + urlFlash + "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='" + width + "' height='" + height + "'";
	
	if (transparent)
	    result+=" wmode='transparent'";
	
	result+="></embed></object>";
	
	document.write(result);
}

function hide(div_name)
{
    document.getElementById(div_name).style.display='none';
}

function show(div_name)
{
    document.getElementById(div_name).style.display='block';
}


// Desabilitar letras
function TextNumber(evt,d)
{
    var tecla = (evt.which) ? evt.which : event.keyCode;

    var num = (tecla >= 48 && tecla <= 57);
    var dec = (tecla == 44 || tecla == 46);
    var n_enter = (tecla != 13);
    var backspace = (tecla == 8);

    if (n_enter)
    {
        if (d == true)
        {
            
            if (num || dec || backspace)
            {
                if (dec)
                {
                    if (evt.which)
                       evt.which = 44; 
                    else
                       event.keyCode = 44;
                }
                return true;
            }
            else
                return false;
        }
        else 
        {
            return (num || backspace);
        }
    }
    else
    {
        return false;
    }
}

