//////////////////////////////////////////////////////////////
//  Código de Verificação do Campo Pesquisar                //
//////////////////////////////////////////////////////////////
function VerificaVazio () 
{
	if (document.all.fPesquisar.value == "")
		{
			alert ('O Campo "Pesquisar" \u00e9 de preenchimento obrigat\u00f3rio.');
		}
	else
		{			
		location.href = "Default.aspx?Module=Pesquisa&q=" + document.all.fPesquisar.value;
		}
}

function imprime(ControlName) {
	var win = window.open("", "imprime", "width=660, left=150, scrollbars=yes, toolbar=no, titlebar=no, menubar=no, resizable=no, status=no");
	var doc = win.document;
	doc.open("text/html", "replace");
	doc.write("<LINK href=css/ResultadosEleitorais.css type=text/css rel=stylesheet>");
	doc.write(document.getElementById(ControlName).innerHTML);
	win.print();
	doc.close();
}



//////////////////////////////////////////////////////////////
//  Código de Verificação da Agenda Cultural                //
//////////////////////////////////////////////////////////////

function textClean(objT) {
		if (objT.value == "[TEXTO]") objT.value = "";
	}
function textWrite(objT) {
		if (objT.value.length == 0) objT.value = "[TEXTO]";
	}
	
	
//////////////////////////////////////////////////////////////
//  NewsLetter									            //
//////////////////////////////////////////////////////////////
function Delete(strTable, strPage, ID, IDField, strTableAux1, strTableAux2)
{
	var intValue;
	var url = "default.aspx?module=aspxDeleteForm&ShowHeaderFooter=NO&table=" + strTable + "&ID=" + ID;
	if (IDField != '') url += "&Field=" + IDField;
	if (strTableAux1 != '') url += "&TableAux1=" + strTableAux1;
	if (strTableAux2 != '') url += "&TableAux2=" + strTableAux2;
	if (strPage != '') { url += "&page=" + strPage; } else { url += "&page=" + strPage; }
	intValue = window.open(url, "", "left=300,top=300,Height=10,Width=110,status=no,toolbar=no,menubar=no,location=no,scroll=no,help=no;");
}

//Abrir janela de conteúdos para a NewsLetter//

function OpenWindow(link, name, param)
{
	window.open(link, name, param);
}

//////////////////////////////////////////////////////////////
//  Abrir Popup  								            //
//////////////////////////////////////////////////////////////






