<!-- aqui começa imagem no tamanho da janela // -->
	count = 0;
	count2 = 80;
	pontinho= '|';

function precarrega(){
	imgVar = new Image();
	imgVar.src = imagemVar;
	loadCheck();
}

function loadCheck(){
   if(pontinho.length == 20){
		pontinho = '|';
		}
	pontinho = pontinho + '|';

	if (imgVar.complete || navigator.appName == "Netscape"){
		terminacount();

		if (imgVar.width >= screen.availWidth || imgVar.height >= screen.availHeight){
			scrollVar="yes";
			}
		else{	scrollVar="no";
			}

		configura="width=500,height=500,resizable=no,top=50,scrollbars="+scrollVar+",left=150"

		pop=window.open('img.htm','',configura);
		
		count=0;

		if (navigator.appName == "Netscape"){
			setTimeout("pop.location.reload();", 3000);
			setTimeout("pop.location.reload();", 200);}}
	else{
		if (count < 80){
			count = count + 1;
			setTimeout('loadCheck()',200);
			window.status = 'Carregando Imagem!!! ==> '+count+'% '+pontinho;
			}
		else{ 
			setTimeout('loadCheck()',200);
			window.status = 'Carregando Imagem!!! ==> '+count2+'% '+pontinho;
			}
		}
}

function terminacount(){
	if (count2 < 100){
		count2 = count2 + 5;
		window.status = 'Imagem Carreganda !!! ==> '+count2+'%';
		setTimeout('terminacount()',10);
		}
	else {
		window.status = 'Imagem Carregada  !!! ==> 100%';
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function ValidaCampos()
	{
		var texto = ""
		var falso = 0  
				
	if (theForm.NomePaciente.value == "")
	{
		alert("Entre com um valor para o campo \"NOME DO PACIENTE\".");
		theForm.NomePaciente.focus();
		return (false);
	}
	  
	if (theForm.NomeRemetente.value == "")
	{
	alert("Entre com um valor para o campo \"SEU NOME\".");
	theForm.NomeRemetente.focus();
	return (false);
	}
	else
	{
	if (theForm.Mensagem.value == "")
	{
	alert("Entre com um valor para o campo \"MENSAGEM\".");
	theForm.Mensagem.focus();
	return (false);
	} 
	}		   
	return (true);
	}
