var secciones = new Array('formularios')
var anchoVentana = 400
var altoVentana = 300
var menAct = new Array(false)
function cambiaTituloScript(donde,cual)
{
document.getElementById(donde).firstChild.nodeValue = cual
}
var titulo = 'Códigos Javascript - tunait.com'
var tex
var atributos = ""
function verEjemplo(cual,ancho,alto,nombre,atris)
{
archivo = "scripts/" + seccion + "/" + cual
atrib = "resizable=yes,width=" + ancho + ",height=" + alto + atris
ventana = window.open(archivo,nombre,atrib)
}
var valores = new Array(null,'220px','100%','100%','100%','100%','100%','100%','180px','100%','100%','100%','100%')
secciones = false
function redimensionaCapas(){
largo = document.getElementsByTagName('div').length
cap = 1
for(m=0; m<largo; m++){
	if(document.getElementsByTagName('div')[m].id.charAt(0)== 'b'){
	capa = eval("document.getElementById('c" + (cap) + "')")
	capa2 = eval("document.getElementById('d" + (cap) + "')")
	capa3 = eval("document.getElementById('b" + (cap) + "')")
	document.getElementsByTagName('div')[m].style.height = capa.offsetHeight + "px"
	capa2.style.height = capa.offsetHeight + "px"
	capa3.style.visibility = 'hidden'
	document.getElementsByTagName('div')[m].onmouseover=function(){
	posss=this.id.substr(1)
	this.className = 'subMenuMadreB'
	this.style.width = valores[posss] 
		}
	document.getElementsByTagName('div')[m].onmouseout=function(){
	this.className = 'subMenuMadre'
		this.style.width = '100%'
		}
	cap++	
	}
	}
}
//window.onload=redimensionaCapas

function abreMenu(cual,cual2,donde){

if(document.getElementById(cual).style.visibility == 'hidden'){
 document.getElementById(cual).style.visibility = 'visible'
 document.getElementById(cual2).style.display='block'
 donde.className = 'botonSeccion'
 } 
else{
 document.getElementById(cual).style.visibility = 'hidden';
document.getElementById(cual2).style.display='none';
donde.className = 'botonesMenu'
}

}

function menuDef(){
	abreMenu('b1','d1',this)
	abreMenu('b2','d2',this)
if(menAct[0]== true){
	abreMenu(menAct[1],menAct[2],menAct[3])		
	}
}

function verCodigo(cual,tex,lan)
{
if(document.getElementById(cual).style.visibility == 'visible')
	{
	document.getElementById(cual).style.display = 'none'
	document.getElementById(cual).style.visibility = 'hidden'
	document.getElementById(cual).style.position = 'absolute'
	tex.lastChild.nodeValue = "Mostrar Código"
	if(lan == "en"){
		tex.lastChild.nodeValue = "View Code"
		}
	
	}
else
	{
	document.getElementById(cual).style.visibility = 'visible'
	document.getElementById(cual).style.position = 'relative'
	document.getElementById(cual).style.display = 'inline'
	tex.lastChild.nodeValue = "Ocultar Código"
	if(lan=="en"){
		tex.lastChild.nodeValue = "Hide Code"
		}
	scroll(300,document.body.scrollTop+100)
	}
}
function verCodigoFuente(cual)
{location.href ="view-source:" + cual}

function verCF(cual)
{
dominio = location.host
directorio = location.pathname
directorio = directorio.split("/")
location.href="view-source:" + "http://" + dominio + "/" + directorio[1] + "/scripts/" + cual
}
var iex = navigator.appName=="Microsoft Internet Explorer"?true:false;

function maus(d){
if(iex){
d.style.cursor = 'hand'
}
}