
function ativo(src) {

	if (!src.contains(event.fromElement))
	 {

	    src.bgColor = 'EAF7F7';
	 }
	}
	function inativo(src) {
	if (!src.contains(event.toElement))
	 {
	  src.bgColor = 'CCE9EA';
	 }
	}
	//



function clearText(thefield){
	if (thefield.defaultValue==thefield.value)
	thefield.value = ""
	} 


function PopUp(url,name,width,height) {
	var winX = 0;
  	var winY = 0;
  	var w = width;
  	var h = height;
  	// only set new values if 4.0 browser
  	if (parseInt(navigator.appVersion) >= 4) {
    	winX = (screen.availWidth - w)*.5;
    	winY = (screen.availHeight - h)*.5;
  	}
  	popupWin = window.open(url, name, 'scrollbars=no,resizable=no,width=' + w + ',height=' + h 	+ ',left=' + winX + ',top=' + winY);
	}
	//

function verify(form)
{
	for(var intCtr = 0; intCtr <= (form.elements.length - 3); ++intCtr)
	{
		var temp = form.elements[intCtr];

              if(temp.type == "text" && temp.value==0)
		{
			alert("Por favor preencha todos os campos solicitados");
			temp.focus();
			return false;
		}
	}
	return true;
}


function abrir(pagina,largura,altura) {

//pega a resolucao do visitante
w = screen.width;
h = screen.height;

//divide a resolucao por 2, obtendo o centro do monitor
meio_w = w/2;
meio_h = h/2;

//diminui o valor da metade da resolucao pelo tamanho da janela, fazendo com q ela fique centralizada
altura2 = altura/2;
largura2 = largura/2;
meio1 = meio_h-altura2;
meio2 = meio_w-largura2;

//abre a nova janela, ja com a sua devida posicao
window.open(pagina,'','height=' + altura + ', width=' + largura + ', top='+meio1+', left='+meio2+''); 
}

//






