function goToPage(thisValue) {
	var varValue = thisValue
	window.location.href = '/capa/default.asp?pagina=categoria&id=' + varValue
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function checkBusca() {
	var localidade = document.getElementById('localidade').value;
	var empresa = document.getElementById('nomeempresa').value;
	var servico = document.getElementById('produtoouservico').value;
	var estado = document.getElementById('iduf').value;
	if(localidade == '' && empresa == '' && servico == '' && estado == '') {
		alert('Você deve informar o palavra chave a pesquisar.     '); return false;
	}
}
	
	/*

function abreJanelaTPIQ(titulo,url,x,y,w,h) {
	abreJanelaTPI(document.getElementById("divWindow"),titulo,"verdana","normal","bold","8","#000000","img/ico_close_popup_out.gif","img/ico_close_popup_over.gif",url,x,y,w,h,2);
}

function openAdvertisePrintList(pForm, pObject, pTextPath) {
	var localUrl = mountAddressIdUrl(pForm);
    var localStatus = document.getElementById("status").value;

	if (localUrl == '') {
	alert('Selecione pelo menos 1 anuncio.');
	
	} else {
		abreJanelaTPIQ('Enviar para impressora','iAdvertisePrintList.do?' + localUrl + '&textPath=' + pTextPath + '&' + defaultParameters + '&status=' + localStatus,centerWidth(632),centerHeight(380),632,380);
	}
}
	
function verifyCheckAll() {
	var localForm = document.getElementById("mainFormNew");
	var localAchou = false;

	for (i = 0, n = localForm.elements.length; i < n; i++) {
		if (localForm.elements[i].name.indexOf("addressId") != -1) {
			if (localForm.elements[i].checked == false) {
				localAchou = true;
			}
		}
	}

	if (localAchou == true) { document.getElementById("chkAddress").checked = false; }
	else { document.getElementById("chkAddress").checked = true; }
}

var xmlhttp
var obj
function CarregaURL('check_cadastro.asp','janela')
{
	obj = objeto
	document.getElementById(obj).innerHTML="<center><br><br><b>carregando...<b></center>"
// code for Mozilla, etc.
if (window.XMLHttpRequest)
  {
  xmlhttp=new XMLHttpRequest()
  xmlhttp.onreadystatechange=state_Change
  xmlhttp.open("GET",url,true)
  xmlhttp.send(null)
  }
// code for IE
else if (window.ActiveXObject)
  {
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
    if (xmlhttp)
    {

  xmlhttp.onreadystatechange=state_Change
  xmlhttp.open("GET",url,true)
  xmlhttp.send()
    }
  }
}

function state_Change()
{
// if xmlhttp shows "loaded"
if (xmlhttp.readyState==4)
  {
  // if "OK"
  if (xmlhttp.status==200)
  {
  document.getElementById(obj).innerHTML=xmlhttp.responseText
  }
  else
  {
  alert("Problema no envio dos dados:" + xmlhttp.statusText)
  }
  }
}

function abreJanelaTPI(local,titulo,titleFontFamily,titleFontStyle,titleFontWeight,titleFontSize,titleFontColor,botClose,botClose_on,src,x,y,w,h,align) {
	var str;
	//if(is.ie) {
		str = ''+
		'<iframe id="framefundo" src="check_cadastro.asp" width="'+w+'px;" height="'+h+'px;" scrolling="no" frameborder="0" style="position:absolute;display:;FILTER: progid:DXImageTransform.Microsoft.Shadow(direction=135,color=#DADADA,strength=3);visibility:visible;left:'+x+';top:'+y+'"></iframe>\n'+
		'<div id="janela" style="position:absolute;left:'+x+'px; top:'+y+'px; width:'+w+'px;height:'+h+'px;background:#E0E0E0;border-top: 1px solid #E8E8E8; border-left: 1px solid #E8E8E8; border-right: 1px solid #9C9C9C; border-bottom: 1px solid #9C9C9C;z-index:1;">\n'+
		' <div id="bordajanela" style="border-left: 1px solid #DBDBDB; border-right: 1px solid #CDCDCD; border-bottom: 1px solid #CDCDCD;z-index:1;">\n'+
		'   <div id="titulo" style="font-family:'+titleFontFamily+';font-style:'+titleFontStyle+';font-weight:'+titleFontWeight+';font-size:'+titleFontSize+'pt;color:'+titleFontColor+';position:absolute;left:'+(8)+'px; top:'+(align+2)+'px; width:550px;height:21px;z-index:1;bgcolor:#A0A0A0">'+titulo+'</div>\n'+
		'   <img id=windowDrag src="img/shim.gif" style="position:absolute;left:0px; top:0px; width:'+w+'px;height:25px;cursor:move;z-index:2;"/>\n'+
		'	<img id=closeButton src="'+botClose+'" onmouseover="this.src=\''+botClose_on+'\'" onmouseout="this.src=\''+botClose+'\'" onclick="javascript:escondeJanela();" style="position:absolute;left:'+(w-20)+'px;top:'+align+'px;width:15;height:15;border:0px;z-index:3;"/>\n'+
		'	<iframe src="'+src+'" name="contentFrame" id="contentFrame" scrolling="no" width='+(w-7)+' height='+(h-26)+' marginwidth="0" marginheight="0" frameborder="no" style="position:absolute;left:2px;top:21px;"></iframe>\n'+
		' </div>'+
		'</div>';
	}
	else{
		str = ''+
		'<div id="janela" style="position:absolute;left:'+x+'px; top:'+y+'px; width:'+w+'px;height:'+h+'px;background:#E0E0E0;border-top: 1px solid #E8E8E8; border-left: 1px solid #E8E8E8; border-right: 1px solid #9C9C9C; border-bottom: 1px solid #9C9C9C;z-index:1;">\n'+
		' <div id="bordajanela" style="border-left: 1px solid #DBDBDB; border-right: 1px solid #CDCDCD; border-bottom: 1px solid #CDCDCD;z-index:1;">\n'+
		'   <div id="titulo" style="font-family:'+titleFontFamily+';font-style:'+titleFontStyle+';font-weight:'+titleFontWeight+';font-size:'+titleFontSize+'pt;color:'+titleFontColor+';position:absolute;left:'+(8)+'px; top:'+(align+2)+'px; width:550px;height:21px;z-index:1;bgcolor:#A0A0A0;cursor:move">'+
		'   <ilayer width="100%" onSelectStart="return false">'+
        '     <layer width="100%">'+
		'     '+titulo+
		'     </layer>'+
		'   </ilayer>'+
		'   </div>\n'+
		'	<img id=closeButton src="'+botClose+'" onmouseover="this.src=\''+botClose_on+'\'" onmouseout="this.src=\''+botClose+'\'" onclick="javascript:escondeJanela();" style="position:absolute;left:'+(w-20)+'px;top:'+align+'px;width:15;height:15;border:0px;z-index:3;"/>\n'+
		'	<iframe src="'+src+'" name="contentFrame" id="contentFrame" scrolling="no" width='+(w-7)+' height='+(h-26)+' marginwidth="0" marginheight="0" frameborder="no" style="position:absolute;left:2px;top:21px;z-index:4"></iframe>\n'+
		' </div>'+
		'</div>';
	}
	
	setaMouseHandler();
	CarregaURL.innerHTML=str;
}
*/