<!--//--><![CDATA[//><!--
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("listmenu");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
window.onload=startList;
	

//--><!]]>


// Abrir vetnas en XHMTL "strict"
function openTargetBlank(e){
   
   var className = 'external';
   
   if (!e) var e = window.event;
   var clickedObj = e.target ? e.target : e.srcElement;
   
   if(clickedObj.nodeName == 'A' )
    {
      r=new RegExp("(^| )"+className+"($| )");
      if(r.test(clickedObj.className)){
         window.open(clickedObj.href);
         return false;
   
      }
    }
}
   
document.onclick = openTargetBlank;




function poll_voto(campo){
	var total_rad,valido;
	
	valido=false;
	total_rad=campo.poll.length;
	
		for(num_rad=0;num_rad<total_rad;num_rad++){
			if(campo.poll[num_rad].checked)
				valido=true
		}
	
		if(!valido){
			alert("Debes seleccionar una opción..!")
			return false;
		}
		else
			return true;
	}
	
//funcion para aceptar solo datos numericos en el onkeypress {onkeypress="return solo_numeros(event)"}
// script de:http://www.forosdelweb.com/showpost.php?p=1284132&postcount=232
function solo_numeros(e) {
    tecla = (document.all) ? e.keyCode : e.which;
    if (tecla==8) return true; //Tecla de retroceso (para poder borrar)
    if (tecla==0) return true; //Tecla de retroceso (para poder borrar)
	 patron =/^[0-9]$/; // Reg excprecion
    te = String.fromCharCode(tecla);
    return patron.test(te); 
} 


function maximaLongitud(texto,maxlong) {
  var tecla, in_value, out_value;

  if (texto.value.length > maxlong) {
    in_value = texto.value;
    out_value = in_value.substring(0,maxlong);
    texto.value = out_value;
    return false;
  }
  return true;
} 


// para preguntar antes de eliminar
// onclick="return false,eliminar_link(' esta foto')";
function eliminar_link(txt){
	if(confirm("¿Seguro que desea "+txt+"?"))
	  	return true;
	else
	   	return false;
	   }
	   
// para nueva vetana
// onclick="return false, popup(this,740,248,'_blank')	   
function popup(objeto,w,h,targt){
	width_pop=w;
	heigth_pop=h;
	left_pop=(screen.width/2)-(width_pop/2);
	top_pop=(screen.height/2)-(heigth_pop/2);
	window.open(objeto.href,targt,"width="+width_pop+",height="+heigth_pop+", left="+left_pop+", top="+top_pop+" ,toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, directories=no, status=no");
	return false;		
	}
	
function bank_win(objeto){
	window.open(objeto.href,"_blank","");
	return false;		
	}
