function MM_effectBlind(targetElement, duration, from, to, toggle){
	Spry.Effect.DoBlind(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

var i;
function fechar_layer(i)
{
i.style.visibility='hidden';
}
function fecha_auto(i){
	setTimeout("i.style.visibility='hidden'", 10000);
}

function linkagemP(i){
	window.location=i;
}

function linkagem(i){
	window.location="../"+i;
}

function checa(nform) {
	if (nform.texto.value == "") {
		alert("Informe o que procura!");
		nform.texto.focus();
		nform.texto.select();
		return false;
	} else { 
		return true;
	}
}

function exibir(nome) {
this.nome = nome;

var status = document.getElementById(nome).style.display;

if (status == 'none') {
document.getElementById(nome).style.display = ''; } else {
document.getElementById(nome).style.display = 'none'; }

}
function popup(i){
	window.open(i,'Galeria_de_Fotos','width=525,height=400');
}

function semvalor(){
	document.formulario.val01.disabled = 1;
}
function habilita(){
	document.formulario.val01.disabled = 0;
}

function txtBoxFormat(objForm, strField, sMask, evtKeyPress) {
var i, nCount, sValue, fldLen, mskLen,bolMask, sCod, nTecla;

if(document.all) { // Internet Explorer
nTecla = evtKeyPress.keyCode; }
else if(document.layers) { // Nestcape
nTecla = evtKeyPress.which;
}

sValue = objForm[strField].value;

// Limpa todos os caracteres de formatação que
// já estiverem no campo.
sValue = sValue.toString().replace( "-", "" );
sValue = sValue.toString().replace( "-", "" );
sValue = sValue.toString().replace( ".", "" );
sValue = sValue.toString().replace( ".", "" );
sValue = sValue.toString().replace( ":", "" );
sValue = sValue.toString().replace( ":", "" );
sValue = sValue.toString().replace( "/", "" );
sValue = sValue.toString().replace( "/", "" );
sValue = sValue.toString().replace( "(", "" );
sValue = sValue.toString().replace( "(", "" );
sValue = sValue.toString().replace( ")", "" );
sValue = sValue.toString().replace( ")", "" );
sValue = sValue.toString().replace( " ", "" );
sValue = sValue.toString().replace( " ", "" );
fldLen = sValue.length;
mskLen = sMask.length;

i = 0;
nCount = 0;
sCod = "";
mskLen = fldLen;

while (i <= mskLen) {
bolMask = ((sMask.charAt(i) == "-") || (sMask.charAt(i) == ".") || (sMask.charAt(i) == ":") || (sMask.charAt(i) == "/"))
bolMask = bolMask || ((sMask.charAt(i) == "(") || (sMask.charAt(i) == ")") || (sMask.charAt(i) == " "))

if (bolMask) {
sCod += sMask.charAt(i);
mskLen++; }
else {
sCod += sValue.charAt(nCount);
nCount++;
}

i++;
}

objForm[strField].value = sCod;

if (nTecla != 8) { // backspace
if (sMask.charAt(i-1) == "9") { // apenas números...
return ((nTecla > 47) && (nTecla < 58)); } // números de 0 a 9
else { // qualquer caracter...
return true;
} }
else {
return true;
}
}

_editor_url = "";

var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
	
	if (navigator.userAgent.indexOf('Mac')>= 0){ 
		win_ie_ver = 0;
	}
	if (navigator.userAgent.indexOf('Windows CE')>= 0){
		win_ie_ver = 0;
	}
	if (navigator.userAgent.indexOf('Opera')>= 0){
		win_ie_ver = 0;
	}
	if (win_ie_ver >= 5.5){
		document.write('<scr' + 'ipt src="' +_editor_url+ 'editor/editor.js"');
		document.write(' language="Javascript1.2"></scr' + 'ipt>');
	}else{
		document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>');
	}
function linkagem(i){
	window.location=i;
}
function confirma (i) {
var confirma= false;
confirma=confirm("Deseja excluir?");

if(confirma){         
  window.location=i;
} else{
  return false
}
}
function somente_numero(campo){
    var digits="0123456789"
    var campo_temp 
    for (var i=0;i<campo.value.length;i++){
      campo_temp=campo.value.substring(i,i+1)    
      if (digits.indexOf(campo_temp)==-1){
            campo.value = campo.value.substring(0,i);
            break;
       }
    }
}

