//************************************************************************
// HTTP REQUEST **********************************************************
//************************************************************************
function getHTTPObject() {
  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        xmlhttp = false;
      }
    }
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}
var AjaxA = getHTTPObject();

//************************************************************************
// HTTP REQUEST **********************************************************
//************************************************************************

//*********************************************************************************

// PRELOAD DE IMAGENS ----------------------------------------------
<!--
<!-- Begin
image1 = new Image();
image1.src = "images/2009/bg_menu.gif";
image2 = new Image();
image2.src = "images/2009/bg_menu2.gif";
image3 = new Image();
image3.src = "images/2009/bg_menu3.gif";
image4 = new Image();
image4.src = "images/2009/bg_menu_ativo.gif";
image5 = new Image();
image5.src = "images/2009/bg_menu2_ativo.gif";
image6 = new Image();
image6.src = "images/2009/bg_menu3_ativo.gif";
image7 = new Image();
image7.src = "images/2009/bg_menu4.gif";
image8 = new Image();
image8.src = "images/2009/bg_menu4_ativo.gif";
image9 = new Image();
image9.src = "images/2009/fundo_opaco.png";
image10 = new Image();
image10.src = "images/2009/fechar.png";
image11 = new Image();
image11.src = "images/2010/menu_azul.gif";
image12 = new Image();
image12.src = "images/2010/menu_2010_azul_d.gif";
image13 = new Image();
image13.src = "images/2010/menu_2010_azul_e.gif";
// End -->
//-->
//*********************************************************************************

//*********************************************************************************
// BUSCAR NOTÍCIAS ----------------------------------------------
function busca_not(){

if(document.busca.word_key.value == ''){
	alert('Digite alguma palavra para pesquisar');
	document.busca.word_key.focus;
}else{
   
	if (document.busca.col[0].checked == true){
	document.location.href = 'pesquisa.php?word_key='+document.busca.word_key.value+'&col_id=0';
	}
	if (document.busca.col[1].checked == true){
	document.location.href = 'http://www.google.com/search?q='+document.busca.word_key.value+'&hl=pt-BR';
	}	
}
}
//*********************************************************************************

// POP-UPS ----------------------------------------------
function page_less(url, largura, altura) {
  var url;
  
  var esquerda = (screen.width - largura)/2;
  var topo = (screen.height - altura)/2;
  window.open(url,'win','height=' + altura + ', width=' + largura + ', top=' + topo + ', left=' + esquerda);
}
//*********************************************************************************

// SLIDER - POP-UPS ----------------------------------------------
function slider_popup(largura,altura,pasta,total,link_){
	var url = 'http://itnet.com.br/destaques/slider/index.php?largura='+largura+'&altura='+altura+'&pasta='+pasta+'&total='+total+'&link='+link_+'';
	page_less(url,largura,altura);
}
	
//*********************************************************************************

// COMENTAR ----------------------------------------------
function comentar(col_id, mat_id,mat_titulo) {

  var url;
  var largura = 250;
  var altura = 450;
  
  url = "comentar.php?col_id="+col_id+"&mat_id="+mat_id+"&mat_titulo="+mat_titulo;

  var esquerda = (screen.width - largura)/2;
  var topo = (screen.height - altura)/2;
  window.open(url,'win','height=' + altura + ', width=' + largura + ', top=' + topo + ', left=' + esquerda); 
}
//*********************************************************************************


// INDICAR ----------------------------------------------
function indicar(col_id, mat_id,mat_titulo) {

  var url;
  var largura = 250;
  var altura = 370;
  
  url = "indicar.php?col_id="+col_id+"&mat_id="+mat_id+"&mat_titulo="+mat_titulo;

  var esquerda = (screen.width - largura)/2;
  var topo = (screen.height - altura)/2;
  window.open(url,'win','height=' + altura + ', width=' + largura + ', top=' + topo + ', left=' + esquerda); 
}
//*********************************************************************************



// NOTÍCIAS ANTERIORES ----------------------------------------------
function noticias_col(col_id,exib,page)
{
	
	document.getElementById("anteriores_col").innerHTML = "<p>Carregando...</p>";
	AjaxA.open("GET", "includes/2009/noticias_ant.php?col_id="+col_id+'&exib='+exib+"&page="+page, true);
    AjaxA.onreadystatechange=function(){
        if(AjaxA.readyState==4){
	document.getElementById("anteriores_col").innerHTML = '';
	document.getElementById("anteriores_col").innerHTML = AjaxA.responseText;
        }
    }
    AjaxA.send(null)
}
//*********************************************************************************

function tabela_copa_2010()
{
	
	document.getElementById("dados_noticia_contro").innerHTML = '<p class="cinza_12_tahoma">Carregando Tabela...</p>';
	AjaxA.open("GET", "copa/copa_2010.php", true);
    AjaxA.onreadystatechange=function(){
        if(AjaxA.readyState==4){
	document.getElementById("dados_noticia_contro").innerHTML = '';
	document.getElementById("dados_noticia_contro").innerHTML = AjaxA.responseText;
        }
    }
    AjaxA.send(null)
}