
///////////////////////////////////////////////////////////////////////
function BuscaGo() {
function subs (tst) {
var tst = tst;
tst = escape(tst);
tst = tst.replace(/a/gi, "a");
tst = tst.replace(/á/gi, "a");
tst = tst.replace(/â/gi, "a");
tst = tst.replace(/é/gi, "e");
tst = tst.replace(/e/gi, "e");
tst = tst.replace(/í/gi, "i");
tst = tst.replace(/î/gi, "i");
tst = tst.replace(/ó/gi, "o");
tst = tst.replace(/ô/gi, "o");
tst = tst.replace(/ú/gi, "u");
tst = tst.replace(/u/gi, "u");
tst = tst.replace(/ç/gi, "c");
tst = encodeURI(tst);
tst = tst.replace(/%C3%B5/gi, "o");
tst = tst.replace(/%C3%A3/gi, "a");
tst = tst.replace(/%C3%AA/gi, "e");
tst = tst.replace(/%C3%BB/gi, "u");
tst = tst.replace(/%C3%B1/gi, "n");
tst = tst.replace(/%C3%A7/gi, "c");
return tst;
}
var qx_value = subs(document.busca.q.value);
var extrax = subs(document.busca.extrax.value);
var extra = document.busca.extra.value;
var base = document.busca.root.value;
if(extrax==''){
var URL = base + 'busca/' + qx_value ;
location.href = URL;
} else {
var URL = base + 'busca/'+qx_value+'/'+extra+'/'+extrax ;
location.href = URL;
}
}

///////////////////////////////////////////////////////////////////////
function focus() {
document.busca.q.focus();
return;
}


///////////////////////////////////////////////////////////////////////
function include(file_path){
var j = document.createElement("script"); /* criando um elemento script: </script><script></script> */
j.type = "text/javascript"; /* informando o type como text/javacript: <script type="text/javascript"></script>*/
j.src = file_path; /* Inserindo um src com o valor do parâmetro file_path: <script type="javascript" src="+file_path+"></script>*/
document.body.appendChild(j); /* Inserindo o seu elemento(no caso o j) como filho(child) do  BODY: <html><body><script type="javascript" src="+file_path+"></script></body></html> */
}
//incluindo um arquivo com a função include()
//include("arquivo.js");

//	INCLUDES DE JAVASCRIPT
include("js/jquery.js");
include("js/slug.js");

/*
function include_once(file_path) {
var sc = document.getElementsByTagName("script");
for (var x in sc)
if (sc[x].src != null &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp; sc[x].src.indexOf(file_path) != -1) return;
include(file_path);
}
//incluindo um arquivo com a função include_once()
//include_once("arquivo.js");
*/


///////////////////////////////////////////////////////////////////////
function site() {
  busca = document.getElementById("Site").value;
  var atualiza=document.getElementById("resultado");
  atualiza.innerHTML='load...'

  ajax = ajaxInit();
  
  if (ajax) {
     ajax.open("POST", "php/check.php?domain="+busca , true);
     ajax.onreadystatechange = function () {
        if (ajax.readyState == 4) {
           if (ajax.status == 200) {
            var texto=ajax.responseText
            texto=texto.replace(/\+/g," ")
            texto=unescape(texto)
              atualiza.innerHTML = texto;
           } else {
              alert(ajax.statusText);
           }
        }
     }
     ajax.send(null);
  }
}
///////////////////////////////////////////////////////////////////////
function init() {
createExternalLinks();
createNoFollowLinks();
}
//////////////////////////////
function createExternalLinks() {
if(document.getElementsByTagName) {
var anchors = document.getElementsByTagName('a');
for(var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if(anchor.getAttribute("href") && anchor.getAttribute('rel')=='external') {
anchor.target = '_blank';
var title = anchor.title + ' (Este link abre uma nova janela)';
anchor.title = title;
}}}}
//////////////////////////////
function createNoFollowLinks() {
if(document.getElementsByTagName) {
var anchors = document.getElementsByTagName('a');
for(var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if(anchor.getAttribute("href") && anchor.getAttribute('rel')=='nofollow') {
anchor.target = '_blank';
var title = anchor.title + ' (Este link abre uma nova janela)'; 
anchor.title = title;
}}}}
//////////////////////////////
function addEvent(obj, evType, fn){
if(obj.addEventListener){
obj.addEventListener(evType, fn, false);
return true;
} else if (obj.attachEvent){
var r = obj.attachEvent('on'+evType, fn);
return r;
} else {return false;}}
addEvent(window, "load", init);
//////////////////////////////
function MM_findObj(n, d) { 
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { 
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} 
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; 
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); 
if(!x && d.getElementById) x=d.getElementById(n); return x; 
} 
function MM_validateForm() { 
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments; 
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]); 
if (val) { nm=val.name; if ((val=val.value)!="") { 
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); 
if (p<1 || p==(val.length-1)) errors+='- O '+nm+' precisa conter um e-mail válido.\n'; 
} else if (test!='R') { num = parseFloat(val); 
if (isNaN(val)) errors+='- '+nm+' precisa conter números.\n'; 
if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); 
min=test.substring(8,p); max=test.substring(p+1); 
if (num<min || max<num) errors+='- '+nm+' precisa conter números entre '+min+' e '+max+'.\n'; 
} } } else if (test.charAt(0) == 'R') errors += '->  '+nm+'\n'; } 
} if (errors) alert('Estas informações são obrigatórias:\n\n'+errors); 
document.MM_returnValue = (errors == ''); } 
//////////////////////////////

<!--
function show(div){ $("#" + div).slideDown(300); }
function hide(div){ $("#" + div).slideUp(300); }
function sg(div , div2){ 
if($("#" + div).css("display") == "none"){
show(div);
$("#" + div2).css("background","#6CF url('img/fundo-email.jpg')");
//$("#" + div2).css("border","1px solid #369");
$("#" + div2).css("font","bold 20px arial");
$("#" + div2).css("padding","2px");
$("#" + div2).css("padding-left","5px");
} else{
hide(div);
$("#" + div2).css("background","none");
$("#" + div2).css("border","none");
$("#" + div2).css("padding","0");
} }
//-->



function espec(msg) {
  var atualiza=document.getElementById('timeload');
  atualiza.innerHTML= msg;
  ajax = ajaxInit();
  }