
<!--zzzzzzzzzzzzzz
/*Format de data: any,mes-1,dia-1,hora,minut,segons
*/ 
function contador()
{
    var  dh =  new Date();
    /* DATE any,mes-1,dia,hora,minuts i segons */
	
	//var Mi_Fecha = new Date(año, mes, día, horas, minutos, segundos);
	

	var  df =  new Date(2011,9,8,12,00,00);
    var seg = (df.getTime() - dh.getTime()) / 1000;
    var any,dia,hor,min;
    seg -= seg%1;

    any = Math.floor(seg/(365*24*60*60));
    seg -=  (365*24*60*60)*any;

    dia = Math.floor(seg/(24*60*60));
    seg -=  (24*60*60)*dia;

    hor = Math.floor(seg/(60*60));
    seg -=  (60*60)*hor;

    min = Math.floor(seg/60);
    seg -=  60*min;

/*    document.MARC.MISSATGE.value = dh */
    document.marc.missatge.value ="   "
                                  + dia + " dias, "
                                  + hor + " horas, "
                                  + min + " minutos y "
                                  + seg+  " segundos";
    window.setTimeout("contador()",1000);
}
//-->

var myConn = new XHConn();

if (!myConn)
{
//        alert("XMLHTTP no disponible.");
}
    
var poner_info = function (oXML)
{
        document.getElementById('ajax_div').innerHTML = oXML.responseText;
};

function actualizar_div ()
{
	
	//document.getElementById('ajax_div').innerHTML = "Carregant publicitat...";
    //document.getElementById('ajax_div').innerHTML = "<div style='position:absolute; top: 0px; left: 0px; float: left'><img src='/imatges/carregant.gif' alt='Carregant Publicitat' /></div>"; // + document.getElementById('ajax_div').innerHTML;
    myConn.connect("/publicitat/mostrar_publicitats.php", "POST", "", poner_info);
    setTimeout('actualizar_div();',15000);        
}

var escriure_detall = function (oXML)
{
      document.getElementById('ajax_div_detall').innerHTML = oXML.responseText;
};
function mostrar_detall(imatge)
{
	//document.getElementById('ajax_div_detall').innerHTML = "Carregant imatge...";
    myConn.connect("/vestits/mostrar_detall.php?imatge="+imatge, "GET", "", escriure_detall);
}

function ocultar_detall()
{
    document.getElementById('ajax_div_detall').innerHTML = "";
}

function actualizar_portada (cont_portada)
{
	//alert(cont_portada);
	oTransition = new Transition('fotos_portada','imatges/portada'+cont_portada+'.jpg' );
	cont_portada= cont_portada+1;
	if (cont_portada==8)
		cont_portada=1;
    setTimeout('actualizar_portada('+cont_portada+');',12000);        
}






