<!--// Funciones de Macromedia DW
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0.B (Modified by DANKA Multimedia)
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  selObj.selectedIndex=restore;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// Fin funciones de Macromedia DW

// Funciones propias
///// NS6 e IE4+, NS4+
// Imprime el marco indicado
function imprime(donde){  // JMPG01012 © 2003 v3.0
	donde=(typeof(donde)!="undefined")?eval(donde):eval("self");
	if (window.print) {
	    return donde.print();  
	} else {
		if (navigator.appVersion.indexOf("MSIE 4")!=-1){
			var objImpresion='<object id="impie" width="0" height="0" classid="clsid:8856f961-340a-11d0-a96b-00c04fd705a2"></object>';
			document.body.insertAdjacentHTML('beforeEnd', objImpresion);
			donde.focus();
			ImpIE.ExecWB(6, 2); // Usa 1 en lugar de 2 para solicitar confirmación    
			ImpIE.outerHTML=""; 
		} else {
			alert("Pulse Ctrl+P para imprimir la página.");
    			donde.focus();
			return false
		}
	}
	return true
}

// Toma una cadena de elementos separados por comas y los oculta de la impresión
function impresion(_campos){ // JMPG01012 © 2006
	var f=document.forms[0];
	if (confirm("¿Desea imprimir esta hoja?")){
		var vCampos=_campos.split(",");
		_campos="";
		var i=0;
		while(vCampos[i]){
			if (eval("f."+vCampos[i])) {
				eval("f."+vCampos[i]+".style.display='none';");
				_campos+="f."+vCampos[i]+".style.display='block';";
			}
			i++;
		}
		imprime(); // Deberá enviarse a imprimir antes de 6 seg.
		setTimeout('f=document.forms[0];eval("'+_campos+'");',6000);
	}
}

// Abre una ventana nueva centrada en la pantalla
function DM_abreCentrada(url,nom,param) { // JMPG01012 © 2000 v2.0
	a=(DM_abreCentrada.arguments[2]) ? param.split(',') : alto=ancho=0;
	for (i=0; i<a.length; i++){
		if (a[i].indexOf('height')!=-1) alto=eval(a[i]);
		if (a[i].indexOf('width')!=-1) ancho=eval(a[i]);
	}
	posX=(screen.availWidth-ancho)/2;
	posY=(screen.availHeight-alto)/2;
	param+=",screenX="+posX+",left="+posX+",screenY="+posY+",top="+posY;
	return window.open(url,nom,param);
}

// Mueve la animación flash 'nombre' del marco indicado a la posición 'punto'
function moverFlash(punto,nombre,marco){
	if (typeof("nombre")=="undefined" || !nombre) nombre="animFlash"; // animFlash es el nombre genérico para el flash
	if (typeof("marco")=="undefined" || !marco) marco="self"; // Es el marco por omisión donde está la animación
	var _t=marco.document;
	var PeliFlash=(_t.embeds && _t.embeds[nombre])?_t.embeds[nombre]:_t.getElementById(nombre);
	if (PeliFlash){
		PeliFlash.SetVariable("_root.punto", punto); // Punto se define en el flash como un índice que permite apuntar a cada movieClip
		return PeliFlash.Play();
	} else
		return false
}

// Devuelve un puntero al objeto con el identificador pasado
function $(_id){ // JMPG01012 © 2006 v1.0
	return (document.getElementById)?document.getElementById(_id):( (document.all)?document.all(_id):document._id );
}

function aE(_o,_e,_f,_u){ // Añade la función (_f) para ejecutar al cargar un objeto (_o) [sin el 'on' inicial] mediante un evento (_e)
	if (_o){
		if (typeof("_u")=="undefined" || !_u) _u=false;
		if (_o.addEventListener)
			return _o.addEventListener(_e,_f,_u);
		else if (_o.attachEvent)
			return _o.attachEvent("on"+_e,_f);
		else if (_o["on"+_e]){
			_o["on"+_e]=_f;
			return true;
		}
	}
	return false;
}

function qE(_o,_e,_f,_u){ // Quita las funciones (_f) que se ejecutan al cargar un objeto (_o) mediante un evento (_e)
	if (_o){
		if (typeof("_u")=="undefined" || !_u) _u=false;
		if (_o.removeEventListener){
			_o.removeEventListener(_e,_f,_u);
			return true;
		} else if (_o.detachEvent)
			return _o.detachEvent("on"+_e,_f);
		else if (_o["on"+_e]){
			_o["on"+_e]=null;
			return true;
		}
	}
	return false;
}

function dimVentana(){ // Devuelve un vector con las dimensiones de la ventana y del documento, con y sin barras de desplazamiento
	var d,s,t,u,v,x,y;
	d=document.documentElement; // Explorer 6 modo estricto
	if (self.innerHeight){ // todos salvo Explorer
		x=self.innerWidth;
		y=self.innerHeight;
	} else {
		if (!d || !d.clientHeight) d=document.body;  // otros navegadores
		if (d){
			x=d.clientWidth; // Ancho de ventana sin barras
			y=d.clientHeight;
		}
	}
	u=d.scrollWidth; // Ancho de documento con barras
	v=d.scrollHeight;
	s=d.offsetWidth; // Ancho de ventana con barras
	t=d.offsetHeight;
	return new Array(x,y,u,v,s,t);
}

function marca_pagina(_d,_t) { // Añade la página a los marcadores / favoritos
	if (typeof(_d)=="undefined" || _d=="") _d=location.href;
	if (typeof(_t)=="undefined" || _t=="") _t=window.document.title;
	if (_o=window.sidebar)
		_o.addPanel(_t,"http://"+_d,"");
	else
		(_o=window.external)?_o.AddFavorite("http://"+_d,_t):alert("Pulse Ctrl+D para añadir esta página a sus marcadores / favoritos.");
}
function nuevoAjax()
{ 
	/* Crea el objeto AJAX. Esta funcion es generica para cualquier utilidad de este tipo, por
	lo que se puede copiar tal como esta aqui */
	var xmlhttp=false;
	try
	{
		// Creacion del objeto AJAX para navegadores no IE
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch(e)
	{
		try
		{
			// Creacion del objet AJAX para IE
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(E)
		{
			if (!xmlhttp && typeof XMLHttpRequest!='undefined') xmlhttp=new XMLHttpRequest();
		}
	}
	return xmlhttp; 
}
// Fin funciones propias
//-->
