
var menublock=new Array() // no need to change this
var plus_i=0 // no need to change this

menublock[0]="verdana;"+ 			
			 "2;"+				
			 "000000;"+			
             "1;"+				
             ";;;;"+ 		    
			 "INDEX|/proyectos/jara/uk/main.asp|_self;"   
			 
menublock[1]="verdana;"+ 			
			 "2;"+				
			 "000000;"+			
			 "1;"+				
			 "verdana;"+ 		
			 "0;"+				
			 "FFFFFF;"+			
			 "0;"+				
			 "PROYECT|#|;"+	 
			 "LIFE Programme|/proyectos/jara/uk/proyecto/life.asp|_self;"+
			 "Gestation process|/proyectos/jara/uk/proyecto/gesta.asp|_self;"+
			 "Institutions|/proyectos/jara/uk/proyecto/entidad.asp|_self;"+
			 "Budget|/proyectos/jara/uk/proyecto/presu.asp|_self;"+	
			 "Objectives|/proyectos/jara/uk/proyecto/obj.asp|_self;"+	  
			 "Actions|/proyectos/jara/uk/proyecto/acciones.asp|_self;"
         
menublock[2]="Verdana;"+
			 "2;"+				
			 "000000;"+			
             "1;"+				
             ";;;;"+ 		    
			 "ACTION 1|/proyectos/jara/uk/accion1/accion1.asp|_self;" 
			 
menublock[3]="Verdana;"+ 	
			 "2;"+				
			 "000000;"+			
             "1;"+				
             ";;;;"+ 		    
			 "ACTION 2|/proyectos/jara/uk/accion2/accion2.asp|_self;"
			 
menublock[4]="verdana;"+ 
			 "2;"+				
			 "000000;"+			
			 "1;"+				
			 "verdana;"+ 		
			 "0;"+				
			 "FFFFFF;"+			
			 "0;"+				
			 "ACTION 3|#|;"+	
			 "Objectives|/proyectos/jara/uk/accion3/obj.asp|_self;"+	
			 "Mine renovation|/proyectos/jara/uk/accion3/rehabi.asp|_self;"+	
			 "Environmental rest|/proyectos/jara/uk/accion3/restau.asp|_self;"	
			 
menublock[5]="Verdana;"+ 	
			 "2;"+				
			 "000000;"+			
             "1;"+		
             ";;;;"+ 		
			 "ACTION 4|/proyectos/jara/uk/accion4/accion4.asp|_self;"   	 
var menusplit
var urlsplit

var minusimg=new Image()
minusimg.src="/proyectos/jara/imagenes/minus131.gif"

var plusimg=new Image()
plusimg.src="/proyectos/jara/imagenes/plus131.gif"
			 
var showsubmenus=new Array()
for (i=0;i<=menublock.length-1;i++) {
	showsubmenus[i]=-1
}

var plusminusimg=new Array()
for (i=0;i<=menublock.length-1;i++) {
	plusminusimg[i]=plusimg.src
}

function openandclose(visi) {
	showsubmenus[visi]=(-1)*showsubmenus[visi]
    var menucontent=""
    menucontent+="<table border=0>"
	for (i=0;i<=menublock.length-1;i++) {
		menusplit=menublock[i].split(";")
		urlsplit=menusplit[8].split("|")
		menucontent+="<tr><td>"
      
       if (menusplit[9].length==0) {
            menucontent+="<a class='tmenu' href="+urlsplit[1]+" target="+urlsplit[2]+">"
            menucontent+=urlsplit[0]
            menucontent+="</a></td></tr><tr><td></td></tr>"
            plus_i++ 
        }
        
        if (menusplit[9].length!=0) {
            var thismainmenu=i+plus_i
            menucontent+="<a class='tmenu' href='javascript:openandclose("+i+")'>"
            menucontent+="<a class='tmenu' href='javascript:openandclose("+i+")'>"
            menucontent+=urlsplit[0]
            menucontent+="</a></td></tr><tr><td></td></tr>"
   
		    if (showsubmenus[i]==1) {
			    for (ii=9;ii<menusplit.length-1;ii++) {
				    urlsplit=menusplit[ii].split("|")
                    menucontent+="<tr><td>"
                    menucontent+="<a class='tsmenu' href="+urlsplit[1]+" target="+urlsplit[2]+">··· "
                    menucontent+=urlsplit[0]
                    menucontent+="</a></td></tr><tr><td></td></tr>"
			    }
				menucontent+="<tr><td></td></tr>"
		    }
        }    
	}
    menucontent+="</table>"
	if (document.all) {
		menu.innerHTML=menucontent
	}
	if (document.layers) {
		document.menu.document.write(menucontent)
		document.menu.document.close()
	}
}
var pong;
function makeArray(n){
  this.length = n;
  for (i=1;i<=n;i++){
    this[i]=0;
  }
  return this;
}

function displayDate() {

  var this_month = new makeArray(12);
  this_month[0]  = "January";
  this_month[1]  = "February";
  this_month[2]  = "March";
  this_month[3]  = "April";
  this_month[4]  = "May";
  this_month[5]  = "Juny";
  this_month[6]  = "July";
  this_month[7]  = "August";
  this_month[8]  = "September";
  this_month[9]  = "October";
  this_month[10] = "November";
  this_month[11] = "December";
  var this_day_e = new makeArray(7);
  this_day_e[0]  = "Sunday";
  this_day_e[1]  = "Monday";
  this_day_e[2]  = "Tuesday";
  this_day_e[3]  = "Wednesday";
  this_day_e[4]  = "Thursday";
  this_day_e[5]  = "Friday";
  this_day_e[6]  = "Saturday";
  var today = new Date();
  var day   = today.getDate();
  var month = today.getMonth();
  var year  = today.getYear();
  var dia = today.getDay();
    if (year < 1000) {
       year += 1900; }
  return( " " + this_day_e[dia] + ", " + day + " of " + this_month[month] + " " + year);
}
function favoritos() {
var browsName = navigator.appName; 
if (browsName == "Microsoft Internet Explorer") { 
window.external.AddFavorite('http://www.fundacionsierraminera.org','SIERRA MINERA FOUNDATION');
} else 
if (browsName == "Netscape") {
alert ("\nIn order to add SIERRA MINERA FOUNDATION to its favorites it presses CTRL+D");
}
}
