		var flashvars = {};
		flashvars.xml = "config.xml";
		flashvars.font = "font.swf";
		var attributes = {};
		attributes.wmode = "transparent";
		attributes.id = "slider";
		swfobject.embedSWF("cu3er.swf", "cu3er-container", "550", "155", "9", "expressInstall.swf", flashvars, attributes);


			function mainmenu(){
			$(" #navegacion ul ").css({display: "none"});
			$(" #navegacion li").hover(function(){
				$(this).find('ul:first:hidden').css({visibility: "visible",display: "none"}).slideDown(400);
				},function(){
					$(this).find('ul:first').slideUp(400);
				});
			}
			$(document).ready(function(){
				mainmenu();
			});
	 var control=0;
	  
	    function zindex(){
		 if(control==1){
		     $(".inner").css({zIndex: "1"});
		   }
		  }
		    function maile(valor){
			$("#"+valor).fadeIn();
			}
			
			 function ocultarmaile(valor){
			$("#"+valor).fadeOut();
			}


	  
	  
	  $(document).ready(function() {
	  	  	
       $("a.sug").click(function(){
											  if (control ==0){
			  $(".inner").animate({"left": "+=160px"}, "slow");
			  $(".pulsar").animate({"left": "+=160px"}, "slow");
			 control =1;
			 	 }else{
				 $(".inner").animate({"left": "-=160px"}, "slow");
				 $(".pulsar").animate({"left": "-=160px"}, "slow");
				  $(" .inner ").css({zIndex: "-1"});
				control=0;
			
				}
				setTimeout("zindex()",550);
				
				
	
				
			});
		 });
	  
	  
	
	  
	   
var seleccionaPrograma = 0;
function valida_envia(){
    //valido el nombre
    if (document.pregunta.nombre.value.length==0){
    	alert("Debe introducir el nombre");
       return 0;
    }

	if (document.pregunta.titulo.value.length==0){
       alert("Debe introducir el Titulo");
       return 0;
    }

	if (document.pregunta.texto_pregunta.value.length==0){
       alert("Debe introducir el Texto de la Pregunta");
       return 0;
    }
    
  
    
	
    //el formulario se envia
     document.pregunta.envio.value="ENVIAR";
     seleccionaPrograma = 0;
    document.pregunta.submit();
} 

function avatar(img){
$('#sel').load("load.php?avat="+img);
};

function avatar2(img){
$('#sel2').load("load3.php?avat_res="+img);
};

function programa(img){
	seleccionaPrograma = 1;
$('#sel_prog').load("load.php?programa="+img);
};
										

function valida_sug(){
    //valido el nombre
    if (document.f_sug.sug.value.length==0){
    	alert("Debe introducir una sugerencia");
       return 0;
    }

	//el formulario se envia
     document.f_sug.envio_sug.value="ENVIAR";
    document.f_sug.submit();
} 


function valida_res(){
	 	var id = document.respuesta.idPre.value;
	 	var clase = document.respuesta.clase.value;
	 	var pag = document.respuesta.pag.value;
	//valido el nombre
    if (document.respuesta.texto_res.value.length==0){
    	alert("Debe introducir una respuesta");
       return 0;
    }
    
     if (document.respuesta.nombre_res.value.length==0){
    	alert("Debe introducir un nombre de usuario");
       return 0;
    }
	//el formulario se envia
     document.respuesta.envio_res.value="ENVIAR";
    document.respuesta.submit();
} 

$(function(){

     $('a[href*=#]').click(function() {

     if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
         && location.hostname == this.hostname) {

             var $target = $(this.hash);

             $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');

             if ($target.length) {

                 var targetOffset = $target.offset().top;

                 $('html,body').animate({scrollTop: targetOffset}, 1000);

                 return false;

            }

       }

   });
   
  
});

