var hellotext="Novex Brasil"
var thetext=""
var started=false 
var step=0
var times=1 
function welcometext()
 {
  times--
  if (times==0)
  {
   if (started==false) 
   { 
    started = true;
    window.status = hellotext; 
    setTimeout("anim()",1);
   }
  thetext = hellotext;
  }
 }
function showstatustext(txt) 
 {
  thetext = txt;
  setTimeout("welcometext()",1000) 
  times++ 
 }
function anim() 
 {
  step++
  if (step==5) {step=1}
  if (step==1) {window.status=''+thetext+''}
  if (step==2) {window.status=''+thetext+''}
  if (step==3) {window.status=''+thetext+''}
  if (step==4) {window.status=''+thetext+''}
  setTimeout("anim()",50); 
 } 
welcometext();

function loadpage()
{
var num=document.form1.numero.value;

if ((num=="100") || (num=="101") || (num=="102") || (num=="150") || (num=="151") || (num=="152") || (num=="153") || (num=="154") || (num=="155") || (num=="156") || (num=="157") || (num=="158") || (num=="159") || (num=="160") || (num=="161") || (num=="171"))
{window.location.href=(num+'/index.htm')}
else
{alert('Número de identificação não cadastrado!')}

}

function FindObj(n, d)
{
var p,i,x;

if (!d)
d=document;
	
if ((p=n.indexOf("?"))>0&&parent.frames.length)
{
d=parent.frames[n.substring(p+1)].document;
n=n.substring(0,p);
}

if (!(x=d[n])&&d.all)
x=d.all[n];

for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];

for (i=0;!x&&d.layers&&i<d.layers.length;i++)
x=FindObj(n,d.layers[i].document);

if (!x && document.getElementById)
x=document.getElementById(n);
return x;
}

function EnviaForm()
{
var i, p, nm, test, num, errors='', args = EnviaForm.arguments;

	for (i=0; i<(args.length-2); i+=3)
	{
	test=args[i+2];
	val=FindObj(args[i]);
		
		if (val)
		{
		nm=val.name;
		
			if ((val=val.value)!="")
			{
			
				if (test.indexOf('isEmail')!=-1)
				{
				p=val.indexOf('@');
		
					if (p<1 || p==(val.length-1))
					{
					errors += '- '+nm+'.\n';
					}
					
				}
				
			}

			else

				if (test.charAt(0) == 'R')
				errors += '- '+nm+'.\n';

		}
								
	}	
	
	if (errors)
	alert('Verifique o(s) seguinte(s) campo(s):\n'+errors);
	document.EnviareturnValue = (errors == '');
}