﻿// JScript File
function Confirma()
{
    if(confirm("Do you really want to delete this item?"))
    {
        return true;
    }
    else
    {
        return false;
    }
}
function Confirma(msg)
{
    if (msg == null) { msg = "Do you really want to delete this item?"; }
    if(confirm(msg))
    {
        return true;
    }
    else
    {
        return false;
    }
}

function abreShowModal(path,altura,largura)
{
    try
    {
	    feautures = "dialogHeight: "+altura+"px; dialogWidth: "+largura+"px;  center: Yes; scroll:No; help: No; resizable: Yes; status: No;"
	    retorno = window.showModalDialog(path,window,feautures);
	    if(retorno=="reload")
        {
		    window.history.go(0);
	    } 
    }
    catch(e)
    {
        window.alert("Popup window blocked " + e.number);
    }
}
function abreJanela(path,nome,altura,largura)
{
    try
    {
	    esquerda = (screen.width / 2) - (largura / 2);
	    emcima = (screen.height / 2) - (altura / 2);
	    window.open(path,nome,'width='+largura+',height='+altura+',left='+esquerda+', top='+emcima+', toolbar=no, location=no, directories=no, status=1, menubar=no, scrollbars=0, resizable=yes, titlebar=no');
	}
    catch(e)
    {
        window.alert("Popup window blocked " + e.number);
    }
}
function abreJanelaScroll(path,nome,altura,largura)
{
    try
    {
	    esquerda = (screen.width / 2) - (largura / 2);
	    emcima = (screen.height / 2) - (altura / 2);
	    window.open(path,nome,'width='+largura+',height='+altura+',left='+esquerda+', top='+emcima+', toolbar=no, location=no, directories=no, status=1, menubar=no, scrollbars=1, resizable=yes, titlebar=no');
	}
    catch(e)
    {
        window.alert("Popup window blocked " + e.number);
    }
}
function SWFViewer($arquivo, $altura, $largura, $id) {
    document.writeln(' <div>   <object id="globalnav-object" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + $largura + '" height="' + $altura + '" id="' + $id + '" name="' + $id + '">');
    document.writeln('        <param name="movie" value="' + $arquivo + '" />');
    document.writeln('        <param name="FlashVars" value="loc=en_US&htmlApp=false&gatewayURL=gwurl" />');
    document.writeln('        <param name="wmode" value="transparent">');
    document.writeln('        <param name="menu" value="false" />');
    document.writeln('        <param name="quality" value="high" />');
    document.writeln('        <param name="salign" value="tl" />');
    document.writeln('        <param name="scale" value="noscale" />');
    document.writeln('        <embed id="globalnav-embed" src="' + $arquivo + '" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="loc=en_US&htmlApp=false&gatewayURL=gwurl" bgcolor="#ffffff" menu="false" quality="high" salign="tl" scale="noscale" id="' + $id + '" width="' + $largura + '" height="' + $altura + '"></embed>');
    document.writeln('    </object></div>');
}