<!--
var ns6 = document.getElementById&&!document.all
var ie4 = document.all&&navigator.userAgent.indexOf("Opera")==-1

//By George Chiang (www.javascriptkit.com) JavaScript site.
img1=new Image()
img1.src="/web_medida/menus/img/fold_rojo.gif"
img2=new Image()
img2.src="/web_medida/menus/img/fold_open.gif"
img3=new Image()
img3.src="/web_medida/menus/img/fold_rojo.gif"
img4=new Image()
img4.src="/web_medida/menus/img/fold_open.gif"
ns6_index=0

/*
 * http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256BF8004D72D6
 */
function dumpProps(obj, parent) {
	var _msg = "";
   // Go through all the properties of the passed-in object 
   for (var i in obj) {
      // if a parent (2nd parameter) was passed in, then use that to 
      // build the message. Message includes i (the object's property name) 
      // then the object's property value on a new line 
      if (parent) { var msg = parent + "." + i + "\n" + obj[i]; } else { var msg = i + "\n" + obj[i]; }
      
	  // Display the message. If the user clicks "OK", then continue. If they 
      // click "CANCEL" then quit this level of recursion 
      /*if (!confirm(msg)) { return; }*/
	  
      // If this property (i) is an object, then recursively process the object 
      /*if (typeof obj[i] == "object") { 
         if (parent) { dumpProps(obj[i], parent + "." + i); } else { dumpProps(obj[i], i); }
      }*/
	  _msg += i + "\n" + msg + "\n";
   }
   //alert(_msg);
}


/* Returns the class of the argument or undefined if it's not a valid JavaScript
   object.
*/
function getObjectClass(obj)
{
    if (obj && obj.constructor && obj.constructor.toString)
    {
        var arr = obj.constructor.toString().match(/function\s*(\w+)/);
        return arr && arr.length == 2 ? arr[1] : undefined;
    }
    else
    {
        return undefined;
    }
}

function ml_desplegar_eliminar(e) {
	if(!document.all&&!document.getElementById)	return
	if (!document.all&&document.getElementById)	ns6_index=1
	
	var source = e;
	if (source.className=="ml_folding"){
		var source2=document.getElementById&&!document.all? source.parentNode.childNodes:source.parentElement.all
		if (source2[2+ns6_index].style.display=="none"){
			source2[0].src="/web_medida/menus/img/fold_open.gif"
			source2[2+ns6_index].style.display=''
		}
	}
	if (source.className=="mn_folding"){
		var source2=document.getElementById&&!document.all? source.parentNode.childNodes:source.parentElement.all
		if (source2[2+ns6_index].style.display=="none"){
			source2[0].src="/web_medida/menus/img/fold_open.gif"
			source2[2+ns6_index].style.display=''
		}
	}
}

function ml_change(e) {
	
	if(!document.all&&!document.getElementById) return
	if (!document.all&&document.getElementById) ns6_index=1
		
	var source=document.getElementById&&!document.all? e.target:event.srcElement;
	
	if (source.className=="ml_folding") {
		var source2=document.getElementById&&!document.all? source.parentNode.childNodes:source.parentElement.all
		
		/* Chequeo de porpiedades.... 
		var _msg = "";
		_msg += "Objeto +0" + "\r\n";
		_msg += "Id: " + source2[ns6_index].id; //+ "\r\n"+ " Clase: " + getObjectClass(source2[ns6_index]) + "\r\n" + " Typeof: "  + typeof(source2[ns6_index]) + 
		_msg += "\r\n" + " ToString: " + source2[ns6_index].toString();
		_msg += "\r\n";
		_msg += "\r\n";
		
		_msg += "Objeto +1" + "\r\n";
		_msg += "Id: " + source2[1+ns6_index].id; //+ "\r\n" + " Clase: " + source2[1+ns6_index].innerHTML + "\r\n" + " Typeof: "  + typeof(source2[1+ns6_index]) + 
		_msg += "\r\n" + " ToString: " + source2[1+ns6_index].toString();
		_msg += "\r\n";
		_msg += "\r\n";
		
		_msg += "Objeto +2" + "\r\n";
		_msg += "Id: " + source2[2+ns6_index].id; // + ", Clase: " + getObjectClass(source2[2+ns6_index]) + ", Typeof: "  + typeof(source2[2+ns6_index]) + ", 
		_msg += "\r\n" + "ToString: " + source2[2+ns6_index].toString();
		
		alert(_msg);*/

		var _msg = "";
		var _obj = source2[2+ns6_index];

		if (_obj == null )
			_msg += "\nNo Encontrado\n";
		else {
			if (_obj.id != "undefined" && _obj.id == "ml_foldinglist") {
				_msg += "\nEncontrado\n";
			} else {
				_msg += "\nNo Encontrado\n";
				_obj = source2[1+ns6_index];
			}
		} 
		
		if (_obj == null)
			_msg += "\nNo Encontrado\n";
		else {
			if (_obj.style.display == "none") {
				source2[0].src="/web_medida/menus/img/fold_open.gif"
				_obj.style.display=''
			} else {
				source2[0].src="/web_medida/menus/img/fold_rojo.gif"
				_obj.style.display="none"
			}
		}
	}
	if (source.className=="mn_folding") {
		var source2 = document.getElementById&&!document.all?source.parentNode.childNodes:source.parentElement.all
				
		var _msg = "";
		var _obj = source2[2+ns6_index];
		if (_obj == null)
			_msg += "\nNo Encontrado\n";
		else {
			if (_obj.id == "mn_foldinglist") {
				_msg += "\nEncontrado\n";
			} else {
				_msg += "\nNo Encontrado\n";
				_obj = source2[1+ns6_index];
			}
		} 
		
		if (_obj == null)
			_msg += "\nNo Encontrado\n";
		else {
			if (_obj.style.display=="none") {
				source2[0].src="/web_medida/menus/img/fold_open.gif"
				_obj.style.display=''
			} else {
				source2[0].src="/recursos/menu_lateral/fold_rojo.gif"
				_obj.style.display="none"
			}
		} 
	}
}
document.onclick = ml_change
//-->
