// JavaScript Document
/*Rutinas para que cambie la imagen a elegir de fondo en la rpincipal*/

function vinculo(k)
	{
	var texto="<html><head><title>Imagen Para tu Fondo</title><link rel='stylesheet' href='http://www.d2mantix.com/estilo.css' type='text/css'></head><body><center><h1>Fondo para tu Escritorio</h1><hr><p>Pulsa el botón derecho para establecerlo como fondo.</p><img src='fondos/"+k+".JPG' class='imagen'><br><br><font size='-3'>El diseño y los contenidos de esta web son propiedad de su autor. Las imágenes son propiedad de <a href='http://www.blizzard.com/'>Blizzard Entertainment ©</a></font></center></body></html>";
	document.open();
	document.write(texto);
	}

function traslado(vin)
	{
	var texto="<html><head><title>Imagen del Juego</title><link rel='stylesheet' href='http://www.d2mantix.com/estilo.css' type='text/css'></head><body><center><h1>Imagen del Juego</h1><hr><p>Aquí puedes ver los cambios efectuados en el juego en la nueva versión.</p><img src='"+vin+"' class='imagen'><br><br><font size='-3'>El diseño y los contenidos de esta web son propiedad de su autor. Las imágenes son propiedad de <a href='http://www.blizzard.com/'>Blizzard Entertainment ©</a></font></center></body></html>";
	document.open();
	document.write(texto);
	}

function muestra(vin)
	{
	var texto="<html><head><title>Imagen del Juego</title><link rel='stylesheet' href='http://www.d2mantix.com/estilo.css' type='text/css'></head><body><center><h1>Muestra</h1><hr><p>Aquí puedes ver uno de los objetos de este tipo.</p><img src='"+vin+"' class='imagen'><br><br><font size='-3'>El diseño y los contenidos de esta web son propiedad de su autor. Las imágenes son propiedad de <a href='http://www.blizzard.com/'>Blizzard Entertainment ©</a></font></center></body></html>";
	document.open();
	document.write(texto);
	}
	
function imagen()
{
var yoyo=new Image();
k=Math.round(Math.random()*34);
yoyo.src="mini/m" + k + ".jpg";
document.wall.src=yoyo.src;
}
/*fin de la imagen para fondo*/

/*barra de estado*/
function barra(op,texto)
{

if(op==0)
	{
	fecha=new Date();
	dias=new Array(7);
	dias[0]="Domingo";dias[1]="Lunes";dias[2]="Martes";dias[3]="Miercoles";dias[4]="Jueves";dias[5]="Viernes";dias[6]="Sabado";
	meses=new Array(12);
	meses[0]="Enero";meses[1]="Febrero";meses[2]="Marzo";meses[3]="Abril";meses[4]="Mayo";meses[5]="Junio";meses[6]="Julio";meses[7]="Agosto";meses[8]="Septiembre";meses[9]="Octubre";meses[10]="Noviembre";meses[11]="Diciembre";
	window.defaultStatus="Diablo 2 LoD [x MantiX]  ["+dias[fecha.getDay()]+",  "+fecha.getDate()+" de "+meses[fecha.getMonth()]+" del "+fecha.getYear()+"] :: Posiblemente la Mejor Comunidad Diablera del mundo";
	}
if(op==1){window.status=texto+" :: Diablo 2 LoD -[x MantiX]-";}
if(op==2){window.defaultStatus==" :: Diablo 2 LoD -[x MantiX]-";}
}

function AbrirRama()
{
	rama=open(AbrirRama.arguments[0]+".htm","popup","width=259,height=350,resizeable=no");
	clean=0;
}

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);

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_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; }
}