/* Backgrounds selectivos
* Author: Federico R. Teiserskis
* Mirtuono Consulting
* http://www.mirtuono.com
*/

var tiempo = new Date();
var hora = tiempo.getHours();

function ponerFondo(){
	// todos funcionando
	/*
	if(hora<4){
		document.getElementById('cuerpo').style.background='#084933';
		document.getElementById('cuerpo').style.backgroundImage='url("imgs/bg_mosaico_noche.jpg")';
		document.getElementById('cuerpo').style.backgroundRepeat='repeat-x';
		document.getElementById('cuerpo').style.backgroundAttachment='fixed';
		document.getElementById('cuerpo').style.backgroundPosition='left top';
	}
	else if(hora<10){
		document.getElementById('cuerpo').style.background='#6b772d';
		document.getElementById('cuerpo').style.backgroundImage='url("imgs/bg_mosaico_maniana.jpg")';
		document.getElementById('cuerpo').style.backgroundRepeat='repeat-x';
		document.getElementById('cuerpo').style.backgroundAttachment='fixed';
		document.getElementById('cuerpo').style.backgroundPosition='left top';
	}
	else if(hora<18){
		document.getElementById('cuerpo').style.background='#108348';
		document.getElementById('cuerpo').style.backgroundImage='url("imgs/bg_mosaico_dia.jpg")';
		document.getElementById('cuerpo').style.backgroundRepeat='repeat-x';
		document.getElementById('cuerpo').style.backgroundAttachment='fixed';
		document.getElementById('cuerpo').style.backgroundPosition='left top';
	}
	else if(hora<22){
		document.getElementById('cuerpo').style.background='#7a5713';
		document.getElementById('cuerpo').style.backgroundImage='url("imgs/bg_mosaico_tarde.jpg")';
		document.getElementById('cuerpo').style.backgroundRepeat='repeat-x';
		document.getElementById('cuerpo').style.backgroundAttachment='fixed';
		document.getElementById('cuerpo').style.backgroundPosition='left top';
	}
	else{
		document.getElementById('cuerpo').style.background='#084933';
		document.getElementById('cuerpo').style.backgroundImage='url("imgs/bg_mosaico_noche.jpg")';
		document.getElementById('cuerpo').style.backgroundRepeat='repeat-x';
		document.getElementById('cuerpo').style.backgroundAttachment='fixed';
		document.getElementById('cuerpo').style.backgroundPosition='left top';
	}
	*/
	// pongo solo el del mediodía
	document.getElementById('cuerpo').style.background='#108348';
	document.getElementById('cuerpo').style.backgroundImage='url("imgs/bg_mosaico_dia.jpg")';
	document.getElementById('cuerpo').style.backgroundRepeat='repeat-x';
	document.getElementById('cuerpo').style.backgroundAttachment='fixed';
	document.getElementById('cuerpo').style.backgroundPosition='left top';
}

window.onload = ponerFondo;
