var aver = 0
var izq = 0
var arr = 0
var altdisp = 0
var ancdisp = 0
var NS4 = false
var NS5 = false
var NS = false
var MSI = false
var OPERA = false
var Swm = 1
var i = 0
var Sw = false
var Swd = true
var SwM = false
var tmp = 0
var tmpa = 0
var pagina = 10
var actual = new Image
var altdisp = screen.availHeight
var ancdisp = screen.availWidth
var idioma = " "
var idiomaSys = " "
var informa = ""


var colores = new Array("white","red","#00FFFF","#99FF00","#CCCCCC","#996699","#CC6633","#FFCC33","#FFFF66"," #ff8080")
var complementos = new Array("black","white","white","red","yellow","gray","white","black","black","white")
function Inicio(Capavar)
{
altdisp = screen.availHeight
ancdisp = screen.availWidth
/*Init()*/
if(navigator.userAgent.indexOf("Opera") != -1){OPERA = true}
if(navigator.appName == "Microsoft Internet Explorer"){MSI = true}
if(navigator.appName == "Netscape" && parseInt(navigator.appVersion.charAt(0)) <= 4){NS4 = true}
if(navigator.appName == "Netscape" && parseInt(navigator.appVersion.charAt(0)) > 4){NS5 = true}
if(navigator.appName == "Netscape"){NS = true}
if(navigator.appName == "Gecko"){NS5 = true}
if(NS4){
coloca = document.layers[Capavar]

}
else
{
/* Definiendo elementos DOM*/
coloca = document.getElementById(Capavar).style
if(Capavar == "Map"){tipomapa = document.getElementById('Dungeon').style}
}
if (MSI)
{
idioma = navigator.userLanguage
idiomaSys = navigator.systemLanguage
}

Alcentro()
document.getElementById('Cargados').style.visibility = "hidden"
document.getElementById('Utilidades').style.visibility = "visible"
if(Capavar == "Map"){document.getElementById('Donde').style.visibility = "visible";Version()}
coloca.visibility = "visible"
ventana()
}

function Alcentro()
{
informa = document.compatMode + " " + idioma + " " + idiomaSys
if(NS4){coloca.width = 530}
ancho = ancdisp - 40
alto = altdisp - 200
coloca.top = 10
coloca.left = 20
coloca.width = ancho
coloca.height = alto
coloca.overFlowType = "auto"
coloca.clip = "rect(0px " + ancho + " " + alto + " 0px)"
}

function ventana(n_d, t_d,l_d,w_d,h_d,Sw_d) {
this.n_d = n_d
this.t_d = t_d
this.l_d = l_d
this.w_d = w_d
this.h_d = h_d
this.Sw_d = Sw_d
}
