// JavaScript Document
var repeticion;
var promoopcion = 1;
var tes1=1;
window.onload = function(){
	iniciacontar();
	cambiarimagenpromo(1);
	
}
/**********************************promociones*******************************/
/**contador para cambiar de colores de cada opcion**/
function iniciacontar(){
	repeticion = setInterval(cambiapromocion,5000);
}
function paredecontar(){
	window.clearInterval(repeticion);
}

/***cambia los colores de cada opcion numerica***/
function actualiza(opcion){
	/*for (i=0;i<=8-1;i++)*/
	for (i=0;i<=6-1;i++)
	{
		j=i+1;
		document.getElementById("oppromo"+j).style.backgroundImage="url(./temas/ban/images/centre/silde-nav_black.png)";
		document.getElementById("oppromo"+j).style.border = "medium";
		document.getElementById("oppromo"+j).style.color = "#fff";
	}
	document.getElementById("oppromo"+opcion).style.backgroundImage="url(./temas/ban/images/centre/silde-nav_blue.png)";
	document.getElementById("oppromo"+opcion).style.border = "none";
	document.getElementById("oppromo"+opcion).style.color = "#000";
	/*document.getElementById("titulopromotion").textContent = "Aqui va el titulo para la promocion "+promoopcion;
	document.getElementById("titulopromotion").innerText = "Aqui va el titulo para la promocion "+promoopcion;*/
}
/**cambia de color al sobreponerse sobre la opcion "hover"**/
function resaltaop(opcion){
	if(opcion != promoopcion){
		document.getElementById("oppromo"+opcion).style.color = "#fff";
	}
}
function quitaresaltaop(opcion){
	if(opcion != promoopcion){
		document.getElementById("oppromo"+opcion).style.color = "#fff";
	}
}
/********cambia promocion con flechas*********/
function siguientepromo(){
	/*if (promoopcion == 8)*/
	if (promoopcion == 6)
		promoopcion = 1;
	else
		promoopcion = promoopcion + 1;
	cambiarimagenpromo(promoopcion);
}
function anteriorpromo(){
	
	if (promoopcion == 1)
		promoopcion = 6;
		/*promoopcion = 8;*/
	else
		promoopcion = promoopcion - 1;
	cambiarimagenpromo(promoopcion);
}
/********cambia imagen de promocion*********/
/********cambia imagen de promocion*********/
function cambiarimagenpromo(opcion){
	paredecontar();
	switch(opcion){
		
		        case 1: promoopcion=1;
				document.getElementById("presentpromotion").innerHTML = "<a href='Votre_banderole_publicitaire50' title='Votre banderole publicitaire'><img  width='732' height='246' src='./temas/ban/images/promotions/promotion_50.jpg' alt='Votre banderole publicitaire' title='Votre banderole publicitaire' id='imagepromotion' border='0'/></a>";
			     document.getElementById("titulopromotion").innerHTML = "<a href='Votre_banderole_publicitaire50' class='black bold f14 sinanimacion'>Votre banderole publicitaire</a>";
                 document.getElementById('videoPromo').innerHTML="<div class='videoMensaje'>Voir nos exemples de cr&eacute;ation sur: </div><div class='videoImagen'><a href='http://www.youtube.com/watch?v=9eSdA0m8yEs' target='_blank' ><img  height='33' src='./temas/ban/images/promotions/youtube-verde.jpg' alt='Votre banderole publicitaire' id='imagepromotion' border='0' /></a></div>";
				
					actualiza(promoopcion);


					break;
		        case 2: promoopcion=2;
				document.getElementById("presentpromotion").innerHTML = "<a href='Un_moyen_economique_pour_vos_enseignes' title='Un_moyen_economique_pour_vos_enseignes'><img  width='732' height='246' src='./temas/ban/images/promotions/promotion_41.jpg' alt='Un_moyen_economique_pour_vos_enseignes' alt='Un_moyen_economique_pour_vos_enseignes' id='imagepromotion' border='0' width='732' height='246'/></a>";
                            document.getElementById("titulopromotion").innerHTML = "<a href='Un_moyen_economique_pour_vos_enseignes' class='black bold f14 sinanimacion'>Un_moyen_economique_pour_vos_enseignes</a>";
                            document.getElementById('videoPromo').innerHTML="<div class='videoMensaje'>Voir nos exemples de cr&eacute;ation sur: </div><div class='videoImagen'><a href='http://www.youtube.com/watch?v=28IT3rpJtyM' target='_blank' ><img  height='33' src='./temas/ban/images/promotions/youtube-celeste.jpg' alt='Un_moyen_economique_pour_vos_enseignes' id='imagepromotion' border='0' /></a></div>";



						actualiza(promoopcion);


				break;
		
		        case 3: promoopcion=3;
				document.getElementById("presentpromotion").innerHTML = "<a  href='Faites_un_message_sympa_a_vos_clients' title='Faites_un_message_sympa_a_vos_clients'><img src='./temas/ban/images/promotions/promotion_40.jpg' alt='Faites_un_message_sympa_a_vos_clients' title='Faites_un_message_sympa_a_vos_clients' id='imagepromotion' border='0' width='732' height='246'/></a>";
					 document.getElementById("titulopromotion").innerHTML = "<a href='Faites_un_message_sympa_a_vos_clients' class='black bold f14 sinanimacion'>Faites_un_message_sympa_a_vos_clients</a>";
                 document.getElementById('videoPromo').innerHTML="<div class='videoMensaje'>Voir nos exemples de cr&eacute;ation sur: </div><div class='videoImagen'><div class='videoImagen'><a href='http://www.youtube.com/watch?v=2iXnbpETo1o' target='_blank' ><img  height='33' src='./temas/ban/images/promotions/youtube-morado.jpg' alt='Faites_un_message_sympa_a_vos_clients' id='imagepromotion' border='0' /></a></div>";

		      			actualiza(promoopcion);


				break;
		        case 4: promoopcion=4;
				document.getElementById("presentpromotion").innerHTML = "<a  width='732' height='246' href='Pour_communiquer_en_fin_d_annee' title='Pour_communiquer_en_fin_d&acute;_ann&eacute;e'><img src='./temas/ban/images/promotions/promotion_39.jpg' alt='Pour_communiquer_en_fin_d&acute;_ann&eacute;e' title='Pour_communiquer_en_fin_d&acute;_ann&eacute;e' id='imagepromotion' border='0' width='732' height='246'/></a>";
                            document.getElementById("titulopromotion").innerHTML = "<a href='Pour_communiquer_en_fin_d_annee' class='black bold f14 sinanimacion'>Pour_communiquer_en_fin_d&acute;_ann&eacute;e</a>";
                     document.getElementById('videoPromo').innerHTML="<div class='videoMensaje'>Voir nos exemples de cr&eacute;ation sur: </div><div class='videoImagen'><div class='videoImagen'><a href='http://www.youtube.com/watch?v=UxQJ1yrSL-s' target='_blank' ><img  height='33' src='./temas/ban/images/promotions/youtube-rojo.jpg' alt='Pour_communiquer_en_fin_d&acute;_ann&eacute;e' id='imagepromotion' border='0' /></a></div>";
				
							actualiza(promoopcion);


					break;
				

		case 5: promoopcion=5;
		
		   document.getElementById("presentpromotion").innerHTML = "<a  width='732' height='246' href='Rollup_totem_kakemono_pour_vos_animations_et_expositions' title='Rollup_totem_kakemono_pour_vos_animations_et_expositions'><img src='./temas/ban/images/promotions/promotion_36.jpg' alt='Rollup_totem_kakemono_pour_vos_animations_et_expositions' title='Rollup_totem_kakemono_pour_vos_animations_et_expositions' id='imagepromotion' border='0' width='732' height='246'/></a>";
                            document.getElementById("titulopromotion").innerHTML = "<a href='Rollup_totem_kakemono_pour_vos_animations_et_expositions' class='black bold f14 sinanimacion'>Rollup_totem_kakemono_pour_vos_animations_et_expositions</a>";
                     document.getElementById('videoPromo').innerHTML="<div class='videoMensaje'>Voir nos exemples de cr&eacute;ation sur: </div><div class='videoImagen'><div class='videoImagen'><a href='http://www.youtube.com/watch?v=DA0aN3hcCjQ' target='_blank' ><img  height='33' src='./temas/ban/images/promotions/youtube-rojo.jpg' alt='Rollup_totem_kakemono_pour_vos_animations_et_expositions' id='imagepromotion' border='0' /></a></div>";

					actualiza(promoopcion);


				break;
		        
				
				case 6: promoopcion=6;
				document.getElementById("presentpromotion").innerHTML = "<a href='supportez_vos_festivites' title='SUPPORTEZ VOS FESTIVIT&Eacute;S'><img  width='732' height='246' src='./temas/ban/images/promotions/promotion_10.jpg' alt='SUPPORTEZ VOS FESTIVIT&Eacute;S ' title='SUPPORTEZ VOS FESTIVIT&Eacute;S' id='imagepromotion' border='0' width='732' height='246'/></a>";
				 document.getElementById("titulopromotion").innerHTML = "<a href='supportez_vos_festivites' class='black bold f14 sinanimacion'>SUPPORTEZ VOS FESTIVIT&Eacute;S </a>";
                 document.getElementById('videoPromo').innerHTML="<div class='videoMensaje'>Voir nos exemples de cr&eacute;ation sur: </div><div class='videoImagen'><a href='http://www.youtube.com/watch?v=g_Zf1QR7GYM' target='_blank' ><img  height='33' src='./temas/ban/images/promotions/youtube-naranja.jpg' alt='SUPPORTEZ VOS FESTIVIT&Eacute;S ' id='imagepromotion' border='0' /></a></div>";


					actualiza(promoopcion);


				break;

	}
	iniciacontar();
}




/*****cambia promocion antumaticamentre*******/
function cambiapromocion(){
	/*if(promoopcion < 8){*/
	if(promoopcion < 6){
		promoopcion++;
		cambiarimagenpromo(promoopcion);
		actualiza(promoopcion);
	}
	else{
		promoopcion = 1;
		cambiarimagenpromo(promoopcion);		
		actualiza(promoopcion);
	}
}




