// JavaScript Document

/* Igualar alto columnas */
function altura(){
		al = new Array();
		max = 0;
		try{
			if(document.getElementById){
				for(i=0;i<arguments.length;i++){
					if(document.getElementById(arguments[i]))
						al[i] = document.getElementById(arguments[i]).offsetHeight;
				}
				max = mayor(al)-0;
				if(max > 0){
					for(i=0;i<arguments.length;i++){
						if(document.getElementById(arguments[i]))
							document.getElementById(arguments[i]).style.height = max + 'px';
					}
				}
			}
		}
		catch (exc) {
			alert("Se ha producido un error en la carga del CSS. La página seguirá operativa pero algo más lenta.");
			throw exc;
		}
	}
	function mayor(datos){
		salida = 0;
		for(i=0;i<datos.length;i++){
			if(parseInt(datos[i]) > salida)
				salida = datos[i];
		}
		return salida;
	}
	
/* Precarga Rollover flechas */
<!--
Flecha = new Image();
Flecha.src = "../images/flecha.png";
FlechaRol = new Image();
FlechaRol.src = "../images/flecha_rol.png";
FlechaRolTras = new Image();
FlechaRolTras.src = "../images/flecha_rol-1.png";
FlechaRolPas = new Image();
FlechaRolPas.src = "../images/flecha_rol-2.png";
FlechaRolTag = new Image();
FlechaRolTag.src = "../images/flecha_rol-3.png";
// -->

/* MENU ******************************/
/*********************
//* jQuery Drop Line Menu- By Dynamic Drive: http://www.dynamicdrive.com/
//* Created/ Last updated: June 13th, 09'
//* Menu avaiable at DD CSS Library: http://www.dynamicdrive.com/style/
*********************/

var droplinemenu={

arrowimage: {classname: 'downarrowclass', src: 'down.gif', leftpadding: 5}, //customize down arrow image
animateduration: {over: 0, out: 0}, //duration of slide in/ out animation, in milliseconds

buildmenu:function(menuid){
	jQuery(document).ready(function($){
		var $mainmenu=$("#"+menuid+">ul")
		var $headers=$mainmenu.find("ul").parent()
		$headers.each(function(i){
			var $curobj=$(this)
			var $subul=$(this).find('ul:eq(0)')
			this._dimensions={h:$curobj.find('a:eq(0)').outerHeight()}
			this.istopheader=$curobj.parents("ul").length==1? true : false
			if (!this.istopheader)
				$subul.css({left:0, top:this._dimensions.h})
			/*$curobj.find("span,a").eq(0).append(
				'<img src="'+ droplinemenu.arrowimage.src
				+'" class="' + droplinemenu.arrowimage.classname
				+ '" style="border:0; padding-left: '+droplinemenu.arrowimage.leftpadding+'px" />'
			)*/
			$curobj.hover(
				function(e){
					var $targetul=$(this).children("ul:eq(0)")
					if ($targetul.queue().length<=1) //if 1 or less queued animations
						if (this.istopheader)
							$targetul.css({left: $mainmenu.offset().left, top: $mainmenu.offset().top+this._dimensions.h})
						if (document.all && !window.XMLHttpRequest) //detect IE6 or less, fix issue with overflow
							$mainmenu.find('ul').css({overflow: (this.istopheader)? 'hidden' : 'visible'})
						$targetul.slideDown(droplinemenu.animateduration.over)
				},
				function(e){
					var $targetul=$(this).children("ul:eq(0)")
					$targetul.slideUp(droplinemenu.animateduration.out)
				}
			) //end hover
		}) //end $headers.each()
		$mainmenu.find("ul").css({display:'none', visibility:'visible', width:$mainmenu.width()})
	}) //end document.ready
}
}

/* Placeholder Inputs Forms */




