var ie = (window.navigator.userAgent.indexOf("MSIE")>0 ? true : false);
var ns = (window.navigator.userAgent.indexOf("MSIE")>0 ? false : true);
var isNS6=false;
if (ns){
    if (navigator.appVersion.charAt(0) == "5"){
      isNS6 = true;
    } 
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
var offset_l = 0;
var offset_r = 0;
function InicDivs()
{
      if (ns){
	     document.getElementById("idResGastos").style.top= -141
	     document.getElementById("idResIngresos").style.top= -181
	  }
	  else{
         document.all["idResGastos"].style.pixelTop = -142 + offset_l;
         document.all["idResIngresos"].style.pixelTop = -184 + offset_r;
	  }
}
function showHideLayers(){ //v2.0 
 var i, visStr, args, theObj;
 args = showHideLayers.arguments;
 for (i=0; i<(args.length-1); i+=2){ //with arg triples (objNS,objIE,visStr)
    visStr   = args[i+1];
    
    if (ns){
      theObj = document.getElementById(args[i]);
      if (visStr == 'show'){
		visStr = 'visible';
      }
      else{	
        visStr = 'hidden';
      }
      if (theObj) { theObj.style.visibility = visStr};
    }
    else if (document.all != null){ //IE
      if (visStr == 'show'){
		visStr = 'visible';
      }
      else{
        visStr = 'hidden';
      }
      theObj = document.all[args[i]];
      if (theObj) theObj.style.visibility = visStr;
    }
 }
}

