﻿function JsDelete() {
    if (confirm("Tem certeza que deseja excluir esse registro?")) {
        return true;
    }
    else {
        return false;
    }
}

function AbrePopUpNormal(Pagina, Comprimento, Altura, Nome, Scroll, toolbar)
{

    
			if (Scroll=='true')
			{
				Scroll = ',scrollbars=yes';
			}
			if (toolbar=='true')
			{
				toolbar = ',toolbar=1,menubar=0';
			}
			var winl = (window.screen.width  - Comprimento) / 2;
			var wint = (window.screen.height - Altura) / 2;
			winprops = 'status=yes,height='+Altura+',width='+Comprimento+',top='+wint+',left='+winl+Scroll+toolbar;
    		if (Nome == "") 
			{
			 Nome = "Janela"; 
			}
			var pops = window.open(Pagina,Nome,winprops);

}

function AbreJanela(Pagina, Elementos)
{
    winprops = 'status=yes,scrollbars=yes,toolbar=1,menubar=0';
    if (Elementos =='true')
    {
        winprops = '';
    }
    var pops = window.open(Pagina,'NovaJanela',winprops);
}

function objeto(nome, largura, altura) {

    document.write('<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="' + largura + '" height="' + altura + '" id="' + nome + '" align="middle">');

    document.write('<param name="allowScriptAccess" value="sameDomain" />');

    document.write('<param name="movie" value="Flash/' + nome + '.swf" />');

    document.write('<param name="quality" value="high" />');

    document.write('<param name="menu" value="false" />');

    document.write('<param name="wmode" value="transparent" />');

    document.write('<embed src="Flash/' + nome + '.swf" quality="high" menu="false" wmode="transparent" ' +
' width="' + largura + '" height="' + altura + '" name="' + nome + '" align="middle"' +
' allowScriptAccess="sameDomain" type="application/x-shockwave-flash"' +
' pluginspage="http://www.macromedia.com/go/getflashplayer" />');

    document.write('</object>');

}
function Nada() {
    return '';
}

    // verifies only a number was typed into the form element
    function numbersonly(e){
        //alert(e.keyCode)
        var unicode=e.charCode? e.charCode : e.keyCode
        // if (unicode!=8||unicode!=9)
        if (unicode!=44)
        {
            //if the key isn't the backspace key or tab key (which we shouldallow)
            if (unicode<48||unicode>57) //if not a number
            return false //disable key press
        }
    }

