<!-- 
//***********************************************************************
function LocURL(url) {
if (url != "") 
{ document.location = (url); }
}
//***********************************************************************
function IrParaEvento(idEvento) {
if (idEvento != "") 
{ document.location = ('Galeria.asp?Evento='+idEvento); }
}
//***********************************************************************
function AbreJanela(theURL,winName,features) 
{ window.open(theURL,winName,features); }

//***********************************************************************
function AbreNovaJanelaFull(url,Nome) {
var width; var height;
height = (screen.height);
width  = (screen.width) - 8;
if (url != "") 
{
window.open(url,Nome,'status=yes,scrollbars=yes,resizable=yes,width='+width+',height='+height+',left=0,top=0','fullscreen = yes'); }
}
//***********************************************************************
function AbreJanelaPop(aPag,oNome,w,h) { //v2.0
var top; var left; var width; var height;
width  = w;
height = h;
top = (screen.height/2)-(height/1.6);
left = (screen.width/2)-(width/2);
AbreJanela(aPag,oNome,'status=yes,scrollbars=yes,width='+width+',height='+height+',left='+left+',top='+top);
}
//***********************************************************************
function ComfirmaRedireciona(aPag,aMsg) {
if(confirm(aMsg)){
    document.location = aPag;
} else {
	return; //document.write("Cancelado!");
}

}
//***********************************************************************
function goTo(form) {
var myindex = form.dest.selectedIndex;
var IdCat   = (form.dest.options[myindex].value);

if (IdCat != "") 
{ document.location = ('FotosFestas.asp?idCat='+IdCat); }
else
{ document.location = ('FotosFestas.asp.asp'); }
}
//***********************************************************************
function goToEvento(form) {
var myindex  = formTop.destevento.selectedIndex;
var IdEvento = (formTop.destevento.options[myindex].value);

if (IdEvento != "") {
document.location = ('Galeria.asp?Evento='+IdEvento);
}
else
{ document.location = ('Galeria.asp'); }
}
//***********************************************************************
function AbreEnquete(url, width, height)
{
window.open(url,"_blank","resizable=yes,toolbar=no,status=no,menubar=no,scrollbars=yes,width=" + width + ",height=" + height)
}

function Fun_Enviar(formID,tipo,strAdd)
{
	var formularios = document.forms.length;
	for(i=0;i<formularios;i++)
		{
		if(document.forms[i].name==formID)
		{
		var formulario = i;
		break;
		}
	}
	var num_respostas = document.forms[formulario].opcao.length;
	var resposta = num_respostas;
	var respostas = "";
	for(i=0;i<num_respostas;i++)
		{
		if(document.forms[formulario].opcao[i].checked)
			{
			resposta = i;
			if(respostas)
			{
				respostas=respostas + "&";
			}
			else
			{
				respostas=respostas + "?";
			}
			respostas=respostas + "opcao=" + document.forms[formulario].opcao[i].value;
		}
	}
	if(resposta==num_respostas)
	{
	alert("Uma opção deve ser escolhida!");
	}
	else
	if (tipo == 1) 
	{
    var top; var left; var width; var height; var strAdd2;
    strAdd2 =  strAdd;
	width   = 780;
    height  = 620;
    top     = (screen.height/2)-(height/1.6);
    left    = (screen.width/2)-(width/2);
	AbreEnquete("Enquete.asp" + respostas + strAdd2,'Eqt_'+formID,'status=yes,scrollbars=yes,width='+width+',height='+height+',left='+left+',top='+top);
//	AbreEnquete("Enquete_Acoes.asp" + respostas + strAdd2,'Eqt_'+formID,'status=yes,scrollbars=yes,width='+width+',height='+height+',left='+left+',top='+top);
//	AbreEnquete("Enquete_Acoes.asp" + respostas,width,height);
	}
	else
	
    {    window.location = "Enquete_Acoes.asp" + respostas+strAdd; }
}
//-------------------------------------------------------------------------------------
function EnquetePopup(idE)
{
    var top; var left; var width; var height;
    width  = 500;
    height = 420;
    top    = (screen.height/2)-(height/1.6);
    left   = (screen.width/2)-(width/2);
	AbreJanela("Enquete.asp?ID="+idE,'Eqt_'+idE,'status=yes,scrollbars=yes,width='+width+',height='+height+',left='+left+',top='+top);
}
//-------------------------------------------------------------------------------------
function EnquetePopupParcial(idE)
{
    var top; var left; var width; var height;
    width  = 500;
    height = 420;
    top    = (screen.height/2)-(height/1.6);
    left   = (screen.width/2)-(width/2);
//	AbreEnquete("Enquete_PopUp.asp?ID=" + idE,width,height);
	AbreJanela("Enquete_Popup.asp?ID="+idE,'Eqt_'+idE,'status=yes,scrollbars=yes,width='+width+',height='+height+',left='+left+',top='+top);
}
//-------------------------------------------------------------------------------------
//***********************************************************************
function FiltraMarca(form) {
var myindex = form.idMarca.selectedIndex;
idMarca = (form.idMarca.options[myindex].value);
document.frmbusca.submit();
//document.location = 'BuscaVeiculos.asp?idMarca='+idMarca
}

function FiltraSecao(form) {
var myindex = form.idSecao.selectedIndex;
idSecao = (form.idSecao.options[myindex].value);
document.frmbusca.submit();
//document.location = 'BuscaVeiculos.asp?idMarca='+idMarca
}
//***********************************************************************
function playFullscreen(WM) {
if (3 == document.WM.playState) {
document.WM.fullscreen = 'true';
}
document.WM.controls.play();
}

function playFullscreen2() {
if (3 == MediaPlayer.playState) {
MediaPlayer.fullscreen = 'true';
}
MediaPlayer.controls.play();
}
//***********************************************************************
function EnterPress(e)
            {
                var keynum;
                if(window.event) // IE
                    keynum = e.keyCode;
                else if(e.which) // Netscape/Firefox/Opera
                    keynum = e.which;
                if (keynum == 13)
                {
				document.oform.submit();
                    return true;
                }
                else
                    return false;
            }
			
			
			
// -->