var r=2;
var k=1;
var fl=true;
var t;
var n;

function showBlock(n) {
    for (i=1;i<=6;i++){
      if (i!=n){
         document.getElementById('Block'+i).style.display = 'none';
		 document.getElementById('miniBlock'+i).style.borderColor = '#777777';
		 document.getElementById('miniBlock'+i).style.borderWidth = '1px';
		 document.getElementById('linkBlock'+i).style.display = 'none';
         }
       else{
         document.getElementById('Block'+i).style.display = 'block';
		 document.getElementById('miniBlock'+i).style.borderColor = '#ffcc33';
         document.getElementById('miniBlock'+i).style.borderWidth = '3px';
		 document.getElementById('linkBlock'+i).style.display = 'block';
		 }

}
    
}
function goTimer() {
	 t=setTimeout("goTimer()",1000);
	 r++;
	 if (k>6) {k=1;}
	 
	 if (fl==true) {
		     if (r%3==0) {
			    showBlock(k);
			    k++;
			 }
		  }
	 	  
}

startList = function(){
        if (document.all&&document.getElementById){
            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;
	
	if(window.attachEvent)
	window.attachEvent("onload",goTimer);
else if(window.addEventListener)
	window.addEventListener("load",goTimer,false);
else
	window.onload=goTimer;
