	function vertablaUnica(TitleDiv){
		if(eval("tabla"+TitleDiv+".style.display=='none'"))
			showsDivUnico(TitleDiv);
		else
			hidesDivUnico(TitleDiv);
	}
	function showsDivUnico(TitleDiv){
	  eval("tabla"+TitleDiv+".style.display='block';");
	  window.uno.className = 'azul1';
	  window.dos.className = 'azul2';
	  window.tres.className = 'azul3';
	}
	function hidesDivUnico(TitleDiv){
		eval("tabla"+TitleDiv+'.style.display="none";');     
		window.uno.className = 'gris1';
		window.dos.className = 'gris2';
		window.tres.className = 'gris3';
    }
    function boton_onmouseover(ix){
		ix.style.backgroundColor='#ffe047';			
	}

	function boton_onmouseout(ix){
		ix.style.backgroundColor='Oldlace';			
	}
	
function fjgEnvia(f,sPag){
	  f.target="satcargadatos";
      f.method="post";
      f.action=sPag;
      f.submit(); 
}

function GoesBack(){
		window.history.back(1) ;
	return;
}
 

function fjgRight(e) {
	 var ms = "Citas de Atención al Contribuyente";
	 if (navigator.appName == 'Netscape' && e.which == 3) {
		alert(ms);  
		return false;
	}else if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
		alert(ms); 
		return false;
	}
    return true;
}


function fjgManejaCaracter(Text,Tipo,Band,Band1,Band2){
      //tipo a = alfanuméricos, si Band = 1 se permiten espacios en blanco, si Band1 = 1 se permiten enter, si Band2 = 1 se permite la / y \
      //tipo A = alfanuméricos mayúsculas, si Band = 1 se permiten espacios en blanco
      //tipo N = numéricos, si Band = 1 se permiten negativos
      var strVal = Text.value;
      var r;
      var c = event.keyCode;

      switch (Tipo){
         case 'a':
         	//SOLO PERMITE LETRAS DEL ALFABETO Y NUMEROS
         	if((c>=65 && c<=90) || (c>=97 && c<=122) || (c>=40 && c<=46) || (c>=48 && c<=59) || c==64 || c==95 ){r=true;}else{r=false;}
            //PERMITE ESPACIOS
            if(c==32 && Band == 1){r=true;} 
            //PERMITE ENTER
            if( c==13 && Band1 == 1){r=true;}
            //PERMITE DIAGONALES
            if((c==47 || c==92) && Band2 == 1){r=true;}            
            //PERMITE ACENTOS
            if( c==193 || c==225 || c==201 || c==233 || c==205 || c==237 || c==211 || c==243 || c==218 || c==250 || c==241 || c==209){r=true;}            
            break;
         case 'A':
            //SOLO PERMITE LETRAS DEL ALFABETO MINUSCULAS Y MAYUSCULAS Y LA Ñ
            if((c>=65 && c<=90) || (c>=97 && c<=122) || (c>=48 && c<=57) || c==209){r=true;}else{r=false;}
            //PERMITE ESPACIOS
            if(c==32 && Band == 1){r=true;}
            //CONVIERTE A MAYUSCULAS
            if(c>=97 && c<=122){event.keyCode -= 32} 
            //PERMITE ENTER
            if( c==13 && Band1 == 1){r=true;}
            //PERMITE DIAGONALES
            if((c==47 || c==92) && Band2 == 1){r=true;}             
            // PERMITE LA ñ
            if(c==241){r=true;event.keyCode -= 32}
            //PERMITE ACENTOS
            if( c==193 || c==201 || c==205 || c==211 || c==218 ){r=true;}
            if( c==225 || c==233 || c==237 || c==243 || c==250 ){r=true;event.keyCode -= 32}
            break;
         case 'N':
            if(c>=48 && c<=57){r=true;}else{r=false;}
            if(c == 45 && strVal.length == 0 && Band == 1){r=true;}
            break;
      }
      event.returnValue=r;
      return;
   }

function fjgValidaRangoFecha(fechaIni,fechaFin){
	var strTMP1,strTMP2;
	var dteIni,dteFin; 

	strTMP1=fechaIni.split("/");
	strTMP2=fechaFin.split("/");

	if (strTMP1.length!=3)
		{ return false;}
	if (strTMP2.length!=3)
		{ return false;}

	if( fjgisDate(strTMP1[0],strTMP1[1],strTMP1[2])==false)
		{return false;}
	else
		{ dteIni = new Date(strTMP1[2],strTMP1[1],strTMP1[0]);}		

	if( fjgisDate(strTMP2[0],strTMP2[1],strTMP2[2])==false)
		{return false;}
	else
		{ dteFin = new Date(strTMP2[2],strTMP2[1],strTMP2[0]);}		

	if (dteFin >= dteIni)
		{	return true;}
	else		
		{	return false;}
}

function fjgisDate(day, month, year){
      if(day != "" && month != "" && year != ""){
         month--;
         year = fjgy2k(year);
         var fecha = new Date(year, month, day);
         if(day == fecha.getDate() && month == fecha.getMonth() && year ==
            fecha.getFullYear())
            return true;
         else 
            return false;
      }
      else
         return false;
   }

function fjgy2k(number){
   return (number < 1000) ? number + 1900 : number;
}

 function fjgWork(nOpc) {
	var sForm = window.parent.abajo;
	if (eval(nOpc) == 1){
		sForm.divWork.style.display ="block";
	}
	if (eval(nOpc) == 0){
		sForm.divWork.style.display ="none";
	}	
}

function fjgImprimir(){
		window.document.body.style.cursor = "wait";
		window.focus();
		window.print();
		window.document.body.style.cursor = "default";
}

// PARA EL DESPLIEGUE EN BOUNCE

var ie=document.all
var dom=document.getElementById
var ns4=document.layers
var calunits=document.layers? "" : "px"

var bouncelimit=8 
var direction="up"

function initbox(){
	if (!dom&&!ie&&!ns4)
	return
	crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
	scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
	crossobj.top=scroll_top-250+calunits
	crossobj.visibility=(dom||ie)? "visible" : "show"
	dropstart=setInterval("dropin()",50)
}

function dropin(){
	scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
	if (parseInt(crossobj.top)<5+scroll_top)
		crossobj.top=parseInt(crossobj.top)+40+calunits
	else{
		clearInterval(dropstart)
	bouncestart=setInterval("bouncein()",100)
	}
}

function bouncein(){
	crossobj.top=parseInt(crossobj.top)-bouncelimit+calunits
if (bouncelimit<0)
	bouncelimit+=8
	bouncelimit=bouncelimit*-1
if (bouncelimit==0){
	clearInterval(bouncestart)
	}
}

function dismissbox(){
	if (window.bouncestart) clearInterval(bouncestart)
		crossobj.visibility="hidden"
	}

function truebody(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function redo(){
	bouncelimit=8
	direction="up"
	initbox()
}

// FIN . PARA EL DESPLIEGUE EN BOUNCE