function abre()
{
	window.location = "index.php";
}

function help(x,y,z){
	janela = "left=25,top=25,screenX=25,screenY=25,menubar=0,scrollbars=1,status=0,toolbar=0,location=0,directories=0,resizable=0,width=" + y + ",height=" + z;
	window.open(x,'',janela);
}

function imenu(x,y,z){
	janela = "left=25,top=25,screenX=25,screenY=25,menubar=0,scrollbars=0,status=0,toolbar=0,location=0,directories=0,resizable=0,width=" + y + ",height=" + z;
	window.open(x,'',janela);
}


function fly(x,largura,altura){
	y = "left=20,top=20,screenY=350,screenX=20,scrollbars=1,menubar=0,status=1,toolbar=0,location=0,directories=0,resizable=1 width="+largura+",height="+altura;
	//x = x+".htm";
	window.open(x,"",y);
}


function ajustar_data(input)
{
	if ((event.keyCode<48)||(event.keyCode>57)){
		event.returnValue = false;
	} else {
		if ((input.value.length==2)||(input.value.length==5)){
			input.value=input.value + "/" ;
		}
	}
}

function ajustar_hora(input)
{
	if ((event.keyCode<48)||(event.keyCode>57)){
		event.returnValue =false;
	} else {
		if(input.value.length==2){
			  input.value=input.value + ":" ;
		}
	}
}

function ajustar_valor(input)
{
	if ((event.keyCode<46)||(event.keyCode==47)||(event.keyCode>57)){
		event.returnValue =false;
	} else {
		input.value = input.value;
	}
}


function ano_mes(input)
{
	if ((event.keyCode<48)||(event.keyCode>57)){
		event.returnValue =false;
	} else {
		if(input.value.length==4){
			  input.value=input.value + "/" ;
		}
	}
}

function validate(input)
{
	alert("Entrou");

	if(input.value=="")
	{
		alert("Por favor escolha uma figura.");
		input.focus();
   		return(false);
  	}
}

function newWindow(Localizacao){
	janela=window.open(Localizacao,"popaviso","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=600,top=0,left=0")
}

function CheckResolution()
{
	return(screen.width);
}