// JavaScript Document
var posicion = 3;

function putOnTop(el) {
	alert("hola");
	var allLayers = document.getElementsByTagName("div")
	for (i = 0; i < allLayers.length; i++) {
		var daId = allLayers[i].id
		if (daId.substring(0,5) == 'layer') {
			if (daId == el.parentNode.id)
				allLayers[i].style.zIndex = 99
			else
				allLayers[i].style.zIndex = daId.substring(5,6)
		}
	}
}


function tmt_DivOnTop(theDiv){
	//alert(theDiv);
	var t = 0;var z = (document.layers) ? ".zIndex" : ".style.zIndex";
	var fun = (document.getElementById) ? "document.getElementById" : "MM_findObj";
	var arr = (document.layers) ? document.layers : (document.all) ? document.all.tags("DIV") : document.getElementsByTagName("DIV");
	for(var i=0;i<arr.length;i++){var oz = eval("arr["+i+"]"+z);if(oz > t){t = oz;}}
	var obj = eval(fun+"(theDiv)");if(obj)eval(fun+"('"+theDiv+"')"+z+"=parseInt("+t+")+1");
}

function divArriba(elDiv,boton) {
	
	var losDivs = new Array(3) ;
	var i;
	
	/*losDivs[0] = 'flotante01';
	losDivs[1] = 'flotante02';
	losDivs[2] = 'flotante03';

	
	for (i = 0; i < 3; i++) {
		document.getElementById(losDivs[i]).style.zIndex = i;
	}	
*/
	posicion ++;
	document.getElementById(elDiv).style.zIndex = posicion;
	window.focus();
	//boton.blur();
	
}