// JavaScript Document

function substitueix (objecte,cadena) {
d = document.getElementById(''+objecte+'');
d.innerHTML = ''+cadena+'';
}

function confirmaEliminar(missatge,adreca){
var m = window.confirm(missatge)
	if (m==true){
	window.location = adreca
	}
}

function ves_hi(){
d = document.getElementById('dreceres').value;
	switch(d){
	case '1':   window.location = 'nueva_pauta.asp'; break
    case '2':   window.location = 'me_pauta.asp'; break
	case '3':   window.location = 'nuevo_curso.asp'; break
    case '4':   window.location = 'me_curso.asp'; break
	case '5':   window.location = 'nueva_conferencia.asp'; break
    case '6':   window.location = 'me_conferencia.asp'; break
	case '7':   window.location = 'nueva_charla.asp'; break
    case '8':   window.location = 'me_charla.asp'; break
	case '9':   window.location = 'nuevo_libro.asp'; break
    case '10':   window.location = 'me_libro.asp'; break
	case '11':   window.location = 'nueva_cita.asp'; break
    case '12':   window.location = 'me_cita.asp'; break
	}
}

function popup(url,windowname,width,height,features) { 
width=(width)?width:screen.width/2; 
height=(height)?height:screen.height/2; 
var screenX = (screen.width/2 - width/2); 
var screenY = (screen.height/2 - height/2); 

var features= "width=" + width + ",height=" + height +",scrollbars=no,status=no"; 
features += ",screenX=" + screenX + ",left=" + screenX; 
features += ",screenY=" + screenY + ",top=" + screenY; 

var mywin=window.open(url, windowname, features); 
if (mywin) 
mywin.focus(); 
return mywin; 
}


function desplegaMenu(mostra) {
var e = document.getElementById("menu_actualitat");
if (mostra == true) {
e.className = "menu_obert";
}
else {
e.className = "menu_tancat";	
}
}

function desplegaMenu_02(mostra) {
var e = document.getElementById("menu_actualitat_02");
if (mostra == true) {
e.className = "menu_obert";
}
else {
e.className = "menu_tancat";	
}
}

function desplegaMenu_03(mostra) {
var e = document.getElementById("menu_actualitat_03");
if (mostra == true) {
e.className = "menu_obert";
}
else {
e.className = "menu_tancat";	
}
}

function desplegaMenu_04(mostra) {
var e = document.getElementById("menu_actualitat_04");
if (mostra == true) {
e.className = "menu_obert";
}
else {
e.className = "menu_tancat";	
}
}

function desplegaMenu_05(mostra) {
var e = document.getElementById("menu_actualitat_05");
if (mostra == true) {
e.className = "menu_obert";
}
else {
e.className = "menu_tancat";	
}
}