function abre_Vent(pagina)
    {
        descrip="width="+(450)+",height="+(500)+",top=20,left=20,status=yes,scrollbars=yes";
        win=window.open(pagina,'bar',descrip);
    }


function ShowFlash(filepath,width,height,transparent)
{
document.write('<object codeBase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="'+width+'" height="'+height+'">\n');
	document.write('<param name="Movie" value="'+filepath+'">\n');
	document.write('<param name="Src" value="'+filepath+'">\n');
	document.write('<param name="Play" value="-1">\n');
	document.write('<param name="Loop" value="-1">\n');
	document.write('<param name="Menu" value="False">\n');	
	document.write('<param name="Quality" value="High">\n');
	document.write('<param name="EmbedMovie" value="0">\n');
	if (transparent == true)
    {
		document.write('<param name="WMode" value="Transparent">\n');
		document.write('<embed src="'+filepath+'" quality="high" menu="False" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"/>\n');
	} else {
		document.write('<embed src="'+filepath+'" quality="high" menu="False" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"/>\n');	
	}	
	
	document.write('</object>\n');
}

function show(nCapa){ 
document.getElementById(nCapa).style.display="block"; 
} 
function hidd(nCapa){ 
document.getElementById(nCapa).style.display="none"; 
} 


function FAjax (url,capa,valores,metodo)
{
          var ajax=creaAjax();
          var capaContenedora = document.getElementById(capa);

/*Creamos y ejecutamos la instancia si el metodo elegido es POST*/
if(metodo.toUpperCase()=='POST'){
         ajax.open ('POST', url, true);
         ajax.onreadystatechange = function() {
         if (ajax.readyState==1) {
                          capaContenedora.innerHTML="<center><br><br><br><br><img src='/images/loading.gif' alt=''><br><br></center>";
         }
         else if (ajax.readyState==4){
                   if(ajax.status==200)
                   {
                        document.getElementById(capa).innerHTML=ajax.responseText;
                   }
                   else if(ajax.status==404)
                                             {

                            capaContenedora.innerHTML = "La direccion no existe";
                                             }
                           else
                                             {
                            capaContenedora.innerHTML = "Error: ".ajax.status;
                                             }
                                    }
                  }
         ajax.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
         ajax.send(valores);
         return;
}
/*Creamos y ejecutamos la instancia si el metodo elegido es GET*/
if (metodo.toUpperCase()=='GET'){

         ajax.open ('GET', url, true);
         ajax.onreadystatechange = function() {
         if (ajax.readyState==1) {
                                      capaContenedora.innerHTML="<center><br><br><br><br><img src='/images/loading.gif' alt=''><br><br></center>";
         }
         else if (ajax.readyState==4){
                   if(ajax.status==200){
                                             document.getElementById(capa).innerHTML=ajax.responseText;
                   }
                   else if(ajax.status==404)
                                             {

                            capaContenedora.innerHTML = "La direccion no existe";
                                             }
                                             else
                                             {
                            capaContenedora.innerHTML = "Error: ".ajax.status;
                                             }
                                    }
                  }
		 
         ajax.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
         ajax.send(null);
         return
}
} 

//***************************************
//Funciones comunes a todos los problemas
//***************************************
function creaAjax(){
         var objetoAjax=false;
         try {
          /*Para navegadores distintos a internet explorer*/
          objetoAjax = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
          try {
                   /*Para explorer*/
                   objetoAjax = new ActiveXObject("Microsoft.XMLHTTP");
                   }
                   catch (E) {
                   objetoAjax = false;
          }
         }

         if (!objetoAjax && typeof XMLHttpRequest!='undefined') {
          objetoAjax = new XMLHttpRequest();
         }
         return objetoAjax;
}


function detenerError(){
return true
}
window.onerror=detenerError

function ventana(img, ancho, alto){
  derecha=(screen.width-ancho)/2;
  arriba=(screen.height-alto)/2;
  string="toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width="+ancho+",height="+alto+",left="+derecha+",top="+arriba+"";
  fin=window.open(img,"",string);
}
