// JavaScript Document
//************************************************************************
// 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();



function noticias_col(col_id,exib,page)
{
	document.getElementById("rodape_col").innerHTML = "<p>Carregando...</p>";
	AjaxA.open("GET", "classes/noticias_ant.php?col_id="+col_id+'&exib='+exib+"&page="+page, true);
    AjaxA.onreadystatechange=function(){
        if(AjaxA.readyState==4){
	document.getElementById("rodape_col").innerHTML = '';
	document.getElementById("rodape_col").innerHTML = AjaxA.responseText;
        }
    }
    AjaxA.send(null)
}











function busca_not(){



if(document.getElementById("q").value == ''){
	alert('Digite alguma palavra para pesquisar');
	document.getElementById("q").focus;
}else{
   	document.location.href = 'http://www.google.com/search?q='+document.getElementById("q").value+'&hl=pt-BR';
	
}
}




function indicar(col_id, mat_id,mat_titulo) {

  var url;
  var largura = 250;
  var altura = 450;
  
  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); 
}

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); 
}


function menu(url){
document.location.href = url;
}




function IEHoverPseudo() {

	var navItems = document.getElementById("primary-nav").getElementsByTagName("li");
	
	for (var i=0; i<navItems.length; i++) {
		if(navItems[i].className == "menuparent") {
			navItems[i].onmouseover=function() { this.className += " over"; }
			navItems[i].onmouseout=function() { this.className = "menuparent"; }
		}
	}

}
window.onload = IEHoverPseudo;




function abrir_mural(id, template) {
  var url;
  var largura = 790;
  var altura = 550;
  

  url = "muraldefotos/templates/"+template+"/index.php?mur_id="+id;

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

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); 
}
