/**************************************

	Biblioteca de Funções JAVASCRIPT

***************************************/

window.defaultStatus="Sistema COC de Ensino | Cobertura de Vestibulares";

var ie = (document.all)? true:false
var x  = "";
var y  = "";
var xx = "";
var pDiv,pObj;

function AbreDivAtendimento(p1,p2) {

 pDiv = p1;
 pObj = p2;
 
 xx = true;
	
 if (ie == false) {document.captureEvents(Event.MOUSECLICK);}
 
 if(pObj.onclick)
	document.onclick=mousemove2;
}
 
function mousemove2(e) {
 if(xx == true) {
	if (ie == false) {var mouseX=e.pageX; var mouseY=e.pageY}
	if (ie) {var mouseX=event.x; var mouseY=event.y}
 	
		document.getElementById(pDiv).style.margin = (parseInt(mouseY+8)+"px "+"10px")

	AbreDivAtendimento2();
	
	xx = false;
  }
}

function MostraMensagem(pMensagem)
{
	alert(pMensagem);
}

function MudaCorCelula(pCelula,pCor)
{
	pCelula.style.backgroundColor = pCor;
}

function AbreDivAtendimento2()
{

    var div,obj,alturaMostra,janelaBrowser,alturaDiv,alturaBarras,comprimentoPagina,NrPaginas,Posicao,PaginaAtual,Valor;
    
	div = pDiv;
	Obj = pObj;

	Valor = document.getElementById("xIdAtendimento").value;
	
	if (document.getElementById(div).style.display == "none"){
		document.getElementById(div).style.display = "block";
	}
	else{
		document.getElementById(div).style.display = "none";
    }
    
    redim("principal");
}

function AbreJanela(pUrl){
	win = window.open(pUrl,'imprimir','toolbar=no,width=669,height=400,scrollbars=yes,resizable=no');
	win.focus();
}


function redim(iframe){

	var altura;
	
	
	altura = parseInt(document.body.scrollHeight);
	parent.document.getElementById(iframe).style.height = altura;
	parent.document.getElementById(iframe).style.height = altura;
	parent.document.getElementById(iframe).style.height = altura;
	
		
}


function AbreDiv(pDiv)
{
	var div;
	
	div = pDiv;
	
	if (document.getElementById(div).style.display == "none"){
		document.getElementById(div).style.display = "block";
	}
	else{
		document.getElementById(div).style.display = "none";
    }
}


function FechaDiv(pDiv)
{

	document.getElementById(pDiv).style.display = "none";
}