function MM_jumpMenu(selObj){ 
  var dirRed = selObj.options[selObj.selectedIndex].value;
  if(dirRed != '#'){
  window.open(dirRed,"_blank");
  }
}
function openCedis(selObj){ 
  var id = selObj.options[selObj.selectedIndex].value;
  if(id != '#'){
	url = 'cedis.php?id_cedis='+id;	  
	window.open(url,"_self");
  }
}
function openCedis_index(selObj){ 
  var id = selObj.options[selObj.selectedIndex].value;
  if(id != '#'){
	url = 'front/cedis.php?id_cedis='+id;	  
	window.open(url,"_self");
  }
}
function show(ids){
	var divSel = document.getElementById(ids);
        divSel.style.display = "block";
}
function hide(idh){
	var divSel = document.getElementById(idh);
        divSel.style.display = "none";
}
function showHide(id){
	var divSel = document.getElementById(id);
        if (divSel.style.display == "none"){
            divSel.style.display = "block";
        } else {
            divSel.style.display = "none";
        }
}
function validaBuscador(){
	var valor = document.getElementById('buscador').SearchString.value;
	if(valor == ''){
		alert ('Ingresa una palabra para realizar la busqueda');
		return false;
	}
return true;
}

function UrlShadow(url,tipo,ancho,alto){
	if(tipo == null) tipo = 'iframe';
    Shadowbox.open({
        player:     tipo,
        content:    '../calendario_omni/'+url,
		height:     alto,
        width:      ancho
    });
}

function muestraOtro(valor){

	if(valor == 'otro|otro')
		show('otro');
	else
		hide('otro');
}

function validaPais(idfrm) {

	if (document.getElementById){
	var errors='';
	var forma = document.getElementById(idfrm);
	 
	var pais = forma.pais2.value;
	if (pais == "#"){
	errors += 'El pais es un campo requerido.\n';
	}else if(pais == "otro|otro"){
		pais = forma.pais_otro.value;
		if(pais == 'Ingrese su Pais' || pais == ''){
			errors += 'El pais es un campo requerido.\n';
			}
	}
	
	if (errors){ alert('Los siguientes errores ocurrieron:\n\n'+errors); return false;}
    document.MM_returnValue = (errors == '');
} }

//////////////////////////para div banners index//////////////////////
function cerrar() {
		div = document.getElementById('popup');
		div.style.display="none";
	 }
	 
function oculta (kpa) {
   document.getElementById(kpa).style.visibility='hidden';
	 }
///////////////////////////////////////////////////////////////////////

////////////////para sitios regionales/////////////////////
/////////funcion para cambia de paises en el select///////////
function MM_jumpMenu_paises(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

/// LIGHTBOX DEL POP UP//////////////
function showLightbox() {
	document.getElementById('over').style.display='block';
	document.getElementById('fade').style.display='block';
}
function hideLightbox() {
	document.getElementById('over').style.display='none';
	document.getElementById('fade').style.display='none';
}
//////////////////////////////////////
