﻿ var first = new Boolean;
    first=true;
    function cambiotv(){
        
        if (first)
        {
        first=false;
        document.getElementById('tvs').style.backgroundImage='url(images/3tvjuntas.jpg)'
        document.getElementById('frmaudio').setAttribute('src','blank.html')
        document.getElementById('tv1').setAttribute('src','images/ruidotv1.gif')
		document.getElementById('tv2').setAttribute('src','images/ruidotv2.gif')
		document.getElementById('tv3').setAttribute('src','images/ruidotv3.gif')
		}
    }
  
    carpeta = './images/';
    fotos = ['1.jpg','2.jpg','3.jpg','5.jpg'];
    n = 0;
    function verImg(){
        if (document.getElementById('pic') != null)
        {
            if (document.getElementById('pic').src != null)
            {
            document.getElementById('pic').src = carpeta+fotos[n];
            n++;
            if(n>=fotos.length) n=0;
            }
        }
    }
     
    setInterval('verImg()',3000);
    
	function showT(q,id)
	{ 
	    if (first)
        {
            first=false;
            document.getElementById('tvs').style.backgroundImage='url(images/3tvjuntas.jpg)'
		}
		document.getElementById('frmaudio').setAttribute('src','blank.html')
		document.getElementById('tv1').setAttribute('src','images/ruidotv1.gif')
		document.getElementById('tv2').setAttribute('src','images/ruidotv2.gif')
		document.getElementById('tv3').setAttribute('src','images/ruidotv3.gif')
		document.getElementById(id).setAttribute('src',q)
		
	} 
	
	function img_sobre(q,id){
    document.getElementById(id).setAttribute('src',q + 'B.gif')
    }
    function img_fuera(q,id){
    document.getElementById(id).setAttribute('src',q + 'A.gif')
    }
	
    startList = function() {
	if (document.all&&document.getElementById) {
	if (document.getElementById("nav") != null)
	{
		navRoot = document.getElementById("nav");
		
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
	}
}
window.onload=startList;
