
function VotaImg(rating, codigo,tabla)
        {
            
            var rat;
    	    rat = rating * 25;    	
    	    document.getElementById('current-rating'+codigo).style.width = rat+'px';
		    document.getElementById('ratelinks'+codigo).style.display = 'none';
		    document.getElementById('ratingtext'+codigo).innerHTML = '¡Gracias por tu voto!';
            alacalle.ajaxapoyo.VotaImg(rating, codigo,tabla);
        }

function Fecha(tipo,recibida)	
				{
				 var nombre_dia;
				 var formato = recibida.indexOf("-");  //determina formato fecha
				if (tipo =="1")
				   nombre_dia = new Array("domingo", "lunes", "martes", "mi&eacute;rc ", "jueves", "viernes", "s&aacute;bado") 
				 else
				    nombre_dia = new Array("Domingo", "Lunes", "Martes", "Mi&eacute;rcoles ", "Jueves", "Viernes", "S&aacute;bado") 
				    
				 var nombre_mes = new Array("enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre") 
				 var de = " de "; 
				var aa,mm,dd;
				var hoy_es;
				if (recibida != undefined && recibida.length > 0)
				{				   
                  
                   if ( formato == 4 ) 
                   {
						aa = recibida.substring(0,4);
						mm = recibida.substring(5,7);
						dd = recibida.substring(8,10);		
						hoy_es= new Date(aa,mm-1,dd); 
					}
					else
					{
						dd = recibida.substring(0,2);
						mm = recibida.substring(3,5);
						aa = recibida.substring(6,10);										
						hoy_es= new Date(aa,mm-1,dd); 
					}
				}
				else
				{
					 hoy_es = new Date();
					 
				}
				
				
				dia_mes = hoy_es.getDate(); 
				dia_semana = hoy_es.getDay(); 
				mes = hoy_es.getMonth() + 1; 
				anyo = hoy_es.getYear(); 

				if (anyo < 100) anyo = '19' + anyo 
				else if ( (anyo>100) && (anyo<999) ) {var cadena_anyo=new String(anyo); anyo='20' + cadena_anyo.substring(1,3) } 
				fechilla = (nombre_dia[dia_semana] + " " + dia_mes + de + nombre_mes[mes - 1] ) 
				
				
				return fechilla;
             }
             
             function EnviarMailZoco(uno,dos,tres,cuatro,cinco,seis)
       {
       url = "envioamigo.aspx?uno="+uno +"&dos="+dos+"&tres="+tres+"&cuatro="+cuatro+"&cinco="+cinco+"&seis="+seis;
       var windowParam ="top =100, left=100, width=300, height=300,scrollbars=YES,Resizable=YES,status=yes";
       ventana = window.open(url,"envioamigo" ,windowParam);
       ventana.focus();
       }
