//<![CDATA[
function addFavorites(url, titulo){
	if (window.sidebar) window.sidebar.addPanel(titulo, url,""); // Mozilla Firefox
	else if( window.external ) window.external.AddFavorite( url, titulo); // Internet Explorer
	else if(window.opera && window.print) return true; // Opera
};


function imprSelec(nombre)
{
//	alert(nombre);

   var string1 = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Seremur</title> <link href="estilos/seremur.css" rel="stylesheet" type="text/css" />';
   var string2 = '<style type="text/css">@import url(jscalendar-1.0/skins/aqua/theme.css);</style> <script type="text/javascript" src="jscalendar-1.0/calendar.js"></script> <script type="text/javascript" src="jscalendar-1.0/lang/calendar-es.js"></script> <script type="text/javascript" src="jscalendar-1.0/calendar-setup.js"></script>';

  var string3 = '</head> <body>';

  var string4 ="</body> </html>";

  var ficha = document.getElementById(nombre);
  var ventimp = window.open(' ', 'popimpr');
  ventimp.document.write(string1);
  ventimp.document.write(string2);
  ventimp.document.write(string3);
  ventimp.document.write( ficha.innerHTML );
  ventimp.document.write(string4);
  ventimp.document.close();
  ventimp.print();
  //ventimp.close();
  
 
}

function pantallacompleta (pagina) {
	var opciones=('top=0,left=0,width='+(screen.availWidth)+',height ='+(screen.availHeight)+',fullscreen=yes,toolbar=1 ,location=1,directories=1,status=1,menubar=1,resizable=0,scrolling=1,scrollbars=1');
	lovechild = window.open(pagina,"lovechild",opciones);
	this.opener = lovechild;
	setTimeout("self.close();",500);
}
/*
function abrirCentrada(url, nombre, altura, anchura, barras) {
  window.name = "padre";	
  var str = "height=" + altura + ",innerHeight=" + altura;
  str += ",width=" + anchura + ",innerWidth=" + anchura;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;

    var xc = (aw - anchura) / 2;
    var yc = (ah - altura) / 2;
	if (barras == 'si') {
			str += ',toolbar=no'
			str += ',scrollbars=yes';
    		str += ",left=" + xc + ",screenX=" + xc;
    		str += ",top=" + yc + ",screenY=" + yc;
	}
	
	if (barras == 'no') {
			str += ',toolbar=no'
			str += ',scrollbars=no';
    		str += ",left=" + xc + ",screenX=" + xc;
    		str += ",top=" + yc + ",screenY=" + yc;
	}
  }
  return window.open(url, nombre, str);
}
*/

// TOMO EL SIMBOLO CON EL TEXTO A CAMBIAR
function getSimboloMenu(elem){
	return elem.getElementsByTagName('table')[0].getElementsByTagName('td')[1];
}
// Cambia los símbolos + por - (y viceversa) de los menus segun el menu sobre el que he pinchado y el texto contenido en éste (contentMenu)
function cambia(menu, contentMenu){
	// menuActual contiene el menu actual (o null si no hay ninguno)
	var menuActual = Accordion1.getCurrentPanel();
	var texto = contentMenu.innerHTML;
//alert(texto);
//alert(contentMenu.className);
	// Si el menu pinchado es el actual tengo de PLEGARLO (cambiar simbolo - por un +)
	if (Accordion1.getCurrentPanel() == menu)
		texto = texto.replace("&nbsp;-","+");
	// Si no... el menu pinchado tengo de DESPLEGARLO (cambiar simbolo + por un -)
	else
		texto = texto.replace("+","&nbsp;-");
//alert(texto);
	contentMenu.innerHTML = texto;
	// Además, si existe algún menú actual distinto del menú sobre el que he pinchado también tengo que PLEGARLO (de - a +)
	if (menuActual != menu && menuActual != null){
		//capturo el texto del menú actual
		var contentMenuActual = getSimboloMenu(menuActual);
		texto = contentMenuActual.innerHTML;
		texto = texto.replace("&nbsp;-","+");
		contentMenuActual.innerHTML = texto;
	}
}
// Cambio el texto de un panel del menu (simbolo + o -)
function cambiaTextoMenu(contentMenu){
	var texto = contentMenu.innerHTML;
	texto = texto.replace("+","&nbsp;-");
	contentMenu.innerHTML = texto;
}

//]]>



